creating multiple instances of same process (IPC event?)

  • 3 December 2005
  • 3 replies
  • 5 views

Badge +2
Hi,

We have a scenario in which there are multiple individual workflows for acquiring an asset (i.e. one workflow for purchasing a laptop, another for cell phone, etc.)

We are trying to develop a batch order process that will allow someone to order multiple assets and multiple units of each asset.

From my understanding of the IPC Server event, this event allows you to call a single instance of another process but not multiple instances. Is this correct?

Furthermore, is there a way to create, from one process, multiple instances of another process, without knowing at design time how many instances will need to be created?

Thanks for any help!

3 replies

Badge +11
Hi,

From my understanding of the IPC Server event, this event allows you to call a single instance of another process but not multiple instances. Is this correct?

True. That is, assuming you've got one or zero Destination users defined on the Activity containing the IPC event. Being a Server event, it is by default not necessary to specify a Destination user for the Activity containing the event. The number of Destination users will determine the number of child process instances to be created.

Furthermore, is there a way to create, from one process, multiple instances of another process, without knowing at design time how many instances will need to be created?

Sure, just increase the number of Destination users on the Activity containing the event. Remember, a Destination user does not HAVE to be a valid user like 'K2WORKFLOWOckert', it can be anything like 'User1', 'User2', etc. Just remember that ANY Destination user will occupy a single license if you're running on a Named User License system.

Hope this helps,
Ockert
Badge +5
I have a question about the above solution.
The K2 help document says about the Synchronous option: Select this option if you require the child workflow process to be completed before the parent workflow process can continue.

If however, multiple child instances are created, will the master workflow complete after every child instance is completed ?
Badge +11
This largely depends on the number of slots you specify on the Activity level as well as the Succeeding rule for the Activity. If you define 1 slot with no succeeding rule, the parent process will complete after the first child process returns thereby 'orphaning' the other child processes.

HTH,
Ockert

Reply