viewData

The viewData task displays a form to users containing job data and enables decision-making for the next workflow step.

Potential use cases

Use viewData for approval workflows where someone needs to review data and approve or reject, or for debugging and monitoring where operators need to see workflow state and decide whether to continue or retry steps.

Properties

IncomingTypeDescription
headerStringRequired. Bold header text displayed at the top of the form.
messageAnyRequired. Informational text that helps users make their selection. Accepts plain text, HTML, and CSS.
bodyAnyRequired. Main content area displaying data or instructions. Accepts plain text, HTML, and CSS. You can reference JSON variables from previous tasks or use variable substitution with the variables parameter.
variablesObjectVariables used in the body. Each key is a variable name; each value is the replacement string. Reference variables in body using the syntax <!variableName!>.
btn_successStringRequired. Label text for the success button.
btn_failureStringRequired. Label text for the failure button.
OutgoingDescription
noneThe task produces no direct output variables. User selection of btn_success or btn_failure triggers the corresponding Success or Failure transition.

How to configure

This example configures a viewData task that displays current time information and allows workflow re-execution. It uses a getTime task as a prerequisite. See the getTime task reference for more information.

Job canvas showing getTime and viewData tasks connected with success and revert failure transitions
1

Add the tasks

In your workflow canvas, add getTime and viewData tasks as shown above.

2

Configure viewData inputs

Select the viewData task and configure the following:

  • header: The Current Time is...
  • message: When this Automation was executed, the time was:
  • body: Set Reference task to getTime and Reference variable to time
  • btn_success: I am done.
  • btn_failure: Do it again.
viewData task with header and message fields configured
viewData task with body mapped to the getTime output variable
viewData task with success and failure button labels configured
3

Configure transitions

Configure transitions between tasks as shown in the canvas figure above.

Operations Manager showing the Work Task link on the active viewData task

When the workflow reaches the viewData task, a Work Task link appears in Jobs (Operations Manager). Click the link to open the form and make a selection.

With this design, clicking I am done ends the job. Clicking Do it again follows the revert failure transition back to getTime, which re-runs and presents a new timestamp. This loop continues until the user clicks I am done or cancels the task. If the user clicks Cancel on the form, the modal closes but the job continues running until worked or cancelled.

Task Auto-Work view showing the Work Task link on the active viewData job step

Example — using the variables parameter

The variables field lets you pass JSON properties (strings) that can be referenced in the body of the viewData task usingItential Platform-specific syntax: <!parameterName!>.

In the configuration example above, instead of passing the getTime response directly as the body, you can use it as the input variables. Update the body to something like The current time is <!time!> and set variables to the getTime task. The <!time!> placeholder is replaced with the actual time value at runtime.

viewData task using getTime output as the variables input and syntax in the body

Once the automation completes, a Work Task link (Start Auto-Work) appears on the viewData task in Jobs (Operations Manager). Clicking the link opens the form prepared with the variable-substituted content.

Operations Manager showing the Start Auto-Work link on the active viewData task

For related information, see the ViewData API reference.