This blog focuses on the usability of the Output Section within an Action of the Action Project that can be maintained using the Actions Editor. The Output parameters help to describe and maintain the response structure of the API.

The Actions Project and the Action Editor are generally available from 18th October 2022.

Parent Blog:

Please go through the following blogs written by my colleague, Vivek Vishal, for more information.

Actions Editor – Feature List, Usage and Maintenance of Actions Project

Blog Series

Concept & Need:

The Output Section contains a list of http-codes that could be part of a response from an API. Each of these http-codes contain a list of parameters.

When an API responds with a particular http-code, the response would contain the same structure as described by the Action Designer in this Section.

The Action Designer can design the response structure for each of these http-codes by modifying these parameters.

Modifications that can be done are as follows:

  • Delete Parameters
  • Add Parameters
  • Modify the Label
  • Modify the API Format
  • Add/Remove a Tag

A basic use case for this is when an Action Designer wants to trim down the parameters that might not be relevant to the Business Process at hand but which is part of the response from the API. He can achieve this by simply deleting the parameters which are not relevant to him and keeping the ones which are required and specific to his use case.

Example:

  • Select Output/Error code to edit using the drop-down as shown below.

Figure%201%3A%20Select%20Output/Error%20code

Figure 1: Select Output/Error code

Users can then make modifications to the structure of the selected http-code as follows:

Sort:

Designers can sort across Ascending and Descending order through the parameters which will help them in quick selection of the parameters.

Figure%202%3A%20Sorting%20through%20the%20parameters

Figure 2: Sorting through the parameters

Search:

Figure%203%3A%20Searching%20through%20the%20parameters

Figure 3: Searching through the parameters

Delete Parameters:

  • Select the list of parameters to delete.

Figure%204%3A%20Select%20Parameters.

Figure 4: Select Parameters.

  • Click on the Remove icon present at the top-right corner of table.

Figure%205%3A%20Remove%20Icon

Figure 5: Remove Icon

  • A dialog Box is displayed with the list of selected parameter.

Figure%206%3A%20Remove%20Parameters%20Dialog.

Figure 6: Remove Parameters Dialog.

  • Click on the “Remove” button
  • Selected Parameters are removed from the table.
  • Save the Project by clicking on the Save button.

Add Parameters:

  • Click on the “Add” icon present at the top-right corner of table.

Figure%207%3A%20Add%20Icon.

Figure 7: Add Icon.

  • An “Add Parameters” dialog box is shown. Select the parameters to be added.

Figure%208%3A%20Add%20Parameters%20Dialog.

Figure 8: Add Parameters Dialog.

  • Click on the “Add” button.
  • Selected parameters are added to the Table.
  • Save the Project by clicking on the Save button.

Modification of Output Parameters:

Changing the Label:

  • Click on the Label of any particular parameter and Edit the label accordingly as shown below

Figure%209%3A%20Edit%20Label.

Figure 9: Edit Label.

Figure%2010%3A%20Changed%20Label.

Figure 10: Modified Label.

Changing the API Format:

Concept & Need:

Please refer to the Blog by my colleague Akshil Verma on API Formats to understand its relevance and functionality.

 Example:

  • Click on the API Format of any particular parameter and Select the format from the drop down accordingly as shown below

Figure%2011%3A%20Select%20API%20Format.

Figure 11: Select API Format.

Figure%2012%3A%20API%20Format%20Drop%20Down.

Figure 12: API Format Drop Down.

Figure%2013%3A%20Modified%20API%20Format.

Figure 13: Modified API Format.

Note: Format cannot be added to object, array type parameters and currently Format is enabled only for “string” type parameter. 

Changing Tags:

Concept & Need:

Responses from an API may contain many arrays; it is sometimes necessary to mark a particular array as the Main Output Array. This will help the Citizen Developer consuming the Action in searching through the response received.

Here are the total list of Tags:

  • Main Output Array
  • $Top
  • $Skip
  • $At
  • PageNo
  • PageSize
  • $Search

Out of these tags only Main Output Array can be used in parameters of Output Section and the remaining in Input Section.The Action Designer can then mark which node needs to be considered as the main output array.

Example:

  • Click on the Tags of any particular parameter and Select the Tag from the drop down accordingly as shown below

Figure%2014%3A%20Select%20Tags.

Figure 14: Select Tags.

Figure%2015%3A%20Tags%20Drop%20Down

Figure 15: Tags Drop Down

Figure%2016%3A%20Selected%20Tag

Figure 16: Selected Tag

Note: Once a Tag is added for any particular parameter, that same tag cannot be reused for a different parameter i.e. a tag can only be used once.

Save:

Users must Save the changes by pressing the Save button.

Figure%2017%3A%20Save%20Button.

Figure 17: Save Button.

A Message Toast with the message “The changes have been saved” is shown on Success

Figure%2018%3A%20Save%20Success.

Figure 18: Save Success.

In case there are unsaved changes, an action dialog is shown while navigating to a different action as shown below. Select “Save” to save all new changes and “Discard Changes” to reset the changes.” :

Figure%2019%3A%20Unsaved%20Changes%20Dialog.

Figure 19: Unsaved Changes Dialog.

 

Thanks for reading, and I would really appreciate your feedback. Please feel free to leave a comment in this blog post.

 

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x