Managing Workflows > ThingWorx Workflow Builder
  
ThingWorx Workflow Builder
The ThingWorx Workflow Builder enables business administrators to quickly build an automated repeatable workflow. The workflow is initiated from an alert or event from a remote connected thing. Once initiated, the workflow follows the defined route to completion. The next diagram shows a sample workflow.
With ThingWorx Workflow Builder, you can do the following:
Interactively create a diagram of a workflow by dragging the desired diagram elements onto the canvas and connecting them to define the flow.
Associate an event with the Start node to initiate the workflow.
Associate an event or a service to each step in the workflow.
For information about permissions and user groups, see Permissions and User Groups for ThingWorx Utilities.
For more information about the StartWorkflow API, see the com.ptc.workflow.api section under API Documentation.
Creating a Workflow
1. Assign an alert to the Start shape that will initiate the workflow.
2. Drag and drop the tasks or gateways onto the canvas and connect them in the desired order.
3. Associate the appropriate events, services, user interfaces, and performers.
4. Validate the workflow. If there are any validation errors, resolve them before continuing.
5. Save.
6. Once the workflow is complete, validated, and ready for production, mark the workflow as Active. The workflow will not initiate any process instances until you have checked either the Activate Now checkbox in the Save As window, or the Activate checkbox in the Information tab of the workflow.
* 
It is possible to loop a workflow and link a task to a past task.
Available Shapes
Use the following table to decide which types of tasks and shapes to use for your workflow:
Node
Description
Receive Task
A task that waits for the arrival of a message. The process stays in this wait state until a specific message is received.
Service Task
A task that uses a service. This can be a web service or an automated application.
User Task
A task that requires a human performer to complete the task with the assistance of a software application.
Exclusive Gateway
A task that evaluates the state of the workflow and based on the condition, breaks the flow into one of the two or more mutually exclusive paths.
Assigning Events, Services, and User Interfaces
* 
In order for an Alert or Event to initiate a workflow, its parent thing or thing template must implement the PTC.BPE.BusinessProcessManageable thing shape.
In order for tasks and shapes to be considered valid, you must assign an event, service, or user interface to the shape. The table below identifies what must be assigned to different tasks and shapes:
Shape
Required
Start
Event
* 
You can create multiple events on the Start node. If multiple events are configured on a start node, each event triggers a new, separate workflow.
Receive Task
Event
Service Task
Service
User Task
User Interface—the mashup that is called when completing a User Task.
Performer—the user that completes the User Task
Loop Back Workflow
You can create a workflow that loops back to a previously executed activity using an Exclusive Gateway. The following is an example of what a loop back workflow might look like.