0

I have a many human task. After start the process i want to update some process variable value with rest API call that's relates to current task. If anyone knows how to do that commend bellow.

I try with /execute this is only start the task then how to update the process variable for already started process instance?

Gokul P
  • 444
  • 1
  • 5
  • 18

1 Answers1

0

Based on the documentation

Here is how to do update the process variable. However, this will update an entire process rather than only that specific task.

server/containers/{id}/processes/instances/{pInstanceId}/variables - POST

If you want to update process variable from a task, you should do it during task completion. However, this requires you to have output variables from that task. Otherwise, it won't take any effect.

server/containers/{id}/tasks/{tInstanceId}/states/completed - PUT

Anyway, the full documentation of rest can be viewed in

{localhost}:{port}/kie-server/docs
hnandarusdy
  • 412
  • 5
  • 19
  • Hi @hnandarusdy, thanks for yout reply. I'm using `http://uname:pwd@172.17.0.3:8080/jbpm-console/rest/' ` i can able to get variable value through `curl -X GET 'http://uname:pwd@172.17.0.3:8080/jbpm-console/rest/runtime/{deploymentId}/process/instance/164896/variable/work' ` but i can't set back that variable. – Gokul P Oct 30 '17 at 07:08
  • I see... I am not really sure if it is through jbpm-console. I thought you would deploy the kie-server also. Have a try this http://host:port/jbpm-console/rest/task//complete?= from this link: https://aboullaite.me/using-jbpms-restful-api/ (I have never tried my self as I used kie server) – hnandarusdy Nov 02 '17 at 22:42
  • while completing the current task we can update but my situation is task still running I want to update some process variable value through jbpm-console/rest API call. – Gokul P Nov 03 '17 at 04:51