3

Trying to wrap my head around how a BPMN/CMMN model can be used in my application.

There are several CMMN User Tasks with Forms as part of my application BPMN process. I use Embedded User Task Forms

The data submitted by my forms get stored in the task variables and passed out to the parent process using all to all variables mapping.

To progress with the process, the user needs to [claim task], fill out the form and then complete it (via a REST call). After the User Task with the form is completed is disappears from the list of available tasks in the /task REST endpoint (as well as in the Admin UI).

But what if I'd like to show users the variables that they have submitted to their tasks before completion after they have completed the task?

First, I thought to use the Get Tasks (Historic) (POST). And that works in a sense that I can see the metadata about the tasks completed by the users before. But how can I see the variables and actually the HTML form that had been used at the point of task completion? That is, the data available via

/task/{id}/variables
/task/{id}/form

before the task is completed? The response from /history/task contains neither variables nor the form key. Trying to access the completed task by its id, like {{camunda}}/task/46386/form or {{camunda}}/task/46386/variables results in

{
    "type": "RestException",
    "message": "Cannot get form for task 46386"
}
or
{
    "type": "NullValueException",
    "message": "task 46386 doesn't exist: task is null"
}

respectively.

I think that I am missing something basic here. That is probably the principle of the BPMN engine. When tasks are completed, they are considered to be gone forever with no option to access its data later any more (except for basic audit log details)?

Another side-question is whether the task access permissions that were set up in the Authorizations apply to the results returned by the /history/task endpoint?

Update:

Found the way to access the historical variables: Get Variable Instances but not the historical Task form keys.

Found a similar question.

Sergey Shcherbakov
  • 4,534
  • 4
  • 40
  • 65

0 Answers0