401 Unauthorized for /bonita/API/bpm/userTask/80019/execution

1
0
-1

Bonita BPM Studio Version: 7.8.4
I have create a new instance of a process and trying to complete them using Rest APIs using postman as Rest Client. Steps followed

  1. Login in using the task onwer credentials , helen.kelly
    POST /bonita/loginservice

Task and Owner Details:
Task Details:80019

{
"displayDescription": "",
"executedBy": "0",
"rootContainerId": "4007",
"assigned_date": "2019-07-11 10:48:16.613",
"displayName": "Review Request",
"executedBySubstitute": "0",
"dueDate": "",
"description": "",
"type": "USER_TASK",
"priority": "normal",
"actorId": "410",
"processId": "8955091866381748903",
"caseId": "4007",
"name": "Review Request",
"reached_state_date": "2019-07-11 10:48:16.615",
"rootCaseId": "4007",
"id": "80019",
"state": "ready",
"parentCaseId": "4007",
"last_update_date": "2019-07-11 10:48:16.615",
"assigned_id": "3"
}
User Details:
User Details:

{
"firstname": "Helen",
"icon": "icons/default/icon_user.png",
"creation_date": "2019-07-03 08:21:19.173",
"userName": "helen.kelly",
"title": "Mrs",
"created_by_user_id": "-1",
"enabled": "true",
"lastname": "Kelly",
"last_connection": "2019-07-11 10:48:07.211",
"password": "",
"manager_id": "1",
"id": "3",
"job_title": "Human resource manager",
"last_update_date": "2019-07-03 08:21:19.173"
}

  1. Executing the Task
    POST /bonita/API/bpm/userTask/80019/execution
    POST /bonita/API/bpm/userTask/80019/execution HTTP/1.1
    Content-Type: application/json
    User-Agent: PostmanRuntime/7.15.2
    Accept: /
    Cache-Control: no-cache
    Postman-Token: 44c62873-dda3-45da-9008-292d8d56881f
    Host: localhost:8080
    Cookie: bonita.tenant=1; X-Bonita-API-Token=ec41d0ac-1686-4b29-b89a-a53b6fb0a93b; JSESSIONID=A56D85A14A1F326AFF1E475405498C8F
    Accept-Encoding: gzip, deflate
    Content-Length: 45
    Connection: keep-alive

Response

HTTP/1.1 401

Comments

Submitted by antoine.mottier on Mon, 09/30/2019 - 13:38

What I can suggest to investigate the issue is to try to perform the task using Bonita Portal and compare the REST request sent by the Portal with the one you are sending. You can get information about the request sent by the Portal using the web developer tools of your web browser.

My first guess was that the task was not assigned but according to the JSON you shared the tasked is correctly assigned to Helen Kelly ("assigned_id": "3").

No answers yet.
Notifications