Identify the Process instance ID of a cancelled process for re-triggering the instance

Hello !

I have a requirement to re-trigger a specific process model instance, that is cancelled automatically as part of a existing process. The specifics in this is that I would need to achieve this via a process model automatically. I can use the Resume or Start Process smart service for achieving this but the smart service expects the process ID.

I have the process name, process model ID, process model UUID and the employee ID that is used as part of the process as a process variable. Using these, is there a way to identify the process instance ID?

Thanks !

  Discussion posts and replies are publicly visible

Parents
  • Assuming the canceled process instance hasn't already been archived, I think what you could do is create a report where your process model is the context that would contains all the necessary fields (in your case, at least pp!id) and add a filter that matches based on Employee ID.

    Once you have the above set up, you can use the smart service called "Execute Task Report" (where the report I mentioned above you would have to create is the context) before "Start Process" smart service in a newly created process model to start that canceled process instance.

    Note: If filtering on employee ID returns multiple instances, then you'll need an additional filter like something below:

    1. not(isnull(process_completion_time()))
    2. num_cancelled_tasks() <--- this is a process metrics function (will probably need more to do than just the function itself)
Reply
  • Assuming the canceled process instance hasn't already been archived, I think what you could do is create a report where your process model is the context that would contains all the necessary fields (in your case, at least pp!id) and add a filter that matches based on Employee ID.

    Once you have the above set up, you can use the smart service called "Execute Task Report" (where the report I mentioned above you would have to create is the context) before "Start Process" smart service in a newly created process model to start that canceled process instance.

    Note: If filtering on employee ID returns multiple instances, then you'll need an additional filter like something below:

    1. not(isnull(process_completion_time()))
    2. num_cancelled_tasks() <--- this is a process metrics function (will probably need more to do than just the function itself)
Children