# Is there any way to set skip expression of task using java code

**URL:** <https://forum.flowable.org/t/is-there-any-way-to-set-skip-expression-of-task-using-java-code/7708>\
**Category:** Flowable Engine\
**Created:** [April 8, 2021, 6:44am UTC](https://forum.flowable.org/t/is-there-any-way-to-set-skip-expression-of-task-using-java-code/7708 "2021-04-08T06:44:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://forum.flowable.org/u/sagar)\
**Post date:** [April 8, 2021, 6:44am UTC](https://forum.flowable.org/t/is-there-any-way-to-set-skip-expression-of-task-using-java-code/7708/1 "2021-04-08T06:44:49Z")

</div>

I have checked that if we want to skip any task then we are setting skipExpression property from the flowable modeler.

But is there any way to set this skipExpression using java code?

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [April 13, 2021, 2:33pm UTC](https://forum.flowable.org/t/is-there-any-way-to-set-skip-expression-of-task-using-java-code/7708/2 "2021-04-13T14:33:47Z")

</div>

You mean you want to change the model (add a skipExpression to the definition)? You can get the definition as BpmnModel through the RepositoryService. In java, you can add stuff and redeploy.

---

<div class="post-metadata">

**Author:** ![sagar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sagar](https://forum.flowable.org/u/sagar)\
**Post date:** [April 14, 2021, 2:19pm UTC](https://forum.flowable.org/t/is-there-any-way-to-set-skip-expression-of-task-using-java-code/7708/3 "2021-04-14T14:19:28Z")

</div>

Hi @joram, Thank you for the response,

Q- you want to change the model (add a skipExpression to the definition)?

Something like that, we want to set skip expression from the java side and we want to skip the task.  
but it must redeploy workflow right? or is there any other way to set this expression and skip task without redeploying workflow?

~Thanks!
