Multiple IPC server events from repeating table entries

  • 19 October 2005
  • 3 replies
  • 1 view

Badge +1
I am trying to find a way to kick off multiple IPC server events for each entry in a repeating table. In more detail, I am looking to start an Infopath form workflow for each username that is entered into a repeating table.

I have read up about this and I have heard that it is not possible to pass xml directly into an IPC server event but is there another way round?

Currently, I am looking at setting up a username input datafield, a row count datafield (that will store the number of entries in the repeating table), and a row number datafield that will be iterated in a loop until it reaches the row count. The loop will have set and reset events either side of the IPC server event to effectively create this loop. This should mean that I can start an IPC server event for each entry.

However, this does not seem a particularly neat way of doing this so I was wondering if anyone has done anything similar and could give me any pointers...

Thanks very much in advance for your help and suggestions.

Tom

:)

3 replies

Badge +9
Hi T,

If you have an Activity with an IPC Event it is regarded as a Server Activity and normally no destination users are required, however if you specify 3 destination users in the destination rule you will find that the IPC will execute 3 times (Once for each Destination User). The reason for this is that K2.net creates a copy of the activity for each destination user (Object Name: KO.ActivityInstanceDestination). Code some dynamic logic into the destination rule to assign a destination user for each user name in the repeating table.

Let me know if you have questions.
Badge +1
Thanks Renier, I will look to do it this way.

How will I pass in the information from this repeating table entry. In other words, how do I get hold of the destination for each new process kicked off by the IPC event?

Thanks again for your help.

Tom :)
Badge +9
No actual user interaction is required on the activity with the IPC event; the child process will start as per normal and do what it is configured for. Do you need to use the actual user name in the child process? You can bind data fields in the IPC event with a bit of custom coding to get the Destination User Name.

'Get User Name 
K2.ProcessInstance.DataFields("MyUser").Value = K2.ActivityInstanceDestination.User
'Set The DataField Mappings
K2.BindField(IPCBindType.ProcData, "MyUser", "MyUser", IPCBindDirection.InOut)

Reply