How to stop a sub task in studio

Hi All,

I have Main task(test.xaml) in which there is a sub task(test1.xaml).
In test1.xaml task i have encountered an issue , so i want to stop the task in the test1.xaml , log a info stating that an error has encountered and later the code in test.xaml should be executed. How can i do this?
Please me on it.
Thanks in Advance.

1 Like

hi @ppratz,

invoke test1.xmal in try catch and in catch block write activity to log your message.
after that code of text.xmal will be continued

Thank you
Shubham Pratap


You can use Try Catch Activity, in Try place your logic, If there is a exception then you can paste your logic in catch

Hope this helps


Hi @Srini84 and @Shubh1801

But based on some if conditions statements , the if code passes through a variable in it , it should stop the test1.xaml and then move to test.xaml and perform further activities in it.

Hi @ppratz,

Use throw to exit the flow, or in-place of if loop use flow decision and do not add any flow in false node, this will exit workflow

Thank You,
Shubham Pratap


May i know are you using reframework or only by sequences?


I’m using the sequences only.


Below is the sample flow

SubProcess is surronded with Try Catch, Assign a variable of SubProcess=“True”, In Catch Assign subProcess=“False”

By this make a decision If it True, it will not do anything, If it false then it will trigger Test flow

Hope this is clear,

Mark as solution if this helps


1 Like