Creating Workflows
Use one of the following options to create workflows:
* 
Ensure that you have appropriate permissions to create workflows. For more information about permissions, see Configuring permissions for ThingWorx Flow.
From the ThingWorx Flow Dashboard
To create a workflow from the ThingWorx Flow dashboard, do the following:
1. From the ThingWorx Flow dashboard, click + NEW. The Create New Workflow window opens.
2. In the Workflow Name field, enter an appropriate name for the workflow. Ensure that the workflow name conforms to the ThingWorx naming conventions for services.
3. In the Description field, enter a description for the workflow. This field is optional.
4. In the Category combo box, enter a value to create a new category or select an existing category from the list. A category lets you filter workflows that are related to each other.
5. Click Save. The Workflow Editor opens.
6. In the Workflow Editor, you may configure the start action and add a trigger or a webhook that executes the workflow.
7. Add actions from the Services list to the canvas, and then connect them into a sequence from to . Configure each action.
While building workflows, test the flow as you add actions step-by-step to ensure that you get expected results.
8. Ensure that there is at least one valid path from to to save the workflow, and click Save to save the workflow.
In ThingWorx Composer
In addition to being able to create standalone workflows that are triggered by external systems, you can create workflow services on entities in ThingWorx Composer. These services can be referenced and started like any other JavaScript or Java service on an entity in ThingWorx.
* 
You cannot add a trigger to a workflow that you create in ThingWorx Composer. If you want your workflow to execute on a trigger, create a standalone workflow in the Workflow Editor, and add a trigger.
After you save the workflow, go to the Subscriptions tab in the Workflows Thing entity in ThingWorx Composer to view the trigger. The trigger name associated with the workflow is displayed under the Name column and the workflow name is displayed under the Service Name column.
To create a flow in ThingWorx Composer, do the following:
1. In ThingWorx Composer, create a Thing, Thing Template, or Thing Shape.
2. Click the Services tab, and then click Add > Workflow. The New Service window opens.
* 
Any workflow that you create on a Thing, Thing Template or Thing Shape is not visible in the Workflow Editor. If you want to view the workflow in the Workflow Editor, you should create the workflow as a service under the Workflows Thing entity in ThingWorx Composer.
3. In the left panel, under the Service Info section, do the following:
a. In the Name field, enter an appropriate name for the workflow. Ensure that the workflow name conforms to the ThingWorx naming conventions for services.
b. In the Description field, enter a description for the workflow. This field is optional.
c. In the Category combo box, enter a value to define a new category or select an existing category from the list. A category lets you filter workflows that are related to each other.
4. Under the Inputs section, click Add to specify the input parameters for the service. These parameters are available for use from within the workflow only.
5. Under the Output section, specify the type of output that the service must return, if any.
6. In the Workflow Editor, add and configure actions in the workflow.
Click at the upper-right corner to maximize the Workflow Editor.
7. To return data from the workflow, click on . The Output window opens.
8. In the Data field, manually enter data or bind the output of the last action in the workflow.
9. Save the thing to save the workflow.
Was this helpful?