Updating process viarables via REST

cancel
Showing results for 
Search instead for 
Did you mean: 
jaco1
Active Member II

Updating process viarables via REST

Jump to solution

Hi all.

When I send a list of variables only the last one is updated.

PUT

https://10.64.9.134:9445/bpmn/runtime/process-instances/5001/variables

[
      {
        "name":"income",
        "type":"integer" ,
        "value":20000 ,
        "name":"loanAmount",
        "type":"integer" ,
        "value":500
      }
      
]

Then the response will be

{
    "restVariables": [
        {
            "valueUrl": null,
            "variableScope": "LOCAL",
            "scope": "local",
            "name": "loanAmount",
            "value": 500,
            "type": "integer"
        }
    ]
}

Also when I create a instance and send the list of variables only the last one is set. What am I doing wrong with the list ?

How do I set a list of more than one ?

1 Solution

Accepted Solutions
jaco1
Active Member II

Re: Updating process viarables via REST

Jump to solution

OK I got it working. The JSON should look like this

[
      {
        "name":"income",
        "type":"integer" ,
        "value":100
      },
      {
        "name":"loanAmount",
        "type":"integer" ,
        "value":200
      }
      
]

View solution in original post

1 Reply
jaco1
Active Member II

Re: Updating process viarables via REST

Jump to solution

OK I got it working. The JSON should look like this

[
      {
        "name":"income",
        "type":"integer" ,
        "value":100
      },
      {
        "name":"loanAmount",
        "type":"integer" ,
        "value":200
      }
      
]