ThingWorx Flow > ThingWorx Flow Overview
ThingWorx Flow Overview
To use ThingWorx Flow, it is helpful to understand the main components that are used in creating workflows. The following sections explain the different concepts involved.
A workflow is a series of sequential steps that is designed to accomplish a unit of work, often as part of a broader business process.
In ThingWorx Flow, a workflow can be configured to be executed by external system events, via triggers, or by an external invocation via a webhook URL.
The steps in a workflow are actions that invoke RESTful services on third-party systems. Each action is configured with a connection for authenticating and with the input data to be passed to the third-party system. The output data from these actions can then be used in subsequent actions in the workflow.
A Connector is a collection of predefined actions, triggers, authorizations, and connections, that can be configured for use in workflows to interact with external systems or perform a specific task. For more information on Connectors, refer to the section Connectors Overview. For information on creating Connectors using SDK, refer to the topic ThingWorx Flow Connectors.
An Action is an individual step in a workflow that takes input data and performs a specific task, usually calling a service on an external system, and makes its output data available for subsequent steps of the workflow. For more information on Actions, refer to the topic Actions. For information on creating Actions using the Flow CLI, refer to the topic Creating Actions.
A Trigger is a specialized action that can be configured on the Start step of a workflow to define when the workflow is to be executed. Some triggers poll external systems checking for certain conditions. Other triggers register call-backs with external systems so that workflows get executed whenever a certain event occurs on that system. For more information on Triggers, refer to the topic Triggers. For information on creating Triggers using the Flow CLI, refer to the topic Creating Triggers.
Authorizations and Connections
Authorizations and Connections allow Actions and Triggers to access external systems when they are executed in workflows.
Authorizations are grants made by an account owner to authorize the ThingWorx server access to capabilities of a 3rd party application service such as Gmail or Box on behalf of the account owner. Authorizations apply to application services that support access through the Open Authorization (OAuth) authentication and authorization standard. Authorizations can be defined at the time a connection is created to an OAuth service in the context of defining or editing a flow or as an administrative action outside of the flow definer. For more information on how to create authorizations, refer to the topic Authorizations. For information on creating authentication using the Flow CLI, refer to the topic Creating Authentication.
Connections are grants made by an account owner to authorize the ThingWorx server access to capabilities of a 3rd party application service using any standard or method other than OAuth such as Basic, Form based, App Keys, and so on.
Connections are a combination of a system identifier (URL) and account credentials to be used to access a system.
Each connection or authorization is owned by the user who creates it. By default, only the creator can view, use, edit, or delete authorizations and connections. Every user, including the Administrator user and all members of the Administrator’s group, can own Authorizations and Connections. The Administrator user and any member of the Administrator’s group may not view, use, edit, or delete any private authorization or connection created by another user.
Connections and Authorizations may be shared through a Share action in the Global Flow settings interface in the Workflow Editor. Shared Authorizations and Connections can be seen and used by any other user with Design Time privileges on workflows but can only be edited or deleted by the owner. Shared Connections and Authorizations are identified by a share icon in the connection list under the settings menu.
No users including administrators, can view or edit the credentials of shared Connections and Authorizations owned by other users.
Example Workflow
A sample workflow is shown in the diagram that follows:
This workflow uses a Box Folder created Trigger that causes the workflow to be started any time a new folder is created in the Box system for the account specified in the Trigger’s configured Connection. It then gets all the record details using Dynamic 365, and then sends the record details in an email to the user’s Office 365 mail account.