[BPT] Resume Suspended Processes

[BPT] Resume Suspended Processes

  
I have a relatively big BPT based application...
When I publish the solution almost all of the active instances get Suspended. This is due to a change in the code: a conditional branch was merged in the main flow of one of the processes. Basically all instances are waiting for a human decision (human activity) that is placed before the new branch, so there are no errors in the activities.
After publication of the solution I have to go to Service Center and manually resume all instances one by one.

Is there a way to resume all instances automatically?

Thanks in advance!
Hi José,

You can implement your own process manager to do these tasks in bulk.
Reference the following System entities:

Now you can use an advanced query to bulk update the suspended processes and resume them. Refer to the online help for more help about processes and also on the processes API.

DISCLAIMER:
Use this with EXTREME CAUTION!
Resuming processes in bulk may have unwanted effects if you don't do it properly (e.g not selecting the right processes).
This is not an official OutSystems recommendation!

Cheers,
André

Hi André

So if we update all processes in status 4 (suspendes) to status_id 1 (active) the platform will resume all processes the same way as if they were resumed via UI in service center? Also, is it necessary to update suspended_date to nulldate and suspended_by to null?

Thanks
Miguel Vaz
Hi Miguel,

Yes the process will resume.

DISCLAIMER:
Use this with EXTREME CAUTION!
Resuming processes in bulk may have unwanted effects if you don't do it properly (e.g not selecting the right processes).
This is not an official OutSystems recommendation!

You should not change any other value.

Cheers,
André 
Hi Miguel, I'm really interested on the results of this operation. Are you doing this till now? Did you find any other solution? Did you experienced any side effect of doing this?
Hi João,

Yes, we are still using this aproach when publishing suspends a lot of processes and have not experienced any side efects. Before doing the resume through the database, we always make sure that the processes can be resumed with no impact being aware of the changes made to it.

Cheers,
Miguel
Ok, thank you very much Miguel.
Miguel, how do you accomplish the update? is it via a Timer with 'When publish' schedule?
I João,

Tipicaly we use adhoc querys to inspect what processes are suspended because we dont want to resume every suspended process on the platform after some publishing operation. 
We have alse build a page with report to inspect suspended processes and filter by its type definition with the capability to resume their instances.
I think you can use the On Publish Timer to resume the processes but i am not sure if it will conflict with the finalising stages of the publish operations when it unsuspends some processes.


Ok, thank you very much for the atention.