Please enable JavaScript to view this site.

InterFormNG2 Manual

The basic, special Choice and join workflow component is very similar to the Choice component. For the majority of the documentation of the Choice and join you should refer to the choice component as choice and join does the same as the choice component with a bit extra functionality.

 

The choice and join component looks like this:

 

ng2ChoiceAndJoin0001

 

The yellow boxes above are the choice and join component.

 

Initially the surface the choice and join component works like the choice component as the execution branches out to one of the When/Otherwise branches. Each when branch has a condition:

 

ng2ChoiceAndJoin0002

 

The first When branch (from the top) with a condition, that is true is the only when branch, that is executed.

 

The otherwise branch will only be executed, if none of the When branches has a condition, that is true.

 

 

The join branch

The difference between the choice component and this is, that we here also have a join branch. The join branch is always executed and will be executed after either a when or otherwise branch has been executed.

 

In the example above it e.g. means, that if the input XML file contains an email address, then the workflow will email, but if there is no email address, then InterFormNG2 will print instead. After either printing or emailing the workflow will process the join branch, which means that the subworkflow, main1 will be called.

 

 

Example

Apart from the example above you can also consider to use this workflow component, if you want e.g. use a generic workflow and setup variables for various output - depending on e.g. the input file and perhaps even testing for if a template is available. After setting variables in the conditioned branches the processing can move on with a generic workflow - similar to the above.