Orquesta Workflow Join failed

Hello all,

I try to write multi branches Qrquesta,

For example

task1:
  action: pack1.tasks1
  next:
    - when: <% result().result.result1 > 0  %>
      do: task2
    - when: <% result().result.result1 = 0 %>
      do: task3
task2:
  action: pack1.task2
  next:
    - when: <% succeeded() %>
      do: task4
task3:
  action: pack1.task3
  next:
    - when: <% succeeded() %>
      do: task4
task4:
  action: core.noop
  join: all

There will be a exception when task2 or task3 is not running due to not satisfy the condition.

UnreachableJoinError: The join task|route \"task4\" is partially satisfied but unreachable

Is there another way to meet the logic?
I have to write as following order:

task1
task4
task2 when task1 result meet condition
task3 when task1 result meet condition ```

Hi,

in your concrete example from my point of view, you don’t need to join as there is always only one route.
In general you can define join: <integer> to specify the minimum tasks that need to be joined. It is described in the docs here: Orquesta Workflow Definition — StackStorm 3.5.0 documentation

An alternative use case of join is to specify an integer value such as join: instead of join: all. In this use case, the join is satisified when the number of tasks transitioned into the join is greater than or equal to the value specified.

Greets.

Hi,
Thank you for your reply.
It is clear that join: 1 does not qualify, if the input of task4 depends on the both result of task2 and task3.
And if I remove the join:all it will cause task4 run two time.
The real example is definitely more complex than this model. There will be task5, task6 or more.
Anyway, I would try this sample qrquesta using join: 1 or remove join. and post result later.

I test join: 1 and remove join, task4 is run twice when task2 and task3 all execute. This is the obvious result
I think I should avoid multi branches in the middle of orquesta.