Choice and join workflow component

Choice and join workflow component

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 look 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:

    

 

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.

A limitation with split

Please notice, that the join branch will only be executed once. If you e.g. insert a split XML or split spooled file or even a repeat in a branch of a choice and join, then the sub-workflow after these will NOT trigger the join branch of the choice and join in which these elements was inserted. 

Example

Apart from the example above you can also consider using this workflow component, if you want e.g. to 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.

    • Related Articles

    • Choice workflow component

      The choice workflow component can be used to condition the processing of the files. The choice component can branch out to one or many cases (subtrees) depending on a condition for each case (subtree). When you insert a new choice component it will ...
    • Error workflow component

      The workflows, that you can setup in InterFormNG2 can be very long and complex and in some cases e.g. for debugging you might want to force an error in the workflow. Another reason why you might want to force an error, could e.g. be that an input XML ...
    • Retry-repeat workflow component

      The advanced utilities workflow component, Retry-repeat can help you, if you have a workflow component, that sometimes fail. You can use this to retry a subtree of workflow components until no error occurred, but it will fail when it has tried a ...
    • Swagger HTTP workflow component

      The advanced, utilities workflow component, Swagger HTTP can load a Swagger JSON definition can be loaded and a request from the API can be selected. An HTTP component is then generated with URL, output type, parameter names and header names ...
    • Multicast workflow component

      The multicast workflow component can be used, if you want to create multiple outputs from a single input file. You e.g. might want to create a PDF file, an email and a print output from a single input XML file. To do that the multicast component can ...