Workflow running twice

WA1
Kilo Sage

Hello, 

I have a first workflow "(Arkea) CHG - Intégration STD" that calls another workflow "(Arkea) CHG - Intégration STD" when "Approbation du package" is approved like it's shown here : 

WF 1.PNG

Here are the conditions to start the second workflow "(Arkea) CHG - Intégration STD" : 

WF 2 CD.PNG

When I test, the first workflow works fine but the second one is launched twice which causes the last activity to be canceled as shown here : 

Test WF.PNG

Test WF 2.PNG

I tried to change the conditions but nothing works, it's always executed twice.. 

1 ACCEPTED SOLUTION

WA1
Kilo Sage

The solution to resolve this is to add a "Join activity" before the "Wait for condition" in the workflow that calls the workflow that was duplicated. 

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Most likely this happens because you call the sub workflow once from the main workflow and it triggers second time because of the trigger itself - what i mean is :

1 - you start main wfl

2 - sub wfl called (once)

3 - but the actual trigger conditions are met on the database level (the record - the change record) - meaning the conditions are the same and it is triggered again - as the Wfl framework cannot know it was already ran once and triggeres it second time.

 

You can use inputs to narrow this down - try this doc for how to use inputs in sub flow

Hello, 

Even if I don't put any conditions to run the WF, it's still running twice. 

WA1
Kilo Sage

The solution to resolve this is to add a "Join activity" before the "Wait for condition" in the workflow that calls the workflow that was duplicated.