ThingWorx Flow > Testing Flow Execution
  
Testing Flow Execution
Validation Flow 1
To put and fetch information from the internal Data Store connector and then display that information in the Logger connector. Create a new workflow as described in the procedure that follows:
1. On the workflow home page, click NEW to create a new workflow, and then click DONE.
2. Click and drag the Account Store action under the Data Store utility to the canvas. Drag two Account Store actions for setting and fetching the values.
3. Drag the Logger action under the Developer Tools utility to the canvas.
4. Connect all the actions as shown in the figure that follows to complete the workflow.
5. To configure the Account Store action, do the following:
a. Place the pointer on the Account Store action, and then click or double-click the action. The Account Store action window opens.
b. Edit the label name, if needed. By default, the label name is same as the action name.
c. From the Select Action list, select an action to SET data. In the Set Data in Account Store section, enter the information that follows:
Key—The key name that you want to set.
Value—The value to assign to the key.
Click Add to enter multiple data instances.
d. Click Done.
6. Follow the steps provided under step 4 to configure the other Account Store action. Select the GET action and provide the same Key as we set in the earlier action to fetch the value from the database, and then click Done.
7. To configure the Logger action, do the following:
a. Place the pointer on the Logger action, and then click or double-click the action. The Logger action window opens.
b. Edit the label name, if needed. By default, the label name is same as the action name.
8. In the Input parameters panel, click to map the log input value, and the click Done.
We used the Logger action to fetch the data value for appropriate key from the Account Store action. Workflow is now complete and there are no errors, as seen in the figure that follows:
9. Click Save, and then click the Execute button. The workflow execution completes successfully.
10. Click the Logger action and you can see that appropriate key/value pair is retrieved from the database which we set earlier using the set Account Store action. If the appropriate key/value pair is not found, the Logger action output returns an empty value.
Validation flow 2
To create a flow with an HTTP utility that requests information from an HTTP server, and then delivers the response to a Logger action.
1. On the workflow home page, click NEW to create a new workflow, and then click Done.
2. Click and drag the HTTP Request action under the HTTP utility to the canvas.
3. Drag the Logger action under the Developer Tools utility to the canvas.
4. Connect all the actions as shown in the figure that follows to complete the workflow.
5. To configure the HTTP Request action, do the following:
a. Place the pointer on the HTTP Request action, and then click or double-click the action. The HTTP Request action window opens.
b. Edit the label name, if needed. By default, the label name is same as the action name.
c. Select the HTTP method as GET, provide the local ThingWorx platform URL, and then click Done.
6. To configure the Logger action, do the following:
a. Place the pointer on the Logger action, and then click or double-click the action. The Logger action window opens.
b. Edit the label name, if needed. By default, the label name is same as the action name.
c. In the Input parameters panel, click to map the log input value with the status code, and the click Done. This delivers appropriate status code response from the HTTP Request if we connect to ThingWorx Platform.
Workflow is now complete and there are no errors.
7. Click Save, and then click the Execute button. The workflow execution completes successfully.
8. In the debug panel, click the Logger action to view appropriate response code that is retrieved depending on connectivity with ThingWorx platform.