Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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

Avatar

Level 1

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

1 Reply

Avatar

Administrator

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



Kautuk Sahni