To pass object to process variable

How to pass a json object to process variable of camunda.

for instance

{
“someKey1”: “”,
“someKey2”: “”,
“someKey3”: “”
}

@Minisha_M, you need to send that object as serialized json string.

https://docs.camunda.org/manual/7.13/reference/rest/process-definition/post-start-process-instance/

Name Description
variables A JSON object containing the variables the process is to be initialized with. Each key corresponds to a variable name and each value to a variable value. A variable value is a JSON object with the following properties:
value The variable’s value. For variables of type Object , the serialized value has to be submitted as a String value. For variables of type File the value has to be submitted as Base64 encoded string.
type The value type of the variable.
valueInfo A JSON object containing additional, value-type-dependent properties.

For serialized variables of type Object , the following properties can be provided:

  • objectTypeName : A string representation of the object’s type name.
  • serializationDataFormat : The serialization format used to store the variable.||
1 Like