IPC Sub Processes - Running at exactly the same time

  • 23 September 2011
  • 4 replies
  • 2 views

Badge +3

Hi,


I have a master process with a IPC event which calls a sub process & runs the sub process x amount of times.


The sub processes called by the IPC event appear to fire all at exactly the sametime.  Is there a way I can make


IPC Event Sub Process One - Fire Now


IPC Event Sub Process Two - Fire 'Sub Process One Activity' Completed Time + 1 second


IPC Event Sub Process Three - Fire 'Sub Process Two Activity' Completed Time + 1 second


IPC Event Sub Process Four - Fire 'Sub Process Three Activity' Completed Time + 1 second


& so on..........


Basically the process updates a Trigger field which is used by my SmartObject filter to return the next SO ID for the next iteration of the sub process but as they are all firing at exactly the same time the Trigger field isnt getting updated in time so it just returns the 1st SO item ID for each process.


Any ideas ?


Cheers,


 


 


4 replies

Badge +10

Hi,


How about creating a Start Rule on the first activity of your child process to delay the start of the activity configured with a Process-level Data Field.


I assume you are using Plan per slot for your activity used to fire off the IPCs. If you have some sort of counter in the Instance Data for the activity which contains the identifier for the process then you can use this in the IPC wizard and combine the


DateTime.AddSeconds(DateTime.Now,Convert.ToInteger(ActInstDest.InstanceData)


Inline functions to produce an output which will be sent to a data field in your child process. Hopefully the instance data increments nicely and you will have each process starting at the same time, but the first event executing in the correct sequence.


Hope this helps!


Regards,

Badge +3

Thanks for the reply.


Im using 'Plan Per Slot - no destination' so the sub process fires for each repeating section in a InfoPath form, what you suggest sounds like it will work, is there a simple way to increment a counter each time a subprocess fires?


 


Cheers.

Badge +10

How about including a column in the repeating section which increments? Use this column as the Instance Data when configuring the Plan per slot options. I believe you will be able to do incrementing values in InfoPath.


HTH!

Badge +3

Hi,


Thanks both, I did think about using the random function but my only concern was whether it could create the same number twice in a row ?


 


 

Reply