Do WF Orchestrations only run once?

There is an HD WF Orchestration on a base WF when Header goes New β†’ Open on effective date, details follow. My subflow interjects then. We have a process where that Transition happened and then we add another detail. If the Header is sitting in Open and we add a detail will it get picked up by the orchestration or will it only run once?

If the header and details are coupled by an orchestration such that when the Header transitions from New β†’ Open, the Details transition from New β†’ Open, adding details (with a workflow state of New) while the header is at Open will automatically orchestrate those details to Open.

While it isn’t immediately clear what the Subflow is accomplishing, I expect it will intercept the header’s transition to Open and actually take the header through some other path (but ultimately exit to Open). If the subflow itself is inserting detail records at a New state, the orchestration from the header should run when exiting the subflow and entering an Open state, at which point the details should transition.

Does that help/answer your question? Short answer: yes, adding details while the header is Open will orchestrate them to Open.

After some follow-up discussion, the expected behavior is that adding a new detail record while the header is at an Open state will cause that detail to orchestrate from New to Open (if the workflow has those orchestrations built, of course). The current scenario is as follows, and the subflows are not interfering with the behavior in this case. Credit to @brigid.mulligan for the added context.

Detail has a single workflow transition from New to Open. This is orchestrated by an orchestration definition with Orchestrating Table = Header, Target Table = Detail, and header state/state type of Open/Active.

  • The header is in a state of New and has details in the state of New
  • Moving header to Open kicks the orchestration and moves all details from New to Open
  • Add a detail record (at New) while the header is at Open, then save
  • Newly-added detail will orchestrate to Open after save

In other words, the header orchestration keeps opening details as they get inserted as opposed to running a single time:

  1. When the driving record transitions to Open, the system checks if it should orchestrate any other records
  2. When the target record is inserted at New, the system checks if there are any valid orchestration transitions to follow

In a scenario where there are multiple chained orchestrations, the following is true:
Scenario:

  • Header has transitions from New β†’ Ready To Open β†’ Open, and each transition orchestrates details to Ready To Open and Open, respectively
  • Per the above, if the header is at Ready To Open and a detail is inserted at New, that detail will orchestrate to Ready To Open

Examples:

  1. If the header is at Open and user inserts a detail at New, the detail will not orchestrate and will remain at New. This is because the header is not at the orchestrating state, Ready To Open, that would cause the detail to transition from New.
  2. If the header is at Open and a user inserts a detail at New, then uses a logic block queued transition to Ready To Open, the detail will then orchestrate to Open automatically. This is because the header is currently at the orchestrating state of Open that causes the detail to transition from Ready To Open.
1 Like