Invocation
Invocation steps call other FlowOn Logic constructs and Dynamics 365 processes, enabling modular design and reuse.
Run Logic Block
Executes a Logic Block and returns its outputs.
| Parameter | Description |
|---|---|
| Logic Block | The block to execute |
| Block Inputs Binding | Mapping of values to block inputs |
Returns: The block's output values
Example - Formula:
RUN LOGIC BLOCK
Logic Block: CalculateOrderTotal
Block Inputs Binding:
Quantity: OrderLine.Quantity
UnitPrice: OrderLine.UnitPrice
DiscountPercent: Customer.DiscountRate
TaxRate: TaxConfiguration.Rate
→ Store outputs:
Total → LineTotal
Example - Decision Table:
RUN LOGIC BLOCK
Logic Block: DetermineShippingMethod
Block Inputs Binding:
OrderWeight: Order.TotalWeight
DestinationCountry: Order.ShipToCountry
CustomerTier: Customer.Tier
IsExpedited: Order.ExpressShipping
→ Store outputs:
ShippingMethod → SelectedMethod
ShippingCost → CalculatedCost
EstimatedDays → DeliveryDays
Example - Validation Set:
RUN LOGIC BLOCK
Logic Block: ValidateOrderForSubmission
Block Inputs Binding:
Order: Order
Customer: Customer
CreditLimit: Customer.CreditLimit
→ Store outputs:
IsValid → OrderIsValid
ValidationMessages → ErrorMessages
CONDITION: Order Valid?
Condition: OrderIsValid == true
TRUE BRANCH:
→ Continue with order processing
FALSE BRANCH:
→ Display ErrorMessages to user
→ HALT
Run Logic Flow
Executes another Logic Flow as a sub-flow.
| Parameter | Description |
|---|---|
| Logic Flow | The flow to execute |
| Flow Inputs Binding | Mapping of values to flow inputs |
Returns: The sub-flow's output values
Sub-flows enable you to break complex processes into manageable, reusable pieces.
Example:
RUN LOGIC FLOW
Logic Flow: ProcessPayment
Flow Inputs Binding:
OrderId: Order.Id
Amount: Order.TotalAmount
PaymentMethod: SelectedPaymentMethod
→ Store outputs:
Success → PaymentSuccess
TransactionId → PaymentTransactionId
ErrorMessage → PaymentError
Nested Flow Example:
# Main Flow: ProcessOrder
1. RUN LOGIC FLOW: ValidateOrderFlow
→ ValidationResult
2. CONDITION: Is Valid?
TRUE:
3. RUN LOGIC FLOW: CalculatePricingFlow
→ PricingResult
4. RUN LOGIC FLOW: ProcessPaymentFlow
→ PaymentResult
5. CONDITION: Payment Success?
TRUE:
6. RUN LOGIC FLOW: CreateShipmentFlow
→ ShipmentResult
7. RUN LOGIC FLOW: SendConfirmationFlow
Run Process Action
Executes a Dynamics 365 custom process action (Custom API or Action).
| Parameter | Description |
|---|---|
| Process | The process action to execute |
| Process Inputs Binding | Mapping of values to action inputs |
Returns: The action's output parameters
Example:
RUN PROCESS ACTION
Process: new_CalculateCommission
Process Inputs Binding:
Target: SalesOrder
SalespersonId: Order.OwnerId
Period: "Q4-2024"
→ Store outputs:
CommissionAmount → CalculatedCommission
CommissionRate → AppliedRate
Run Process Workflow
Executes a Dynamics 365 background workflow.
| Parameter | Description |
|---|---|
| Workflow | The workflow to execute |
| Entity | The entity type the workflow runs against |
| Entity ID | The record to run the workflow on |
Background workflows run asynchronously. The step returns immediately and the workflow executes in the background.
Example:
RUN PROCESS WORKFLOW
Workflow: Account Approval Workflow
Entity: Account
Entity ID: NewAccount.Id
Run Business Process
Starts a FlowOn BPM process instance.
| Parameter | Description |
|---|---|
| Business Process | The business process definition to start |
| Entity ID | The record to associate with the process instance |
Returns: The new process instance ID
Example:
RUN BUSINESS PROCESS
Business Process: CustomerOnboardingProcess
Entity ID: NewCustomer.Id
→ Store output:
ProcessInstanceId → OnboardingInstanceId
Best Practices
Design for Reusability: Create Logic Blocks and sub-flows that can be reused across multiple parent flows.
Keep Interfaces Clean: Define clear, minimal inputs and outputs for called constructs. Don't pass more data than needed.
Handle Sub-Flow Failures: Always check the outputs of called flows and blocks, especially success/failure indicators.
Avoid Deep Nesting: Too many levels of sub-flows become hard to debug. Keep the call hierarchy reasonably flat.
Document Dependencies: Make it clear which flows call which other flows/blocks to understand the full execution chain.
Use Blocks for Calculations: If you need to perform a calculation, use a Logic Block rather than embedding the formula in the flow. This makes it reusable and testable.
Consider Transaction Boundaries: Sub-flows typically run in the same transaction as the parent. Be aware of this for error handling and rollback scenarios.