How to skip a task?

We have a process-instance running and we have a requirement to select a task and skip the task. Could you please let us know any example or ways to achieve this functionality.?

Thanks
Vamsi

Hey @Vamsi,

If it is always the same task you want to skip, consider putting that logic into your model. (e.g. by using a gateway)

A nother possibility is to use the process instance modification API.
https://docs.camunda.org/manual/7.7/user-guide/process-engine/process-instance-modification/
This topic was also discussed in this thread: Skip Task in Camunda Using ProcessInstanceModification

I hope that helps you!
Cheers,
Miklas

HI Miklas,

Its not always the same task. The user can select any task and he should be able to skip. The requirement is that a process instance is running and i want to select a task and want to skip this. But the documentation says that is not possible with in the same process instance. Could you please provide some examples and other pointers if any?

Thanks
Vamsi

Hi @Vamsi,
you can not modify the process instance from within the instance, that’s correct.
What about modeling that behavior with BPMN? Add a gateway before every skippable task and bypass the task if it was selected by the user.

Cheers,
Miklas