◷ Reading Time: 3 minutes
Introduction
Orchestration is the automated arrangement, coordination, and management of multiple logic documents in order to produce a desirable outcome. When you have multiple logic documents and would like to connect them together and run them as ‘one piece, you need to model your orchestration logic.
There are multiple ways of orchestrating logic documents:
- Using flow
- Using a Decision Graph – DRG
- Coding the Collection of logic documents
Flow
Flow logic is a classic example of orchestrating multiple logic documents. You can use any type of logic in a flow:
- Validation/Procedural Tree
- Flow (other flows – SubFlow)
- Decision Graph (DRG)
- Natural Language (NL)
- Decision Table (DT)
- Direct expression with no specific logic document (as an activity in flow)
- Custom code
Flow is good to orchestrate logic documents based on order of execution.
Decision Graph
Opposite to Flow, a DRG or Decision Graph (a part of DMN) is a good way to orchestrate logic documents based on dependencies. You can orchestrate the logic documents below:
- Validation Tree
- Natural Language (NL)
- Decision Table (DT)
- Decision Graph (other DRGs – SubDRD)
Programmatically
In this approach, you just call the logic documents one-by-one inside your code. When the orchestration logic is simple (i.e., a simple sequence of logic with no transitioning conditions), then you can use this approach.

Here are the steps:
- Create an engine for each document
- Inside a loop, call the Run method of the engine
Below is the sample code for this approach:
var documents = new[] {"Rules\\Validation.xml", "Rules\\Calculation.xml"};
var engines = documents.Select(doc => RuntimeEngine.FromXml(System.IO.File.OpenRead(doc)));
foreach (var engine in engines)
engine.Run();
Follow the lines below for the code description:
- create a list of all of the logic documents you want to process.
- create engines for each of the logic documents. You don’t need to repeat this process. Once they are created they can be reused.
- Run your logic documents in a loop.
- If required, you can use another overload of the Run method to pass objects in and update the objects.