How to stop the next task of a flow - not with conditions... as I need else | XM Community
Skip to main content
Question

How to stop the next task of a flow - not with conditions... as I need else

  • February 19, 2025
  • 3 replies
  • 26 views

Forum|alt.badge.img+3

Is there a secret code :) to put in a code task that will end the workflow if a specific criteria is or isn’t met? something like endWorkflow: true or false and it will actually not continue to the next tasks in the workflow? thanks ​@TomG  ​@Nam Nguyen 

3 replies

Nam Nguyen
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • QPN Level 8 ●●●●●●●●
  • 1090 replies
  • February 19, 2025

 

deveer2024 wrote:

Is there a secret code :) to put in a code task that will end the workflow if a specific criteria is or isn’t met? something like endWorkflow: true or false and it will actually not continue to the next tasks in the workflow? thanks ​@TomG  ​@Nam Nguyen 

@deveer2024 There is no secret code to DIRECTLY end the Workflow but you can acctually put a condition between the task and set it according to the previous CodeTask. Like this

Hope it helps


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5909 replies
  • February 19, 2025

@deveer2024,

If a task returns a status or data, you can base the next condition on what the previous task returns.


Forum|alt.badge.img+3
  • Author
  • Level 2 ●●
  • 29 replies
  • February 19, 2025

@TomG and ​@Nam Nguyen  thanks a lot, truly,. My issue is  I need if X then do Y and if Y then do Z, and there’s no ELSE option… only if I do it in a code. Also, I’m having hard time to add conditions, for some reason if the workflow is built in many cases I can only add task….