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)
  • The process report doesn't depicts all the active instances rather depicts only one instance. The filter and criteria are correct but I thought it depicts all the instances of that process but doesn't seems to the case. Any thoughts on this?
  • 0
    Certified Lead Developer
    in reply to Bala
    You most likely have a configuration issue with your process report, then. If you'd be able to post screenshots of your configuration details (report context, filtering, etc), we can probably help figure it out.
Reply Children