Conditional Routing in Process Step
Hi,
I have a requirement where I need to create a workflow based on the below model. I need assistance in coming to a solution in designing the model after "Process Permissions" Step.

The process permissions step will provide me a result from an external end point. If the result is success, then I should carry out the steps defined in the "success" flow otherwise "Failure" flow should be invoked.
How can I invoke the either of the flow in my "Process Permissions" Step.
I was going through API and encountered workflowtransitions.setTo() method. But I am not able to get any code samples of how to implement this.
Is there any other way to achieve the required functionality?
Thanks in Advance.
Thanks,
Sumit Kulkarni
