Process Branches
Last updated
Was this helpful?
Last updated
Was this helpful?
The most obvious distinction when building a process with OpenProcess Flex is the presence of a new option to add a 'Branch'.
When one has added a branch this appears initially as follows:
Essentially, a single condition/decision point is added.
Before a process with a branch can be saved it needs a name AND a condition. If neither is added a validation message will be presented when attempting to save the process.
To add a name and condition to a branch you need to click on the pencil icon in the top right of the box which says IF condition. When you do you will be presented with this:
Each branch or condition needs to have a name and a rule (condition) to drive it. The name is best to be something easily understood by a layperson i.e. High Priority Fly Tip Removal is pretty clear that this is the high priority branch:
The condition itself requires one to understand the syntax (format of the content) to be used.
Fields["IMPORTANCE"] == "HIGH"
When you set up a Field you give it a code. The code of the field goes inside the square brackets. The value provided in the field is what is checked i.e.
Fields["Field Code For Your Field"] == "Value inside the field"
Where the field 'Code' is 'IMPORTANCE' and the 'Value' is 'HIGH' this branch of the process will be triggered. These two elements are used to indicate the field type and the specific option within this field type.
IMPORTANT
It is important to note that Choice field types are for decisions that will be made by users. I.e. if you want to meet a condition with a Choice field type then it will need to be a mandatory field that is answered when completing a step.
Data from an online form, even if it was a choice/list in a form you've built will always end up being a single value for the purposes of the back office. E.g. in the example below the field OFFENSIVE has come from a Yes/No answer to the question "Do you find the graffiti offensive?":
It is a single line of text because a user is not setting this. It has already been decided by the customer's choice in the online form i.e. Yes or No.
To add another condition simply click on the purple icon with the branch icon shown below top right. Here we can see three distinct branches and each contains a different priority of step:
Note that a branch is not a step. A branch is simply a means of creating separation in a process. Notice that in each branch there is a 'Plus' icon. Clicking this will then allow one to set the step type desired:
This means that you could have different steps against high, medium, low that have different SLAs, are handled by different teams, have different emails issued when the step is started/completed etc.
Below, one can see an example of a process where there are two branches and the first branch has two steps. The second branch has just one step:
One can also see that there is a 'Bin' icon against both steps and branches. It is possible therefore both to remove individual steps as well as branches. Deleting a branch will delete all steps within it.
Therefore if you attempt to delete a branch/step you will see the following:
When the process reaches a branch step, the process engine will start the first step on the first conditional branch, where the condition on the branch evaluates to true (i.e. the condition you have set is met)
When the process reaches a branch step, in the event that none of the conditions on the branch evaluate to true, the preceding step will not complete and an error will be raised
If the branch step is the first step in a process, and none of the conditions on the branch evaluate to true, an exception will be raised and the process will not be created.
So, if a form is submitted and does not have the data needed to meet one of the conditions that will start a process, it will not create the process and an integration failure will show against the form itself within the Forms Portal as shown below: