Skip to main content
Skip table of contents

Human Task

image-20241001-090832.png

Human Task components can be used to visualize human activities. When the Business Process is automated, these Human Tasks are linked to executable .humantask files.

Human tasks (.humantask) allow to configure the Task Management web app and thus the interaction with tasks performed by humans. These tasks are modeled as case management processes, see Case Management – Realize Tasks and Workflows.

Properties

Label

Label of the symbol within the process diagram

Creating and Using Human Tasks

In order to better visualize human interactions in Business Processes, human task activities can be used when modeling processes. These can then be linked to a human task file (.humantask) in which the configuration of the task is made.

Human Tasks (.humantask) are created below the Business Process via the context menu New > Human task or via the toolbar 

 > Add Human task. After the creation, the Human Task is opened in the X4 Designer and can be parameterized as follows:

  • Title: Title of the task in the Task Management Web App

  • Description: Optional description of the task

  • General tab: define owner, assigned user or group and deadline for processing

image-20240924-082442.png

  • Owner: owner of the task

  • Assigned User/Group: Assigned user or group of the task.

The involved users and groups are created and managed in Keycloak.

In the Owner and Assigned User/Group input fields, the user or group can be entered as free text without a link to the identity provider (e.g. Keycloak). The name of the entered Owner and Assigned User/Group however has to be identical with the name of the user/group in the identity provider.

The users and groups are validated via a token in the identity provider.

  • Deadline: Deadline for resolving the task with the following options:

    • No deadline: No deadline

    • Duration: Deadline duration in days, hours and minutes

    • Until: Date and time at which the task must be resolved

    • Case State: Case state to be executed automatically, if the human task's deadline was reached.

If a human task with a deadline is executed, the process is automatically resumed with the configured case state after the specified deadline was reached. In this case, the human task is automatically closed and displayed within the (7.4.0-en) Task Management Web AppTask Management Web App's navigator node Verfallen (expired). All human tasks that have exceeded the deadline and have been closed automatically are displayed here.

If no case state was set, the process won't be continued automatically. 

  • Tab Business Data: Define information to be displayed within the Task Management Web App

    • Key Identifier: Case feature as key identifier within the Task Management Web App
    • Categories, feature groups and features are displayed in a tree structure and can be selected in order to be visible within the Task Management web app
      (info) Categories are displayed as tabs within the Task Management web app.
    • Display Name: Display name of the selected category, feature group or feature
    • read only: Mark selected category, feature group and feature as read-only

  • Tab Actions: Define actions to be performed within the Task Management Web App 

    • In Actions the case states to be set by the corresponding user within the Task Management Web App can be defined
    • Display Name: Display name of the selected case states within the Task Management Web App

  • Tab Settings: Advanced settings for case processing

    Under Advanced you can allow declining and forwarding of tasks and enable accessing human tasks via interface, see also Accessing Human Tasks via ReST API.

    • Task can be declined: Allow declining tasks
    • Task can be forwarded: Allow forwarding tasks
    • Task can be resubmitted: Allow resubmitting tasks
    • Enable access via API: Allow accessing the task via interface

    The Task Management adapter allows to define additional actions for a human task.

    Under Documents, you can allow adding, editing and deleting documents related to a case.

    • Enable Documents: Allow processing documents
    • Documents can be added/edited: Allow adding and editing documents
    • Documents can be deleted: Allow deleting documents

Execution on the X4 Server

If a Business Process runs on a human task during execution, the execution of the process is stopped and the human task is generated. The process waits for the necessary human interaction within the Task Management Web App and continues execution as soon as the human task is completed.

Parameterizing Human Tasks Dynamically via Technical Processes

Human tasks can not only be configured via the human task files, but also dynamically via Technical Processes.

The following human task settings can be overridden in the Technical Process:

  • Owner

  • Assignee

  • Deadline

The Technical Process for parameterizing the human task is created directly under the corresponding human task via the context menu New > Technical Process and cannot be moved.

The input and output document for the process is structured as follows:

Structure of the input and output document
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<HumanTask>
	<TaskId>3acf3d51-7e45-410b-be4f-8cd57c01a103</TaskId>    
	<Owner>OwnerName</Owner>
    <Assignee>
        <name>AsigneeName</name>
        <type>user|group</type>
    </Assignee>
     
    <!-- Deadline types (NoDeadline, DurationDeadline, UntilDeadline)-->
    <NoDeadline />
 
    <DurationDeadline>
        <Days>7</Days>
        <Hours>4</Hours>
        <Minutes>45</Minutes>
    </DurationDeadline> 
    <UntilDeadline>2019-04-18T14:30:49+02:00</UntilDeadline>
</HumanTask>

Note:

The task ID (<TaskId>) contained in the input of the process created as a private file is a UUID that can be passed to an external task app, for example.

Accessing Human Tasks via ReST API

Hinweis

BasicAuth login is no longer supported for X4 API, a bearer token is now required to call the X4 API. This can be retrieved via http://localhost:8080/X4/X4Api/ or with the Keycloak Token adapter.

This note only applies to X4 API, BasicAuth is still available for the other services.

The documentation for the ReST interface can be found at http://localhost:8080/X4/X4Api/.

Instead of the Task Management Web App, also other applications can be used to display and edit human tasks. The implementation is done via ReST interface, which offers all functionalities also available in the Task Management Web App.

Access to the human task via the ReST interface can be enabled separately for each .humantask file.

To enable the connection via the ReST interface, the following settings must be made:

  1. Open the human task.

  2. Open the tab Settings.

  3. Under Advanced select the option Enable access via API.
    Accessing human tasks is now only possible via the interface.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.