Working with "application/x-java-serialized-object" in PHP and GO

Hi together,

in the Camunda Modeller you can specifiy for an external task an input variable as list type.
Following there is an example.

variableFoo": {
                "type": "Object",
                "value": "rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAACdwQAAAACdAABTHQAAUZ4",
                "valueInfo": {
                    "objectTypeName": "java.util.ArrayList",
                    "serializationDataFormat": "application/x-java-serialized-object"
                }
            },

How can we handle this in an not “JVM” technology? And transform this also back?

regards Enrico

Looks like ArrayList does not get transformed into a string…

easy workaround for you: use SPIN JSON Array:

and then your Fetch and Lock will look like:

Request:

{
  "workerId":"aWorkerId",
  "maxTasks":2,
  "usePriority":true,
  "topics":
      [{"topicName": "myjob",
      "lockDuration": 1,
      "variables": ["myList", "myjson"]
      }]
}

Response:

[
    {
        "activityId": "Task_117vrvh",
        "activityInstanceId": "Task_117vrvh:5cdf1341-1102-11e8-aabd-0242ac120003",
        "errorMessage": null,
        "errorDetails": null,
        "executionId": "5cdf1340-1102-11e8-aabd-0242ac120003",
        "id": "5cec80cd-1102-11e8-aabd-0242ac120003",
        "lockExpirationTime": "2018-02-13T16:11:26.601-0500",
        "processDefinitionId": "myJobList:3:53ee68ca-1102-11e8-aabd-0242ac120003",
        "processDefinitionKey": "myJobList",
        "processInstanceId": "5cdeec2e-1102-11e8-aabd-0242ac120003",
        "retries": null,
        "suspended": false,
        "workerId": "aWorkerId",
        "topicName": "myjob",
        "tenantId": null,
        "variables": {
            "myList": {
                "type": "Object",
                "value": "rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAACdwQAAAACdAAKc29tZXZhbHVlMXQACnNvbWV2YWx1ZTJ4",
                "valueInfo": {
                    "objectTypeName": "java.util.ArrayList",
                    "serializationDataFormat": "application/x-java-serialized-object"
                }
            },
            "myjson": {
                "type": "Json",
                "value": "[\"value1\",\"value2\",\"value3\"]",
                "valueInfo": {}
            }
        },
        "priority": 0
    }
]