Getting child process IDs after IPC Event

22 Jul

I like IPC events and use them all the time – if you design your processes well with IPC events then you can keep them small and manageable, and each time you get to an IPC event your process is bumped up to the latest version so it’s easier to propagate bug fixes. However I recently needed to keep track of the child process IDs and I realised that you can’t do this using the IPC event wizard. I tried to map the child process ID to an activity level data field in the parent process but unfortunately I couldn’t add the process ID field from the child process as a source.

So how can you do it?

My implementation was to pass the parent process ID into the child process, and then write these IDs to a database in the first activity of the child process:

Child Process

Another way to do it is to include the parent process instance ID in the folio of the child process, then when you retrieve the worklist you can filter the worklist by folio. This is a simple way of doing it but isn’t the most efficient.

Hope that helps.


Posted by on July 22, 2011 in K2 Workflows


2 Responses to Getting child process IDs after IPC Event

  1. Kim

    August 10, 2011 at 8:21 pm

    are you using these processIds in the DB to be able to cancel parent & child process instances?

  2. Trent Jacobs

    August 12, 2011 at 8:32 am

    Hi Kim,

    We are using them for that purpose, but in this instance the application drives the workflow as opposed to the workflow driving the application. This means that the business objects are process aware, and a loaded object will contain the process instance ID which we use to get tasks associated with that business object. This is the main reason we’re doing it this way.

    Thanks for reading 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *