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
@Shubh1801

@ppratz

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

Thanks

Hi @ksrinu070184 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

@ppratz

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

Thanks

I’m using the sequences only.

@ppratz

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

Thanks

1 Like