Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JavaScript  for Custom Plugin to set child context Param to call any Transaction: and other required information to call another process flow:

  1. When streaming is passed to child flow in File Mode:
    import com.adeptia.connect2.runtime.RuntimeUtils;
    RuntimeUtils.

...

  1. setChildContextForCustomFlow(inputStream, context, service.getLogger(), "<<ACTION_NAME>>

...

  1. "

...

  1. );

    where,

...

  1. ACTION_NAME

...

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

  1. for example,

...

  1. RuntimeUtils.setChildContextForCustomFlow(inputStream,

...

  1. context,

...

  1. service.getLogger(),

...

  1. "Action_Name"

...

  1. );

    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, 

...

  1. When streaming is passed to child flow in Memory Mode:

    import com.adeptia.connect2.runtime.RuntimeUtils;
    RuntimeUtils.setChildContextForCustomFlow(inputStream, context, service.getLogger(), "<<ACTION_NAME>>", 

...

  1. 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
    titleNote

    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 (" ").

  2. When no Stream is passed to child flow in:

    import com.adeptia.connect2.runtime.RuntimeUtils;
    RuntimeUtils.

...

  1. setChildContextForCustomFlow(

...

  1. context, service.getLogger(), "<<ACTION_NAME>>"

...

  1. );

    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:

...