Storing Data returned by IPC in activity instance


Badge +10

HI,

 

I have an activity, where I would like to run the events in the activity lets say 5 times. I have achieved this by setting plan per slot (no destinations) and setting the  slots to 5. Now this runs all the events in the activity 5 times. Now, the first event is an IPC call to another process. This process returns a field. I would like to store this data that is returned into an activity instance level datafield (i dont know if this is possible) so that in the next event I can use the data that was returned and send it in an email.

 

I cannot store it this data in a process level datafield or an activity level datafield becasue it would be overwritten, it seems by what ever was returned last by any of the 5 activity instances. They seem to run in parallel. Is it possible for me to run them one after another. This way I could store them is a process level or activity level datafield.

 

Hope that make sense,

Thanks in advance

 

 


3 replies

Userlevel 5
Badge +18

Would calling that "send email" event within that child IPC process work?


 


If not and you need the parent process to know the value of this field for all 5 child process instances, perhaps you can appending the IPC data return to a single field and somehow parse them; with perhaps a split function and another loop?

Badge +10

Your approach of storing the return data to the activity instance datafields is correct.  It shouldn't overwrite as each slot creates a separate copy of the activity datafield.

 

I've attached a test process that creates a slot for each member of an AD Finance group and calls a subprocess which returns the email address of the user (not that you need to call a subprocess to do that but hey its just an example :)) and the parent then sends an email to each user.

 

The only gotcha is that you have to set the succeeding rule of the activity in the parent process with the IPC event to ensure it doesn't end after the first child instance completes.  So I checked that all slots of the Status=Completed.

 

Hope this helps.

Tim

Badge +10

Thank you very much for your replies. It does seem to store a different value in each of the instances data fields. I dont know why it did not during my initial test. But it works now.

 

Thanks again for you help.

Reply