End Workflow

cancel
Showing results for 
Search instead for 
Did you mean: 
sanjaybandhniya
Intermediate

End Workflow

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
krutik_jayswal
Senior Member II

Re: End Workflow

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
Senior Member

Re: End Workflow

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
sanjaybandhniya
Intermediate

Re: End Workflow

I want to complete workflow using webscript not using listner.

svijay
Active Member

Re: End Workflow

In your webscritp you can use 

serviceRegistry.getWorkflowService.endTask(taskId, null);

sanjaybandhniya
Intermediate

Re: End Workflow

I want to end workflow,not task.