X4 Produktdokumentation

Task Management

This adapter provides interface-based access to human tasks in Business Processes using Technical Processes. It provides an interface that makes modeled tasks and human interaction available at the process level. This enables the connection of customer-specific Web Apps to processes that are modeled with BPMN or the direct connection of any third-party systems to the central process control of the X4 BPMS.

To access the adapter, the logged-in user is used in X4 Web Apps.

Properties

Operation

Describes which operation the adapter performs.

Possible values:

  • GetAllTasks: Return all tasks for the logged-in user or group

  • GetTask: Return a task for the logged-in user

  • EditTask: Lock the tasks for other users and update the properties

  • CloseTask: Complete the task with a case state and continue the process

  • DeclineTask: Reject the task and return it to the owner

  • ForwardTask: Pass the task to a person or group

  • CancelTask: Cancel processing of the task and release it to other users

  • ResubmitTask: Set task to be resubmitted

Parameters

Adapter

Main class of the adapter (do not change!)

Possible values: de.softproject.x4.server.bpm.casemanagement.adapter.TaskManagement: Main class (default)

limit

Page size for retrieving the task list

The value is optional. If the parameter is not set, all tasks are returned.

Possible values:

Any number > 0

offset

Offset for retrieving the task list

The value is optional. If the parameter is not set, all tasks are returned.

Possible values:

Any number > 0

state

Required. State filter for retrieving the task list

Possible values:

  • OPEN: Open tasks

  • IN_PROGRESS: Tasks in progress

  • CLOSED: Closed tasks

taskUuid

UUID of the task

Possible values:

Valid UUID, such as 443c498a-5868-4110-891f-42e5cb8fc24e

userForDebugging

User to be used for debugging when there is no login in X4 Web Apps

Possible values:

Valid user login, e.g. admin

groupsForDebugging

Groups to be used for debugging when there is no login in X4 Web Apps

Possible values:

  • Comma-separated specification of several groups, e.g. Clerk, Admin, TaskUser

  • Specification of a single group, e.g. Clerk

dataformatVersion

Version of the data format used

Possible values:

  • 1.0: Data format used up to version 7.0

  • 2.0: Data format used as of version 7.0, see input examples

Status values

1

The operation was successful.

-1

The operation could not be performed.

For documentation of the ReST interface, see http://localhost:8080/X4/X4Api/.

Input

No input is required for the following operations:

  • GetAllTasks

  • GetTask

  • CancelTask

The following operations expect an XML document with the following structure as input:

  • Operation EditTask

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <EditTask>
    	<Offer> 150 Mio. €</Offer>
    </EditTask>
    
  • Operation CloseTask

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <CloseTask>
        <MarketValue>120 Mio. €</MarketValue>
        <Action>Declined</Action>
    </CloseTask>
    
  • Operation DeclineTask

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <DeclineTask>
    	<Comment>string</Comment>
    </DeclineTask>
    
  • Operation ForwardTask

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <ForwardTask>
    	<Comment>string</Comment>
    	<Deadline>2019-04-15T11:46:02.782Z</Deadline>
    	<!-- The "type" attribute must contain either USER or GROUP. -->
    	<Assignment type="USER|GROUP">string</Assignment>
    </ForwardTask>
    

Output

With the CancelTask operation, the adapter issues the input document as output.

The following operations return an XML document with the following structure as output:

  • Operation GetAllTasks

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <Tasks>
        <Task created="2020-12-21T09:10:53Z" creator="System" id="81f4abb5-c2f5-418e-acf5-654304234bf4">
            <Title>humantask</Title>
            <Owner>admin</Owner>
            <Assignment type="USER">admin</Assignment>
            <State>OPEN</State>
            <KeyIdentifier/>
            <CaseId>00860a8a-12b9-45b8-b271-ec5d42573c59</CaseId>
        </Task>
    </Tasks>
    
  • Operations GetTask, EditTask, CloseTask, DeclineTask, and ForwardTask

    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <Task created="2020-12-21T09:10:53Z" creator="System"
          id="81f4abb5-c2f5-418e-acf5-654304234bf4">
        <Title>humantask</Title>
        <Owner>admin</Owner>
        <Assignment type="USER">admin</Assignment>
        <State>OPEN</State>
        <KeyIdentifier/>
        <CaseId>00860a8a-12b9-45b8-b271-ec5d42573c59</CaseId>
        <Actions>
            <Action displayName="done" name="Accepted"/>
            <Action displayName="Declined" name="Declined"/>
        </Actions>
        <DecliningAllowed>false</DecliningAllowed>
        <ForwardingAllowed>false</ForwardingAllowed>
        <Comments/>
        <BusinessData>
            <Company>Max Mustermann Inc.</Lastname>
            <MarketValue>100 Mio. €</MarketValue>
            <Offer>150 Mio. €</Offer>
        </BusinessData>
    </Task>