The CreatorCon Call for Content is officially open! Get started here.

How to not have a failover task getting created unless first task actually fails?

snow_beginner
Mega Guru

Hi,

I need help with preventing a failover task from generating unless the OIM task actually fails.

We currently have catalog items, which generate a RITM, once the approvals are done 2 tasks are generated which are:

 

task 1: company=OIM, type = vendor, state = closed incomplete >  when this fails a second task should generate

task 2: type = internal, assignment group = some group, state=open

 

What is happening currently is that both tasks are generating, but task 2 is generating before task 1 fails. Can you help me figure out where in the workflow and subflow I can fix  this issue please. Below are picture of the workflow and subflow

 

workflow:

 

Screenshot 2025-10-14 150949.png

 

The flow goes like this above. I think its somewhat clear what is happening with the arrows except in the subflow success activity so I will explain. If subflow success = yes > goes to if manual task needed?. if subflow success = no > it goes to if validation error. Let me know if you need me to expand any activity.

 

Subflow:

 

1.png

2.png

3.png

4.png

 

Let me know if you need any information about whats in each activity of the subflow.

Please help as I am not sure where I can make a wait for success activity since the workflow already has a if subflow success activity which seems to be wired correctly. Thanks

 

1 REPLY 1

nityabans27
Giga Guru

Hi @snow_beginner,

 

You need to return an explicit output variable from the subflow that indicates whether the OIM process actually failed, and then use that variable in your main workflow’s “If” condition to decide whether to create the failover task.

Step 1: Modify the Subflow

In your OIM subflow, after you detect that the OIM task has failed (API response or vendor reference validation failed), set an output variable like this:

 

Outputs.OIM_Failure = true;

And if it’s successful:

 

Outputs.OIM_Failure = false;

You can add this as a new Subflow Output Variable:

  • Name: OIM_Failure

  • Type: Boolean

  • Default: false

Step 2: Update the Workflow “If” Condition

In your main workflow, locate the branch where you currently have:

If Subflow success = Yes/No

Replace or extend that logic to use your subflow’s output instead:

If OIM_Failure == trueCreate failover (internal) Catalog Task Else → Proceed with completion.
That way, the internal/failover task only generates after the subflow confirms the vendor task failed.