Ich bin Anfänger in Camunda. Ich möchte eine Aufgabe erledigen. So beginne ich eine Instanz durch den Aufruf:camunda Kann keine Aufgabe mit ID Aufgabe finden ist null
http://localhost:8080/engine-rest/process-definition/key/approve-loan/submit-form
über Postman und POST-Anfrage mit folgenden Daten:
{
"variables": {
"customerId": {"value":"Niall","type":"String"},
"amount":{"value":"100","type":"String"}
}
}
und Content-Type : application/json
Ich habe die folgende Ausgabe:
{
"links": [
{
"method": "GET",
"href": "http://localhost:8080/engine-rest/process-instance/3f219a2a-138e-11e7-b49e-104a7ddf1366",
"rel": "self"
}
],
"id": "3f219a2a-138e-11e7-b49e-104a7ddf1366",
"definitionId": "approve-loan:2:8cd1ab3c-1303-11e7-b49e-104a7ddf1366",
"businessKey": null,
"caseInstanceId": null,
"ended": false,
"suspended": false,
"tenantId": null
}
Ich schaute in den Camunda Blog und ich fand ich c omplete die Aufgabe Instanz durch (POST-Request) Aufruf: http://localhost:8080/engine-rest/task/3f219a2a-138e-11e7-b49e-104a7ddf1366/complete
Das Problem, dass die Arbeit ist nicht der Fall, da ich die folgende Antwort:
{
"type": "RestException",
"message": "Cannot complete task 3f219a2a-138e-11e7-b49e-104a7ddf1366: Cannot find task with id 3f219a2a-138e-11e7-b49e-104a7ddf1366: task is null"
}
und diese Ausnahme in tomcat Konsole:
Caused by: org.camunda.bpm.engine.exception.NullValueException: Cannot find task with id 3f219a2a-138e-11e7-b49e-104a7ddf1366: task is null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:334)
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:49)
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:44)
at org.camunda.bpm.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:47)
at org.camunda.bpm.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:30)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:104)
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.camunda.bpm.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:170)
at org.camunda.bpm.engine.rest.sub.task.impl.TaskResourceImpl.complete(TaskResourceImpl.java:95)
... 37 more
Ich habe genannt http://localhost:8080/engine-rest/task/?processInstanceId=3f219a2a-138e-11e7-b49e-104a7ddf1366
Eigenschaften zu erhalten, und die Antwort ist
[
{
"id": "3f220f63-138e-11e7-b49e-104a7ddf1366",
"name": "Approve Loan",
"assignee": "john",
"created": "2017-03-28T10:12:12",
"due": null,
"followUp": null,
"delegationState": null,
"description": null,
"executionId": "3f219a2a-138e-11e7-b49e-104a7ddf1366",
"owner": null,
"parentTaskId": null,
"priority": 50,
"processDefinitionId": "approve-loan:2:8cd1ab3c-1303-11e7-b49e-104a7ddf1366",
"processInstanceId": "3f219a2a-138e-11e7-b49e-104a7ddf1366",
"taskDefinitionKey": "UserTask_11fud4o",
"caseExecutionId": null,
"caseInstanceId": null,
"caseDefinitionId": null,
"suspended": false,
"formKey": "embedded:app:forms/approve-loan.html",
"tenantId": null
}
]
Ich habe id
und executionId
verwendet, aber ich bekomme immer noch den Fehler.
Irgendwelche Hilfe bitte?
Sie testeten '3f220f63-138e-11e7-b49e-104a7ddf1366'? – Zelldon
@Zellon: ja Ich habe diese URL verwendet – Sofiane
Bitte versuchen Sie es erneut http: // localhost: 8080/Motor-Ruhe/Aufgabe/3f220f63-138e-11e7-b49e-104a7ddf1366/complete – Zelldon