Skip to main content

Multiple setchild context

Planned

Comments

1 comment

  • David Paras

    We can do this by a custom plug-in for now:

    import java.util.*;

    // edit it to specify the name of Call or Spawn action used in process flow
    String childName = "Call1";

    Map map = (Map) context.get(childName + ".childContext");
    if (map == null) {
        map = new HashMap();
    }
    // use this statement multiple times depending upon the number of variables to be set in child (sub-process) flow
    // if you need to set 4 parameters in child flow, use this statement 4 times (with different values of childVarName and parentVarName)
    // "childVarName" represent variable name in child flow, "parentVarName" represents variable name in parent flow whose value needs to be set in child flow
    // for example : map.put("PolicyNumber", context.get("PolicyNumber"));
    map.put("childVarName", context.get("parentVarName"));

    // setting context variables for child (sub-process) flow
    context.put(childName + ".childContext", map);

    0

Please sign in to leave a comment.