Hi All
I'm attempting to signal a receive task from a rest call.
In my unit test I successfully perform the following actions i.e. receive a message and correlate;
Execution execution = runtimeService.createExecutionQuery()
.processInstanceId(processInstance.getId()).activityId("Receive_Task").singleResult();
Map<String, Object> processVars = new HashMap<String, Object>();
processVars.put("accepted", "No");
processVars.put("correlationId", "12349");
runtimeService.signal(execution.getId(), processVars);
The documentation describes the rest call to use
http://docs.camunda.org/latest/api-references/rest/#execution-trigger-executionI invoke the following query to get the id (I'd like a recommendation on how I should be doing this...)
http://localhost:8080/engine-rest/engine/default/history/activity-instance?activityId=Receive_TaskUsing the returned {id} I execute
http://localhost:8080/engine-rest/engine/default/execution/6dca9956-dd28-11e3-984c-a41731bf77d7/signalwith Content-Type : application/json
{ "accepted" : "No", "correlationId" : "12349" }
The receive task is followed by a XOR gateway with an expression ${accepted == "No"} on a sequence flow, which works fine in the unit test.
However when deployed I get the error
- {
- "type": "RestException",
- "message": "Cannot signal execution 6dca9956-dd28-11e3-984c-a41731bf77d7: Unknown property used in expression: ${accepted == "No"}. Cause: Cannot resolve identifier 'accepted'"
- }
Any ideas on how I should be calling from REST and why the error above?
Any help appreciated.
Regards
Tom