Hi experts,
I’m testing with Bonita Community 7.2.3 and the Travel Requests sample.
This is my Human Task activity I’m trying to reject using REST API. I get its details with a GET call to http://localhost:8080/bonita/API/bpm/activity/120009:
{
“displayDescription”: “”,
“executedBy”: “0”,
“rootContainerId”: “5004”,
“assigned_date”: “2016-05-17 11:22:01.813”,
“displayName”: “Manager Review”,
“executedBySubstitute”: “0”,
“dueDate”: “2016-05-17 12:22:01.799”,
“description”: “”,
“type”: “USER_TASK”,
“priority”: “normal”,
“actorId”: “401”,
“processId”: “6234868444427837933”,
“caseId”: “5004”,
“name”: “Manager Review”,
“reached_state_date”: “2016-05-17 11:22:01.814”,
“rootCaseId”: “5004”,
“id”: “120009”,
“state”: “ready”,
“parentCaseId”: “5004”,
“last_update_date”: “2016-05-17 11:22:01.814”,
“assigned_id”: “1”
}
If I do a PUT call to: http://localhost:8080/bonita/API/bpm/activity/120009, using this payload:
{“state”: “completed”}
I get this error:
“exception”: “class org.bonitasoft.web.toolkit.client.common.exception.api.APIException”,
“message”: "org.bonitasoft.engine.bpm.flownode.FlowNodeExecutionException: USERNAME=william.jobs | org.bonitasoft.engine.bpm.contract.ContractViolationException: Error while validating expected inputs: [Expected input [status] is missing, Expected input [refusalReason] is missing]"
But when trying to set values to the variables using this payload:
{“state”: “completed”,
“variables”: [{“name”: “status”, “value”: “refused”},
{“name”: “refusalReason”, “value”: “NO WAY”}
]
}
I get a 404 error.
What am I doing wrong?
Regards,
Jose.