Highlighted

Workflow console is showing the status of workflow as "Running" even after the workflow has been terminated via code.

swarna_gowris27

02-11-2017

Hi,

I had terminated a workflow inside the process of dynamic participant step of the model.

Workflow workflow = wfSession.getWorkflow(workItem.getWorkflow().getId());

wfSession.terminateWorkflow(workflow);

But under the workflow console the status is displayed as RUNNING.

How to terminate it completely?

Or can anyone please let me know how to restrict a user from starting a workflow through code.

Regards,

Swarna

Replies

Highlighted

kautuk_sahni

Community Manager

02-11-2017

Please check your WF. There are possibilities that can occur here,

1. check the "Handler Advance" of your WF in the last step. If the advance handler is not handled in the code, then we need to select 'Handler Advance' checkbox to proceed to next step. You need to check the "Handler advance" value in the Process tab of the Process step. If the checkbox is ticked then the workflow will automatically move to the next step else you need to handle this programmatically in your process implementation.

2. If you are using a OR step do have one Default route.

3. Check if there are any errors in logs while executing the last step. Resolve the error if any to avoid incomplete WFs.

~kautuk