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?":
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:









In the above process, the first step is reached if three conditions are met:
1) It's on public land
2) It's offensive
3) It's over 2 metres high
Now for visual purposes and to illustrate nested branches there are separate branches for all three of these. I.e. On each branch there are these three conditions:
1) Fields["PrivateLand"] == "No"
2) Fields["OFFENSIVE"] == "Yes"
3) Fields["HIGH"] == "Yes"
But it does not have to be designed like this. You could have a single branch with the name Public > Offensive > High. And the condition you would set would joint all of these. The way to do this is to place this between the conditions:
&&
This is the same as AND. So:
Fields["PrivateLand"] == "No" && Fields["OFFENSIVE"] == "Yes" && Fields["HIGH"] == "Yes"
Adding a condition like this is logical because all three pieces of data are captured in an online form and shortens the scale of the process diagram potentially.
You can also combine OR conditions like this:
Fields["PrivateLand"] == "No" || Fields["OFFENSIVE"] == "Yes"
Where two 'pipes' i.e. || mean OR. I.e. if the customer answers private land is No OR Offensive is Yes the same condition would be met.
And you can also use a NOT operator which is an exclamation mark e.g.
!Fields["OFFENSIVE"] == "Yes"
Means anything other than Yes will lead to the condition being true
The field names and the content referenced in conditions is all case sensitive. So if the field name is:
OFFENSIVE and you use Offensive it will not work.
You can also use mathematical operators like:
int.Parse(Fields["Amount"]) < 2
And where it is a monetary or decimal value
decimal.Parse(Fields["Amount"]) > 100.00
decimal.Parse(Fields["Amount"]) < 100.00
decimal.Parse(Fields["Amount"]) == 100.00
You might use the above for example with a payment arrangement/debt management based online form/process. Sending it to a different officer dependant upon whether they are more than a certain amount in debt.
And finally, you can compare fields with one another E.g.
Fields["BalanceThisYear"] < Fields["BalanceLastYear"]
To determine the branch in which to trigger.
Not only can you have branches you can have branches inside branches. To illustrate, here is a more complex branching process:
In the above, imaginary, Report a Puddle (a play on report a pothole) process, if the puddle reported is the size of Loch Ness, it goes down the high priority branch. But within that branch if wildlife was spotted another set of branches is considered.
You can have many, many process process branches nested like the above e.g. the following is a Building Control Application process:
So even the most complex of processes can be handled with this functionality.


