ThingWorx Flow > ThingWorx Flow SDK > ThingWorx Flow Tools and Connector SDK
ThingWorx Flow Tools and Connector SDK
To create and test artifacts such as Actions, Lookups, OAuth, and Triggers for the connectors, PTC recommends using ThingWorx Flow Command Line Interface (CLI). The ThingWorx Flow tools include the following:
flow-cli package—Consist of tools to create and test connectors.
flow—Creates a connector project and add various artifacts to it.
flow-dbg—Debug variant of the flow and allows debugging of the artifact code using the node inspector protocol. The CLI waits for a debugger to connect on port 9000.
flow-deploy—Package that provides the tools to deploy a connector and OAuths in an on-premise installation.
ptc-flow-test-helper package—Package that provides the APIs to automate the testing for connectors. It provides JavaScript API for all the functionality available through ThingWorx Flow CLI.
ptc-flow-sdk package—Allows ThingWorx Flow server to load the connector and execute its artifacts. It also provides APIs such as logging that are required to build a connector. For more information on the connectors SDK, refer to the topic ThingWorx Flow Connectors SDK.
Refer to Tutorial A: Implement a Custom Connector Using ThingWorx Flow SDK for implementing a Custom connector using ThingWorx Flow SDK.
ThingWorx Flow CLI package consist of the following commands:
init—Creates a new project
add—Creates new artifacts
test—Tests the artifact
To get a list of all ThingWorx Flow CLI commands along with their details, run the following command from your command prompt:
flow --help
Commands
Description
flow add <artifactType>
Adds a new artifact to the connector.
flow init <user project root directory>
Creates a connector project named <projectName> in the folder parentDir.
flow test <command>
Verifies an artifact by running the integration test.
Options
Description
Data Type
--version
Displays the version number.
[boolean]
--help
Displays the help.
[boolean]
The following video demonstrates how to build ThingWorx Flow Custom Connectors.
Was this helpful?