How to append CDT from subprocess in a single variable of array type?

Hello Everyone,

I have an "multipleMeetings" array process variable which of MAP type, its holding the meeting related data as shown in below image, I am running a subprocess(to store it in a database) for each meeting present in multipleMeeting PV by enabling MNI. In the subprocess by inserting the meeting data in database, storing meeting data in meetingDataPV which is single type of meetingInfo CDT, so every time the sub process completes it execution it returns the meetingDataPV to parent process now in parent process i want to append it to another variable which is also a meetingInfo CDT type, but the problem is its appending the last executed instance's meeting data only.

Can anyone help me in this?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    This is one of those places where trying to use MNI might be 10x the effort of simply building an in-process loop that does what you want manually (and using 3 or 4 nodes instead of the 2 you currently have).  And even then I'm not sure (barring a lot of trying and teeth-gnashing) whether the MNI approach is even feasible here.

    The issue stems from the confusion caused by trying to pass back data from the subprocess while the subprocess is also configured for MNI, because the multiple instances are set to "run at once" and may all complete instantaneously (thus not giving the parent process the chance to update the array before the next value is passed up to the parent and overwrites the instance you were hoping to append).

    My overall suggestion: ditch the subprocess MNI and build a loop.  Or put the loop in your subprocess and pass back the whole array.  Either way the result will be similar.

  • Yes looping worked as per my requirements.

    Thanks

Reply Children
No Data