Process Triggers
Overview
A Trigger defines how and when a new process instance is created. FlowOn BPM provides multiple ways to initiate processes, giving you flexibility to start workflows automatically based on data changes, programmatically via APIs, or in response to business events.
| Trigger Method | Description | Use Case |
|---|---|---|
| FlowOn Logic Recipe | Automatically start processes based on CRM entity events | Data-driven automation |
| Process Action (API) | Invoke process programmatically as an action | External integrations, custom UI |
| FlowOn Events | Start process when a business event is raised | Event-driven architecture |
FlowOn Logic Recipe
Processes can be triggered automatically through FlowOn Logic Recipes. A Recipe defines what actions should happen when specific events occur on a Dynamics 365 entity.
Supported Entity Events
| Event | When It Fires |
|---|---|
| Pre Create | Before a record is created |
| Post Create | After a record is created |
| Pre Update | Before a record is updated |
| Post Update | After a record is updated |
| Pre Delete | Before a record is deleted |
| Post Delete | After a record is deleted |
Sync vs Async Execution
When triggering a process from a Recipe, you can choose synchronous or asynchronous execution:
| Mode | Behavior |
|---|---|
| Synchronous | Process starts immediately within the same transaction |
| Asynchronous | Process starts in the background; CRM operation completes immediately |
Example Recipe Configuration
Recipe: Start Loan Approval on New Application
Entity: Loan Application
Event: Post Create
Condition: Application.Status = "Submitted"
Action: Start Business Process "Loan Approval Process"
Mode: Asynchronous
For detailed information on configuring Recipes, see the FlowOn Logic Recipe documentation.
Process Action (API)
When a process has Process Action enabled, it is exposed as a callable action that can be invoked programmatically.
Enabling Process Action
When creating or editing a process, enable the Process Action setting to expose the process as an API endpoint.
Use Cases
| Caller | Description |
|---|---|
| FlowOn Logic Flow | Start a process as part of a larger automation workflow |
| Another Process | Launch sub-processes from On Entering or On Exiting automation |
| External System | Integrate with third-party applications via API |
| Custom UI | Trigger processes from custom buttons or forms |
| Power Automate | Call from Microsoft Power Automate flows |
Calling a Process Action
Process Actions can be called like any Dynamics 365 custom action:
| Method | Description |
|---|---|
| Web API | Call via Dynamics 365 Web API endpoint |
| FlowOn Logic | Use the "Run Business Process" step in a Flow |
| SDK | Invoke via Dynamics 365 SDK |
Example: Calling from a Logic Flow
Flow: ProcessNewOrder
Steps:
1. Validate Order
2. Calculate Pricing
3. RUN BUSINESS PROCESS
Process: Order Fulfillment Process
Entity ID: Order.Id
→ Store output: ProcessInstanceId
4. Update Order with ProcessInstanceId
FlowOn Events
FlowOn Events provide an event-driven approach to starting processes. When a business event occurs, an Event Instance is created, which triggers an Event Handler that calls the subscribed process.
How It Works
- Event Occurs — A business event is raised from any source (Logic Flow, Process, external system)
- Event Instance Created — An Event Instance record is created to capture the event
- Handler Triggered — The Event Handler associated with this event type is invoked
- Process Called — The handler calls the subscribed process, creating a new Process Instance
Event-Driven Benefits
| Benefit | Description |
|---|---|
| Loose Coupling | Event sources don't need to know about the processes they trigger |
| Scalability | Multiple processes can respond to the same event |
| Flexibility | Add or remove process subscriptions without changing the event source |
| Auditability | Event Instances provide a clear record of what triggered each process |
Example Event Configuration
Event Definition: OrderPlaced
Properties: OrderId, CustomerId, TotalAmount, OrderDate
Event Handler: StartOrderFulfillment
Event: OrderPlaced
Action: Start Business Process "Order Fulfillment"
Execution Mode: Async
Input Mapping:
- Process.RegardingId = Event.OrderId
For detailed information on configuring Events and Handlers, see the FlowOn Logic Event documentation.
Trigger Comparison
| Aspect | Recipe | Process Action | FlowOn Events |
|---|---|---|---|
| Trigger Source | CRM entity operations | Programmatic call | Business event |
| Coupling | Tied to specific entity | Called explicitly | Loosely coupled |
| Sync Support | ✅ Yes | ✅ Yes | Async only |
| Multiple Processes | One per recipe action | One per call | Multiple subscribers |
| Best For | Data-driven workflows | Integrations, sub-processes | Event-driven architecture |
Choosing the Right Trigger
| Scenario | Recommended Trigger |
|---|---|
| Start process when a record is created | Recipe (Post Create) |
| Start process from another process | Process Action (via On Entering/Exiting) |
| Start process from external system | Process Action (via API) |
| Start process when business event occurs | FlowOn Events |
| Multiple processes respond to same event | FlowOn Events |
| Tight coupling to entity lifecycle | Recipe |