...
JavaScript for Custom Plugin to set child context Param to call any Transaction: and other required information to call another process flow:
- When streaming is passed to child flow in File Mode:
import com.adeptia.connect2.runtime.RuntimeUtils;
RuntimeUtils.
...
setChildContextForCustomFlow(inputStream, context, service.getLogger(), "<<ACTION_NAME>>
...
"
...
);
where,
...
ACTION_NAME
...
is the name of the call or spawn.
TransactionName is the name of the Transaction.
PartnerName is the name of the Partner for which Transaction is created.
for example,
...
RuntimeUtils.setChildContextForCustomFlow(inputStream,
...
context,
...
service.getLogger(),
...
"Action_Name"
...
);
Info Ensure that you have provided the values in double quotes (" ").
If you are the owner of the Transaction then type null (without double quotes) as a value in the partner name, for example,
...
When streaming is passed to child flow in Memory Mode:
import com.adeptia.connect2.runtime.RuntimeUtils;
RuntimeUtils.setChildContextForCustomFlow(inputStream, context, service.getLogger(), "<<ACTION_NAME>>",
...
true, "<<contextVarName>>");
where,
ACTION_NAME is the name of the call or spawn.
contextVarName is the name of the context variable that will be used as Key to put stream data on context.Info title Note For Memory mode, in child flow, if Context Source is used, then eventContextEnable must be false.
Ensure that you have provided the values in double quotes (" ").
When no Stream is passed to child flow in:
import com.adeptia.connect2.runtime.RuntimeUtils;
RuntimeUtils.
...
setChildContextForCustomFlow(
...
context, service.getLogger(), "<<ACTION_NAME>>"
...
);
where,
ACTION_NAME is the name of the call or spawn.
Info Ensure that you have provided the values in double quotes (" ").
JavaScript to check if child flow is Aborted or not:
...
import com.adeptia.connect2.runtime.RuntimeUtils;
RuntimeUtils.abortParentFlow(context,"<<ACTION_NAME>>", "<<resultCtxVarName>>");
Process Flow Design
Following are the sample designs of the Process Flow, calling a Transaction through Call or Spawn action:
...