Skip to main content

Work with Task Templates

Templates let you create predefined task formats that can be used in workflows. These templates are useful in steps such as Human in the Loop and Reject/Repair, where manual approval or document review is required. Templates provide a standardized way to manage approvals and document reviews in workflows, ensuring consistency.

You can design a template for two main purposes:

  • Approval: For tasks where an approver needs to review and approve or reject.
  • Document Review: For tasks where a reviewer verifies the extracted text from documents and makes the changes if required.

A user with an Admin role must create templates in AEUI for developers to use in Human-in-the-Loop (HIL) or Reject and Repair (RR) steps. A template can either include both Data Fields JSON and Action Buttons configuration (for Approval tasks) or only Action Buttons configuration (for Document Review tasks). In a Human-in-the-Loop step, approvals are handled through action buttons. When an approver selects an action button, the workflow continues according to the selected action.

In addition to action buttons, Human-in-Loop steps can include input data fields and labels which are defined in a JSON format. These elements are displayed to the approver to provide context or to capture required information before the workflow continues.

In addition to creating templates from scratch, you can also import existing templates. This helps save time and ensures consistency when setting up tasks across multiple workflows.

To create Approval templates:

  1. In the menu, click Tasks → Templates. The Task Templates page appears.

    alt text

  2. View Task Templates:

    Column nameDescription
    NameDisplays the unique task template name.
    VersionDisplays version of the task. For more details, see Version.
    TypeDisplays the task type. This shows as Approval when the Approval template is selected, or Reject/Repair when the Document Review template is selected.
    TitleDisplays the default title specified in the template, which can be overridden by the plugin field Task Title. For more details, check Human in Loop step in the AutomationEdge Standard Plugins Reference Guide.
    Last UpdatedDisplays date and time when the task was last updated.
    ActionClick Edit alt text, Delete alt text, or Export alt text to manage the task. For more details, see Action.

Version

When you create a Task Template, it is assigned the default version number 1. You can then use the template to create tasks. Each task created refers to the template as its source. If you modify and save the template later, the version number is incremented (for example, from version 1 to version 2), because the template has already been used to create tasks.

Action

  • Edit Click alt text to open the task template in edit mode. This allows you to update the template details such as Data Fields, Action buttons and other configurations. After making changes, save the template to apply the updates.

  • Delete Click alt text to delete the template. A confirmation dialog appears asking you to confirm the deletion.

  • Export Click alt text to export the template in JSON format.

To add templates:

  1. On the Task Templates page, click Add. A list of task template types appears.

    alt text

  2. In the list, select Approval. The Task Templates details appear.

    alt text

  3. Enter the following field details:

    Field nameDescription
    NameEnter the unique task template name.
    DescriptionEnter a brief description of what the task is for.
    Task TypeWhen you select the Approval type, the Approval option is set by default.
    Default Task TitleEnter the default title that will be automatically assigned to new tasks. This title is replaced by the title specified in the Human in the Loop step and is displayed in the Pending Task details.
    Pause Workflow ExecutionSelect to pause the workflow until this task is completed by the user.
    Notify assigned users via emailSelect this to send email notification to the nominated user whenever a new pending task is created.
    Add Data Fields (JSON)Write a JSON code to create data fields. You can click Samples to get different sample code. For details, see Sample section.
    Add Action ButtonsClick + to add action buttons. For details, see Add Action Buttons.
  4. Click Save. Template is created.

    Note:
    • Click Preview to view the template.

      alt text

    • Click Cancel to cancel creating the template. The value key in the JSON Sample is used only for preview for Approval and Document Metadata. For example, if "value":"John" is specified in the sample, the template or Document Metadata Preview will show the value for the key as John. However, this value will not be reflected in the actual Pending Task. There, the value will be obtained at runtime during workflow execution.

      alt text

Samples

While creating task templates, you can add data fields in JSON format. You can also refer to predefined samples.

alt text

To add samples in Data Fields:

  1. On the Task Templates page, click Samples. The Samples dialog appears.

    alt text

  2. In the Select Sample list, select the sample you want to use. The following three samples are available, each of which represent different types of data.

alt text

Sample types for Add Data Fields (JSON)

  • Formfield: Use this sample to create simple input fields where users can enter data, such as text boxes, dropdowns, or checkboxes.
  • Section: Use this sample to group multiple form fields together under a single heading for better organization.
  • Table: Use this sample to display or capture data in a tabular format, where rows and columns can hold structured information.
Note:

secret is only applicable for field controls, textbox and label. Values for fields that are marked as secret are kept in the encrypted format in the database. For example,

{
"key": "id",
"displayName": "Employee Id",
"type": "formField",
"secret": "true",
"uiControl": "textbox",
},
  1. In the dialog, do one of the following:
    • Click Import. The sample is copied to the Add Data Field (JSON) section. OR
    • Click Copy to Clipboard. The sample is copied, and you can paste it into the Add Data Field (JSON) section.

Add Action Buttons

Action buttons define the options that users can select while performing a task. These buttons control how the task proceeds based on the user's choice. For example, you can configure action buttons such as Approve, Reject, or Send for Review.

alt text

To add Action button:

  1. In Add Action Buttons section, click Add Actions. Details to Add Actions appear.

    alt text

  2. Enter the following field details:

    Field nameDescription
    Button IdEnter the button ID.
    LabelEnter the label that you want to display on the button.
    TooltipEnter a short message that appears when you hover over a button to explain its purpose.
    Background ColorSelect a color for the button.
    Text ColorSelect a color for text on the button.
    StatusEnter the status that will appear on the Task History tab after the task is completed.
    WorkflowSelect the workflow that should be triggered when the button is selected. You can also search for the workflow. For more details, see Target Workflow section.
    Workflow Runtime parameterSelect the runtime parameter defined in the target workflow. You can also search for the parameter. For more details, see Workflow Runtime Parameter section.
  3. Click Update. The button is added to the Add Actions Buttons.

Target Workflow

A target workflow is another workflow that is invoked from the current source workflow. You can use this option when the approval process requires multiple steps, such as a Maker-Checker scenario. The source workflow handles the initial processing. When the user clicks a specific action button, the target workflow is triggered. The target workflow performs additional processing based on the data from the source workflow and then decides.

Note:

Ensure that the target workflow in the template action has only one mandatory runtime parameter.

Workflow Runtime Parameter

To pass information from the source workflow to the target workflow:

  • In the Approval Task Template, define a runtime parameter for the action.
  • Map this runtime parameter to the target workflow. This parameter acts as an input container for the source workflow's metadata.
  • The source workflow passes the metadata as a JSON object into this runtime parameter.

To create document review template:

  1. In the menu, click Tasks → Templates. The Task Templates page appears.

    alt text

  2. Click Add. A list of task template types appears.

    alt text

  3. Select Document Review. Add Document Metadata dialog appears.

    alt text

  4. In the dialog, do one of the following:

    • Click Yes. If Document Metadata has not been created, you are redirected to the Document Metadata tab. For details, see the [Document Metadata]. OR
    • Click No, Proceed to Template Creation. If Document Metadata is already created, the Task Templates page appears.

    alt text

  5. Enter the following field details:

    Field nameDescription
    NameEnter the unique task name.
    DescriptionEnter the task description.
    Task TypeTask type is selected Reject/Repair by default.
    Default Task TitleEnter the task title.
    Notify Assigned user via emailSelect this to send email notification to the nominated user whenever a new pending task is created.
    Add Action ButtonsClick Add Actions to add action buttons. For more details, see Add Action Buttons.
  6. Click Save. The template is created.

Add Action Buttons

Action buttons define the options that users can select while performing a task. These buttons control how the task proceeds based on the user's choice. For example, you can configure action buttons such as Submit, send OTP, Verify, and so on.

alt text

To add an action button:

  1. In the Add Action Buttons section, click Add Actions. The fields to add the details appear.

    alt text

  2. Enter the following field details:

    Field nameDescription
    Button IdEnter the unique button ID.
    LabelEnter the label that you want to display on the button.
    TooltipEnter a short message that appears when you hover over a button to explain its purpose.
    Background ColorSelect a color for the button.
    Text ColorSelect a color for text on the button.
    StatusEnter the status that will appear on the Task History tab after the task is completed.
    WorkflowSelect the workflow that should be triggered when the button is selected.
    Workflow Runtime parameterSelect the runtime parameter defined in the target workflow.
  3. Click Add. The button is added to the template.