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.

 

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:

 

NG2WorkflowMulticast0001

 

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:

 

NG2WorkflowMulticast0002

 

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 branches.

 

 

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 round icon:

 

NG2WorkflowMulticast0003

 

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

 

NG2WorkflowMulticast0004

 

(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 round icon:

 

NG2WorkflowMulticast0003

 

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

 

NG2WorkflowMulticast0004

 

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:

 

NG2WorkflowMulticast0005

 

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

 

NG2WorkflowMulticast0006

 

 

 

Workaround to insert any element inside a multicast

    • Related Articles

    • Multicast and merge workflow component

      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. ...
    • 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 ...
    • 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 ...
    • 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 ...
    • Repeat workflow component

      The advanced, utilities workflow component, Repeat creates a loop in which the components following it are executed a number of times. At the start of each repetition, the workflow payload and variables are reset to the state they have at the point ...