Sub-Workflow Trigger
Introduction
The WeHub Dashboard offers a variety of plugins to enhance and automate your workflows. These plugins are categorized into three types: Triggers, Processors, and Apps. This documentation provides an overview of the "Sub-Workflow Trigger" plugin, which falls under the Triggers category.
Sub-Workflow Trigger Plugin
The "Sub-Workflow Trigger" plugin is used to handle sub-workflows within your main workflow. This plugin provides three actions: Trigger, Output, and Invoke. Each action has specific configuration requirements.
Actions
1. Trigger
The trigger for running sub-workflows.
Configuration
- Label: A descriptive label to identify this action within your workflow.
If the "Using schema for outputs/inputs" toggle button is turned on, provide the following configuration:
- Schema: Select the schema.
If the "Truncate Fields" toggle button is turned on, provide the following configuration:
- Truncate Level: Input the truncate level.
If neither toggle button is selected and the "Add" button is clicked, provide the following configurations:
- Name: Input the name.
- Path: Input the path.
- Type: Select the type (Types are
INT32
,INT64
,FLOAT32
,DOUBLE
,STRING
,DATE
,DATETIME
,BOOLEAN
,OBJECT
,ARRAY
,ANY
).
Configuration Steps
- Label: Provide a meaningful label for this action. For example, "Start Sub-Workflow".
- Using schema for outputs/inputs (optional):
- Schema: Select the schema.
- Truncate Fields (optional):
- Truncate Level: Input the truncate level.
- Add (if neither toggle button is selected):
- Name: Provide the name.
- Path: Provide the path.
- Type: Select the type from INT32, INT64, FLOAT32, DOUBLE, STRING, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY.
Example Configuration
Configuration Fields:
- Label: Start Sub-Workflow
- Using schema for outputs/inputs:
- Schema: MySchema
- Truncate Fields:
- Truncate Level: 100
- Add:
- Name: outputField
- Path: /data/output
- Type: STRING
Example Usage
Let's consider a scenario where you want to configure the Trigger action to start a sub-workflow with specific outputs and inputs using a schema.
Configuration Input:
- Label: Start Sub-Workflow
- Using schema for outputs/inputs:
- Schema: MySchema
- Truncate Fields:
- Truncate Level: 100
- Add:
- Name: outputField
- Path: /data/output
- Type: STRING
2. Output
Save output of workflow in it.
Configuration
The configuration for this action is exactly like the Trigger action.
- Label: A descriptive label to identify this action within your workflow.
If the "Using schema for outputs/inputs" toggle button is turned on, provide the following configuration:
- Schema: Select the schema.
If the "Truncate Fields" toggle button is turned on, provide the following configuration:
- Truncate Level: Input the truncate level.
If neither toggle button is selected and the "Add" button is clicked, provide the following configurations:
- Name: Input the name.
- Path: Input the path.
- Type: Select the type (Types are INT32, INT64, FLOAT32, DOUBLE, STRING, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY).
Example Configuration
Configuration Fields:
- Label: Save Sub-Workflow Output
- Using schema for outputs/inputs:
- Schema: MySchema
- Truncate Fields:
- Truncate Level: 100
- Add:
- Name: resultField
- Path: /data/result
- Type: STRING
Example Usage
Let's consider a scenario where you want to configure the Output action to save the output of a sub-workflow with specific fields using a schema.
Configuration Input:
- Label: Save Sub-Workflow Output
- Using schema for outputs/inputs:
- Schema: MySchema
- Truncate Fields:
- Truncate Level: 100
- Add:
- Name: resultField
- Path: /data/result
- Type: STRING
3. Invoke
Invoke sub-workflow in your main workflow.
Configuration
- Label: A descriptive label to identify this action within your workflow.
- Sub Workflow: Select the sub-workflow to invoke.
Configuration Steps
- Label: Provide a meaningful label for this action. For example, "Invoke Sub-Workflow".
- Sub Workflow: Select the sub-workflow to invoke from the dropdown menu.
Example Configuration
Configuration Fields:
- Label: Invoke Sub-Workflow
- Sub Workflow: SubWorkflow1
Example Usage
Let's consider a scenario where you want to configure the Invoke action to call a sub-workflow within your main workflow.
Configuration Input:
- Label: Invoke Sub-Workflow
- Sub Workflow: SubWorkflow1
Conclusion
The Sub-Workflow Trigger plugin in the WeHub Dashboard is a versatile tool for managing sub-workflows within your main workflows. By configuring the label, schema, truncate level, name, path, type, and sub-workflow, you can efficiently handle sub-workflow execution in various scenarios. Ensure to test and validate your configurations to achieve the desired workflow behavior.
If you have any further questions or need additional assistance, please refer to the WeHub Dashboard support documentation or contact our support team.