Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


Actions like SQL Operation or Wait for Files can be used to bind their results to other actions, but binding to sub-processes is not actually possible directly in Stambia.

The solution is to bind the action to the delivery of the sub-process, with values bound as parameters. Here is an example of how to achieve it.

Note that in this case there will be separate sessions for Master and each of Slave processes, with separate contexts, variables etc.

The Main Process

mainProcess

In this process the delivery will be executed for each row returned by the SQL Operation.

We created a parameter, named CUSTOMER_ID in which we set the value retrieved from the source with the :{column}: syntax.

We will be able to use this parameter in the delivery, like shown below.

 

The sub-process

In this example, the sub-process contains a basic scripting action.

subProcess

We are publishing in it a variable at the root of the process, which contains the customer ID got from the bind:

__ctx__.publishVariable("~/Retrieved_ID","The Customer ID is ${~/CUSTOMER_ID}$");

We retrieve the value of the variable with ${<variable>}$ syntax.

 

Don't forget to publish the delivery of the sub-process:

publish

 

Articles

Suggest a new Article!