Can we use process name as a variable inside the subprocess activity so that the

Certified Associate Developer
Can we use process name as a variable inside the subprocess activity so that the name of the called process can be determined in runtime....

OriginalPostID-28254

OriginalPostID-28254

  Discussion posts and replies are publicly visible

  • If you want to re-use part of the parent's name you can create a variable (i.e. parameter) inside the subprocess, this variable will show up in the Setup tab of your subprocess activity, you can map it to =pp!name. Inside your subprocess you can now do whatever you need with that variable; if the purpose is to use it to name the subprocess you can simply use a script task inside and use that variable (that now holds the parent's name) in a custom output to be stored in the process name.
  • 0
    Certified Associate Developer
    hi, my requirement is to determine the name of the child process to be called in runtime from the parent process.
  • If what you need is to launch instances from different process models, this is not possible with the subprocess activity.

    The process model to be launched in the subprocess activity is not an expressionable field. What you could do instead is placing a gateway (XOR) and add conditions, based on a specific condition direct the path to the desired subprocess activity. You will need one activity per different process model.

    Notice how the process model field is not expressionable because it requires that you map the parameters of the process to be launched at design-time, if it were expressionable it wouldn't be possible for you to map the parameters at design time.
  • We have one way of doing this, by calling a standard sub process passing in a range of data. Inside this sub process we have a send message node, which we set up with the data items to be sent in the msg properties. Then on the processes we wish to launch which we have a received message node at the start. We have a rule on this that means it only fires when one of the fields in the msg properties contains the process name. We then map the required data fields into the process. The only issue is the messages I believe are broadcast system wide but currently we run this successfully.