I try to build first test diagram/process and publish it to the server.
I have no idea how to publish it from Modeler (did open another ticket yet no answer) so I try to use camunda REST.
OK, I sent file to the server using ‘deployment/create’ method. I got 200 response so I think it’s OK. I see the process on the server in ‘processes’ menu. So I try to run it using ‘process-definition/key/xx/start’ method. I got response:
…and response code 200. So all should be fine. But process is not running. So response is completely out of the point. When I use url that i have in the response I get message:
“Process instance with id 20a6efb9-8b14-11eb-a0d2-049226bdb658 does not exist”
If it does not exists why the answer was OK?
Camunda’s response are OK does not matter what it really is?
I see there are some bugs.
REST reports process as started but platform dashboard does not reflect this state. Looks like not started.
I entered modeler and did press "start current diagram’. This time process was started and If I I execute REST call again, this time server really start process - I see two instances running.
Thanks for the reply.
I’ve tried once more creating new process and this time it worked as I expected; I used ‘deployment/create’ method then ‘process-definition/key/approval-test-process/start’ and I could see the process running - ‘running activity instances: 1’.
So this display panel has some problems sometimes in some conditions.
But I see another problem.
I wanted to remove process definition. So first I deleted running instances using ‘process-instance’. OK, worked. Then I tried to remove process definition. Response was that command was executed but dashboard still did display this instance. I had to restart server and execute method again. This time definition was removed.
I did repeat this for another instance and this time… all worked fine
I arrived to the point where I want to complete task.
After ‘deployment/create’ I executed ‘process-definition/key/approval-test-process/start’ with json body:
I see these variables on server. Great.
But when I want to complete task with ‘task/4fcca16b-811c-11eb-9d1b-049226bdb658/complete’ I get response:
“message”: “Cannot complete task 4fcca16b-811c-11eb-9d1b-049226bdb658: Unknown property used in expression: ${approved}. Cause: Cannot resolve identifier ‘approved’”
I do not see any ‘approved’ word in my diagram.
I think I do not need to send again variables (were sent when process was started) but even so it’s still same. What’s the problem?
Anyway. I do not get one thing. Applications start a process (user did fill form and clicked ‘sent’). So I should receive process ID to be able to execute ‘complete task’. But I do not have it. If I list the task I could get several IDs so I do not know what is what.
How do you handle that?
But… that was not a problem for Camunda REST and I got list of tasks. Even if they were not attached to this process ID… even if such ID does not exists
So I was using task ID from another process where such variable was not existing.
You definitively need some REST expert. REST cannot return some random values.
Same if I change GET to POST - in result I will receive wrong values(!).
Anyway. I do not get one thing. Applications start a process (user did fill form and clicked ‘sent’). So I should receive process ID to be able to execute ‘complete task’. But I do not have it. If I list the task I could get several IDs so I do not know what is what.
How do you handle that?