ThingWorx Flow > Installation and Configuration > Configuring ThingWorx Flow > Executing Services in the WorkflowSubsystem in ThingWorx Composer
Executing Services in the WorkflowSubsystem in ThingWorx Composer
Prerequisites
Ensure that you meet the following prerequisites before you execute the services in ThingWorx Composer:
The ThingWorx Flow server must be running.
You are logged in to ThingWorx as Administrator.
Steps
1. From the ThingWorx Flow dashboard, click Composer to navigate to ThingWorx Composer.
2. In ThingWorx Composer, under System, select Subsystems.
3. Select WorkflowSubsystem and click the Services tab. The following services are available for ThingWorx Flow:
4. Search for the service, and perform one of the following tasks:
Select the service to view its input and output information.
Click . Provide appropriate input values, and click Execute.
Services
LoadOAuthConfiguration
Use this service to load the OAuth configuration JSON file to the ThingWorx Flow server. This service updates or adds OAuth providers for connectors specified in the JSON file. It does not delete any existing OAuths.
Input
Output
Parameter Name
Base Type
Description
oauthConfigurations
JSON
Provide a valid JSON file with correct OAuth configuration settings for a connector.
Returns a message that states the successful completion or errors that occur during the execution of the service.
For example: To load OAuth configuration for JIRA, provide the value of oauthConfigurations as
"jira": {
"JIRA": {
"CLIENT_ID": "<Client ID>"
"CLIENT_SECRET": "<Secret>"
}
},
See Configuring and Loading OAuths for OAuth configuration JSON file templates available in the ThingWorx Composer
DeleteOAuthConfiguration
Use this service to delete an OAuth configuration from the ThingWorx Flow server, if the OAuth provider is not in use by any connector.
Input
Output
Parameter Name
Base Type
Description
Connector config name
String
Provide a valid connector configuration value whose OAuth configuration settings you want to delete.
Returns a message that states the successful completion or errors that occur during the execution of the service.
OAuth provider
String
Provide a valid OAuth provider for the specified connector.
To delete the same OAuth configuration for JIRA, provide the value of the Connector config name field as jira and the OAuth provider field as JIRA.
GetOAuthConfiguration
Use this service to retrieve the list of connectors for which OAuths are loaded to the ThingWorx Flow server. Sensitive information such as client IDs, client secrets, and URLs are not displayed.
Input
Output
Parameter Name
Base Type
Description
-
Returns a JSON that provides the connector name and the OAuth provider name of all the OAuths loaded to the ThingWorx Flow server.
DeleteOAuthAccessToken
Use this service to delete OAuth access tokens of the specified OAuth provider.
Input
Output
Parameter Name
Base Type
Description
OAuth provider
String
Provide a valid OAuth provider for the third-party service or utility.
Returns a message that states the successful completion or errors that occur during the execution of the service.
User Name
String
Provide the ThingWorx user name for whom you want to delete the generated access tokens for the specified OAuth provider.
This field is optional. If you do not specify a user name, then the service deletes all OAuth access tokens for any user for the specified OAuth provider.
* 
After the service deletes the OAuth access token for an OAuth provider, the OAuth (Named User) connector appears with a icon on the ThingWorx Flow dashboard.
After OAuth access tokens are deleted for a user, users need to provide their authorization information for the OAuth connector to execute the workflow:
OAuth (Named User)—Edit the OAuth (Named User) connector to provide credentials to reconfigure the connector.
OAuth (Session User)—Every user that uses this OAuth (Session User) connector in their workflow must log in and provide approvals and grants to the third-party service or utility again.
RefreshMetadata
ThingWorx Flow caches Windchill OData information to improve performance. If you have modified the Windchill metadata specifications or updated the soft attributes on the Windchill server, use this service to update them on the ThingWorx Flow server.
Input
Output
Parameter Name
Base Type
Description
connectorName
String
Provide the connector name for a third-party service.
Returns a message that states the successful completion or errors that occur during the execution of the service.
ValidateFlowSetup
Run this service to verify whetherThingWorx is able to communicate with ThingWorx Flow services.
Input
Output
Parameter Name
Base Type
Description
Returns a message that states the successful completion or errors that occur during the execution of the service.
In case of connectivity problems between ThingWorx and ThingWorx Flow services, the following error codes and messages are displayed.
Error Code
Error Message
[FLOW-CONFIG-01]
ThingWorx Flow is not enabled. Add the OrchestrationSettings section to the platform-settings.json file to enable ThingWorx Flow.
[FLOW-RABBIT-01]
Failed to connect to RabbitMQ. Check whether the RabbitMQ service is running and is accessible.
[FLOW-API-01]
Failed to connect to ThingWorx Flow. Check ThingWorx logs for more detail.
[FLOW-API-02]
Failed to connect to ThingWorx Flow. Ensure that you are accessing an Nginx-hosted ThingWorx instance. ThingWorx Flow is not supported on a Tomcat-hosted ThingWorx. Ensure that all ThingWorx Flow services are running and are healthy. In case of self-signed certificate, make sure that correct CN is provided.
[FLOW-KEY-01]
OAuth admin key not found in the ThingWorx KeyStore.
[FLOW-KEY-02]
Exchange admin key not found in the ThingWorx KeyStore.
[FLOW-KEY-03]
Failed to get ThingWorx Flow keys from the ThingWorx KeyStore.
[FLOW-KEY-04]
Failed to get ThingWorx Flow keys from the ThingWorx KeyStore.
[FLOW-EXCHANGE-01]
Failed to connect to ThingWorx Flow exchange service. Check ThingWorx logs for more details.
[FLOW-EXCHANGE-02]
Failed to connect to ThingWorx Flow exchange service. Check whether ThingWorx Flow exchange service is up and running.
[FLOW-OAUTH-01]
Failed to connect to ThingWorx Flow OAuth service. Check ThingWorx logs for more details.
[FLOW-OAUTH-02]
Failed to connect to ThingWorx Flow OAuth service. Check whether ThingWorx Flow OAuth service is up and running.
Was this helpful?