Passing Input Variables as Reference to Multiple Nested Sub-Processes

Hi All,

I have a boolean variable in my initial process that I need to reference in a sub- sub- sub- process, is this possible? Can you pass a single variable through 3 process models to be used by the 4th based on the value from the 1st?

It's difficult to explain, but I need to know whether or not the initial process was scheduled or ad-hoc (the boolean value) in the 4th sub-process of this overarching process in order to make appropriate task assignments in the last model. 

I passed the variable as reference in the Sub-Process node of the 1st model, but when I try to do it again in the 2nd sub-process the variable doesn't appear as an input variable even after hitting Refresh. 

Thanks for more info! 

  Discussion posts and replies are publicly visible

Parents
  • Hi,
    Your use case describes needing to know in the sub process whether or not the parent process was scheduled or ad hoc.
    Does this variable’s value change over the life of the process? I expect a given instance is scheduled, or ad hoc, but not both.
    Unless this variable’s value is going to change in the given instance after the sub process launches, by-reference mapping shouldn’t be necessary.
  • Hi Robert -- you are correct that the value will only be one or the other, not both. If I don't pass the variable down into the 4th process model, how would I use it to assign the Task based on this variable then? The node for assignment I want to configure is in the last process and needs to know whether or not the start of the parent process was scheduled or ad-hoc. I think in this case mapping would be the only way to get that value?
  • Hi Sarah -

    So, 2 things:
    1st, I think I misunderstood your question, and that you were interested in using the setting "Pass as a reference" that synchronizes values in real time between processes. Reading again, it sounds like your key concern is passing the variable down from parent process to child process, again and again.
    Sorry about that.

    2nd, on to your real issue.
    Each sub process node is examining the condition of the parameter process variables in the target process.
    If you're hoping to map to a Boolean PV in the sub process, create a PV of type Boolean, e.g. myBool, and make sure to set it as a parameter so it can accept input values on process start. Then be sure to do a save and publish on that child (sub) process.
    After the save and publish, you should see the variable for mapping in the sub process node of the parent process.
    Since you have a number of sub processes, might want to start at the sub-most process, creating the PV, saving and publishing, and then mapping the variable in the parent process, and so on.

    Does that make sense?

    Thanks,
    Rob
  • Hi Rob, no problem, and thanks for the additional suggestions. So this worked -- I added the boolean manually into the sub-processes Model Variables > published and then refreshed the next level up sup-process node and it appeared. Still have to do testing to make sure it's working, but my final question is that I thought that the variable was passed into the sub-process as a Model Variable automatically when you click the "Pass as Reference" button -- if I'm not mistaken, this is what happened on the first sub-process. Why does the variable have to be manually added from the bottom up in this case?
  • Pass of reference will be used when the variable passed from parent process to sub process changes in sub process, it would be reflected in the parent process.
Reply Children
No Data