cancel
Showing results for 
Search instead for 
Did you mean: 

End Workflow

sanjaybandhaniya
Elite Collaborator
Elite Collaborator

I have created custom workflow with 5 step.

On 2nd step(it might be 3rd step or 4th step-base on some condition) I want to end workflow.

Is there any way to do this?

This workflow end is not from task form.It is from my java webscript or some where else.

5 REPLIES 5

krutik_jayswal
Elite Collaborator
Elite Collaborator

Actually it depends on bpmn file, and how the workflow has been designed.If the workflow is on 2nd step and there are further more task in the workflow then you need to manually(by javascript code) end all task.Other way will be redesign workflow and have one more sequence flow which will be towards the ending of workflow and have a condition in the sequence flow.

abbask01
Star Collaborator
Star Collaborator

A simpler way would be to add a signal boundry event on each user task and call the signal from your java code/listener using the process instance id.

Regards,
Abbas

I want to complete workflow using webscript not using listner.

svijay
Champ on-the-rise
Champ on-the-rise

In your webscritp you can use 

serviceRegistry.getWorkflowService.endTask(taskId, null);

I want to end workflow,not task.