We are using some startup process to setup some global variables, credentials etc used all across a Workflow configuration.
In the event that a startup process fails for any possible reason, is there a way to stop stop the workflow server start and fallback to the previous configuration\stop the workflow server completely? The only options in the error tab are the same for other normal processes:
- stop process
- stop branch
- default
All these options won’t prevent the Workflow Server from starting and a misconfigured global variable scope would seriously mess up everything.
Create a separate process, called for example Critical Error
. It will be responsible for error handling so needs to use Input Error bin
task as input. Then, use External Program
task to execute sc.exe
to shut down Workflow service. For executable, use c:\windows\system32\sc.exe
, for parameters: stop PPWatch8
. It should look like:
In the startup process open On Error
tab of the task you want to check for errors, tick Send to process
and select Critical Error
from the dropdown. Make sure that Stop process
is selected as an action.
Now when the selected task in the startup process fails the startup process will stop and on error process will execute shutting down the workflow service.
1 Like