Update Description

This commit is contained in:
Patrick Schiefer 2022-03-09 16:16:29 +01:00
parent f40daf4b1f
commit 19ca096afe

View file

@ -7,14 +7,17 @@ categories: ["Pattern"]
_Created by Patrick Schiefer, Described by Patrick Schiefer_
## Abstract
The goal of this pattern is to control the flow of multiple actions
The goal of this pattern is to control the flow of multiple processes
## Problem
Sometimes its neccassary to perform multiple actions in Business Central, for example you want to post more than one order or before you post an Order you also have to post a purchase order this often leads to spaghetti code with big if else structures, which is not easy to read
Sometimes its neccassary to perform multiple processes in Business Central, for example you want to post more than one order or before you post an Order you also have to post a purchase order this often leads to spaghetti code with big if else structures, which is not easy to read
## Description
The pattern is ideal for executing several independent processes in succession. Since the processes are independent, each process must take care of error handling itself.
The pattern should not be used to control a single process.
## The Pattern
To structure this problem we can use the "Command Queue" pattern. The pattern consist of two main parts the queue and the command interface
![image](queue.png)
@ -211,6 +214,7 @@ codeunit 50105 PatchPostQueue
```
## References
[Detailed Explanation of the pattern](https://patrickschiefer.wordpress.com/2022/02/24/part-2-how-to-implement-a-command-queue-in-pure-al/)