Monetize360

Run Sub-Workflow

Run another workflow from within this workflow

Run Sub-Workflow

Run another workflow (called a sub-workflow) from within your current workflow. This lets you reuse common workflows and keep your main workflow organized and easy to understand.

Technical Name: SubFlowFunc

Properties

  • Execution Mode: SYNC
  • Type: NATIVE
  • Category: System Functions
  • Function ID: 8e9b1ea8-5d9a-4f2b-a8f6-8f6b5d9a1eb0

Input Schema

Required Parameters

ParameterTypeDescription
mflowIdstring (uuid)ID of the subflow to execute
dataobjectInput data to pass to the subflow's Start node

[Image placeholder: SubFlow configuration panel]

Input Example

{
  "mflowId": "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
  "data": {
    "customerId": "cust-123",
    "orderId": "ord-456",
    "action": "process"
  }
}

Output Schema

FieldTypeDescription
idstring (uuid)ID returned by the subflow's End node
dataobjectData returned by the subflow's End node

[Image placeholder: SubFlow data flow diagram]

Use Cases

Modular Workflow Design

Break complex workflows into reusable subflows:

Main Flow:
  Start → ValidateInput → SubFlow(ProcessOrder) → SubFlow(SendNotification) → End

ProcessOrder Subflow:
  Start → CalculateTotals → InsertOrder → UpdateInventory → End

Reusable Business Logic

Create reusable subflows for common operations:

{
  "mflowId": "validate-customer-subflow-id",
  "data": {
    "customerId": "${start.output.customerId}",
    "validationType": "full"
  }
}

Best Practices

  1. Single Responsibility: Each subflow should have one clear purpose
  2. Clear Contracts: Define explicit input/output schemas
  3. Error Handling: Handle errors at appropriate levels
  4. Documentation: Document subflow purpose and parameters
  5. Versioning: Maintain subflow versions for backward compatibility

Benefits

  • Modularity: Break complex workflows into manageable pieces
  • Reusability: Use the same subflow in multiple parent flows
  • Maintainability: Update logic in one place
  • Testing: Test components independently

[Image placeholder: SubFlow benefits visualization]