End Workflow

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Senior Member II

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.

Thanks & Regards,
Sanjay
5 Replies
Highlighted
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.

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

Re: End Workflow

I want to complete workflow using webscript not using listner.

Thanks & Regards,
Sanjay
Highlighted
Active Member

Re: End Workflow

In your webscritp you can use 

serviceRegistry.getWorkflowService.endTask(taskId, null);

Highlighted
Senior Member II

Re: End Workflow

I want to end workflow,not task.

Thanks & Regards,
Sanjay