Terminate Workflow- No popup Required

Hi Team,

I have to invoke two workflows. After executing the first workflow and if it doesn’t satisfy a condition (not any exception) then it has to terminate workflow and should not execute the second workflow . And I do not require the “Automatic popup” by Terminate workflow here.

Can you please help here

Hi @Teenu,

We can do that in many ways, but thinking it in a logical coding way, just a few steps here to follow

  1. Declare a new variable as a boolean in the first workflow and assign it to true.
  2. If the first workflow executes successfully at the ending of the first workflow change the value to false.
  3. Then take it out of the first workflow using argument and
  4. Use if condition to check whether the variable is true or false…
  5. And run the second workflow based on the variable

Try this… It is one of the solution and easy to implement as well

1 Like

Sure Hareesh, I will try this. Thank you so much for the detailed steps.

I guess there is no way to use Terminate workflow activity itself and hide the popup

1 Like

Hi @Teenu,

You can use throw exception instead of terminate workflow.

Put the whole process into the Try catch activity. Where you want terminate the workflow, you can throw the new exception like ‘BusinessRuleException’ and catch it in the catch block by ‘exception.BusinessRuleException’. Put some log for your reference in the catch block.

So you can skip the whole workflow like Terminate Workflow

Thanks,
Michael Udhaya

1 Like

Hope this would help you buddy @Teenu
invoke your workflow within a try catch block and use that try catch block within a try catch block buddy that would terminate the workflow without any popup…for more info on this

Cheers

1 Like

I have tried this solution, popup message doesn’t show up and for not invoking the next workflow -I have to declare a variable and check accordingly,right?

Thank you so much. Issue is resolved.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.