How to get all output return by Subprocess ran in MNI in Main Process?

Certified Senior Developer

I have subprocess running in MNI which writes a single row in table. I want to gather all the writes done by that subprocess in my main process in which this subprocess is called. Currently i am getting output of the last count of the MNI. Is it possible to get all the results ran by that subprocess in MNI ?

  Discussion posts and replies are publicly visible

Parents
  • If you're writing a single trow to a table per instance of a sub-process then if you also write to each row in table a correlation token (e.g. the ProcessId of the parent process) then you could execute a query against the table using that correlation token: "get me all rows from the table that have this ProcessId"

  • 0
    Certified Senior Developer
    in reply to Stewart Burchell

    Thanks for the reply! Is this not possible without querying the table in the main process to get the overall output of subprocess ran in MNI?

  • You might be able to complete that with certain logic, but querying the table with a!queryEntity() will be your cleanest and most efficient solution.  

    One limitation is with the MNI sub process output, we can only save directly into a variable, no append or indexing to build your list.  So, you would need a setup such as completing the MNIs each time one is finished (vs after all are finished) creating multiple outputs.  Say you save into pv!data, the next node would take the pv!data value and append to your final list.  The next MNI would do the same, utilizing the same pv!data variable, which creates a race condition.  Then you have to collect all MNI exit paths into 1 for the process to continue.  Much more of a hassle and prone to issues where a!queryEntity() is best all around.

    Check out the Query Editor Documentation if you have not done so yet.  

Reply
  • You might be able to complete that with certain logic, but querying the table with a!queryEntity() will be your cleanest and most efficient solution.  

    One limitation is with the MNI sub process output, we can only save directly into a variable, no append or indexing to build your list.  So, you would need a setup such as completing the MNIs each time one is finished (vs after all are finished) creating multiple outputs.  Say you save into pv!data, the next node would take the pv!data value and append to your final list.  The next MNI would do the same, utilizing the same pv!data variable, which creates a race condition.  Then you have to collect all MNI exit paths into 1 for the process to continue.  Much more of a hassle and prone to issues where a!queryEntity() is best all around.

    Check out the Query Editor Documentation if you have not done so yet.  

Children
No Data