Skip to main content

SubWorkflow

Sub-Workflow Trigger – Start Workflows from Other Workflows

Summary (SEO Meta Description):
The Sub-Workflow Trigger in WeHub allows a workflow to be invoked by another workflow.
Configure it with schemas or manual input/output fields to modularize workflows and return structured results.


Overview

The Sub-Workflow Trigger defines a workflow entry point that can be invoked by another workflow.
It enables workflow modularization, reuse, and clean separation of logic.

It supports two modes:

  • Schema-based mode → Enforce structured inputs/outputs with truncation support.
  • Manual mode → Add custom fields (name, path, type) without using a schema.

⚙️ Configuration Options

FieldTypeDescription
LabelStringCustom name for the trigger node.
Using Schema for Inputs/OutputsBoolean (Toggle)If enabled, inputs/outputs must follow a schema.
Schema (if enabled)SchemaSelect schema to validate inputs/outputs.
Truncate Fields (if enabled)BooleanToggle to truncate long field values.
Truncate Level (if enabled)IntegerDefines the maximum allowed field size.
Manual Fields (if schema off)Name (String), Path (String), Type (Enum)Add custom input/output fields manually. Multiple fields can be added.

Supported Data Types for Manual Fields

  • NUMBER
  • STRING
  • BYTE
  • DATE
  • DATETIME
  • BOOLEAN
  • OBJECT
  • ARRAY
  • ANY

💡 Example Use Cases

  • Reusable Logic → Create a sub-workflow for validating patient data, callable by multiple parent workflows.
  • Schema Enforcement → Use schema-based mode for strict validation and truncation of input/output fields.
  • Custom Mapping → Use manual mode to define ad-hoc input/output fields when schemas are not needed.
  • Performance → Truncate large payloads to avoid bottlenecks in high-volume workflows.

FAQ

Q: When should I use schema vs manual fields?
A:

  • Schema mode → Use when you need consistency and validation across workflows.
  • Manual mode → Use when inputs/outputs vary per workflow or schema enforcement isn’t required.

Q: What happens if Truncate Fields is enabled?
A: Field values longer than the configured Truncate Level are shortened before entering the workflow.

Q: Can I mix schema and manual fields?
A: No. You must choose either schema-based configuration or manual fields.


Keywords: WeHub Sub-Workflow Trigger, Workflow Modularization, Schema vs Manual Fields, Sub-Workflow Input Output, Workflow Reuse