Multicast workflow component

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 branch out to one or many sub-trees, that contains workflow components.

If you want to create multiple outputs like described here, then you might think, that you could also simply add the new components after each other, but that is normally not possible as the payload (the data transferred from one component to the next) is changed to the output of an output component. So generally you need at least to compare the input and output payload of components to verify if they can be used in a sequential execution.

You can create many branches on a multicast component, but if you need more than around 10 branches, then you should consider to group them and call a sub-workflow for each group to make it easier to keep an overview of all the branches and the logic, that they represent.


It is important to notice, that the payload, variables and attachments set in one branch of the Multicast are forgotten and the initial variables and payload is used, when the next branch is executed. This can e.g. be illustrated with this example:


In the workflow above the variable, Var is set to the value 1 as the first thing. 

In the top branch the value of the variable, Var is now set to 2 and the payload is changed into the PDF data stream created by the Create PDF document component. 

In the bottom branch the payload and variables are listed with the debug headers component. Please note, that the variable, Var here contains the value 1 as the change in the first branch is ignored. 
The payload saved in the To filesystem component saves the initial xml file, that triggered the workflow - NOT the PDF that is created in the top branch.

 

This section contains information of how to:

1.Adding branches and sub-components to a multicast component.

2.How to delete branches

3.How to copy branches

4.Workaround to insert any component in a multicast.

Add a branch to the multicast component

You see this, after you have inserted a multicast element:

 

Out of the box there is only a single branch, but if you click the + icon to the right of the multicast element (as marked above), then you can insert a component for the current branch and a new empty branch is added:


 

In the example above we have added the create PDF file component to the first branch and at the same time a new empty branch is added below as shown above.

Now you can add components to the second branch, and when you do that a new, third (empty) branch is added etc.

 

A new branch will always be added to the bottom of the branches, but if you want to rearrange/move branches, then you can do that by copying a deleting branch.


Reordering branches
If you want to change the order of branches in a multicast component, you can easily do so directly from the branch list.
  1. Open the Multicast component to display all existing branches.
  2. Use the up or down arrow icons on the left side of each branch to move it up or down in the list.
  3. The new order will determine the sequence in which branches are displayed in the editor.

Deleting branches

If you want to delete a branch in a multicast component, then you should place the mouse over the first component in the branch and click on the icon shown below:

 


Now you can select Detele sub-tree to delete the complete branch (including the selected component and any component connected to it).

Info
Remember you can undo/redo any workflow change with the arrow keys on the top right in the workflow editor.
How to copy branches

If you want to copy a branch, then you first need to copy the branch into the clipboard. To do that you first place the mouse over the first component in the branch and click on the icon shown below:

 

Now click the Copy sub-tree to clipboard option in the pop-up window:


And now you click the lowest + icon to the right of the multicast component. When you click it, then this pop up window is shown:


Workaround to insert any component in a multicast.

Here you click Paste from clipboard to insert the contents of the clipboard i.e. insert the copy of the branch:

 

Workaround to insert any element inside a multicast


    • Related Articles

    • Multicast and merge workflow component

      The multicast and merge workflow component is placed in the basic section, but it is not a basic function. With this component you can create multiple outputs and then merge them together as a single output. This component has been made to help ...
    • Generic workflow

      One of the unique features of the InterFormNG2 workflows is the ability to setup very dynamic and generic workflows. There are multiple advantages with a generic workflow: It is much smaller compared to a setup, that e.g. contains a whole subtree for ...
    • Workflow for old NG templates

      Workflow for old NG templates : Please note - current versions of InterFormNG2 (3.x.x) do not support InterFormNG1 Templates anymore. If you are converting your installation from InterFormNG into InterFormNG2, then you should notice, that the ...
    • Disable and enable of Workflow components

      It is possible to disable/suspend individual workflow components of a workflow. When you disable a workflow element, then the processing of the disabled component is (as a general rule) skipped and the following components are processed. This image ...
    • 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 ...