Orchestration
...
Actions
Discovered Outputs and Testing
7 min
for every action, there are outputs basically, when an action executes (and does not fail), the output data returns a minimum base of property types, which you can apply as inputs for other actions within your playbook, or promote to use outside of the current playbook discovered outputs also! there are discovered outputs based on what action or connector you use, the results may vary so in addition to the base of property types, and depending on the inputs, action outputs may return additional properties these are the discovered outputs what if you want to test your action to see the possible outputs? this can be done at the action level let's take a look at the how to test the actions/connectors that turbine supports action testing let's test the action that you created! testing a single action enables better debugging, helps you detect errors in code earlier, saves time, and lets you test inputs while playbook building to test connectors/actions, follow these steps select your action and click configure the request, outputs, and test tabs are available to configure from the test tab, enter your inputs and configure the rest of the action as needed after entering configuring your request, click test to the right the result pane below provides the raw json data that you don't need to worry about! turbine turns that difficult to read jsonata into an easy to read format under the discovered outputs tab the discovered outputs are combined with the base (original) outputs all of the known outputs display with check marks the remaining outputs from the request will be unchecked, and you can select one or all of them and click add those selected to outputs to view the added outputs, navigate to the outputs tab all of the outputs that were custom (that you just added) display with the option to delete you'll notice that you cannot delete any outputs that are part of the original outputs error outputs what happens if your action fails? you need to know more information about why the action failed turbine now provides a base level error property type for action outputs the error property type gives you access to any output properties when an error occurs currently, the http native action, script native action, and connectors have this property type this makes for a better user experience when testing actions and handling errors let's walk through an example example miranda has a playbook with two http native actions she creates a playbook that has an http native action followed by an on success action flow and on failure action flow her on success action is another http native action her on failure action is a google create export action in the first http1 action, she selects the post option and enters www google com http //www google com/ as the url when she runs this action, it will fail, because miranda cannot use the http method post for the provided url from the outputs tab, miranda sees the base level property type error when miranda accesses the on failure path, she sees the error output sub properties miranda configures the create export connector action by opening the playbook property drawer and selecting the error object once she does, the property displays in the action inputs now, if the first http action fails, the on failure workflow sends the error response to the create export connector action discovered error outputs you can discover outputs during action testing you already know that actions have outputs based on what action or connector you choose and the base property types that are returned what if the action test has an error response? let's use miranda's example again to view discovered error outputs example miranda selected the http native action and configured as below miranda clicks test there's an error response! it's easy to see, because the results pane now shows error the result and discovered outputs tabs on that pane are now error and error outputs miranda wants to add the discovered error outputs results to the action outputs she clicks the error outputs tab and selects individual properties to add, or she clicks select all at the top of the pane to add all of the discovered error outputs to the action outputs once she does, she can go back to the tabs at the top of the http1 action and click the outputs tab and miranda's selected error output properties are available to promote under the error property