camunda-community-hub / camunda-community-hub/camunda-external-task-client-python3
List variable serialized
- Dominant language
- Python
- Stars
- 81
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
I have variables of type 'list in my BPMN. When I use get_variable() method I'm getting a serialized Java object. How can I convert it to a python list ?
exemple :
- On bpmn : my_var = [ "hello", "world" ]
- In python external task workder:
print(task.get_variable('my_var')) => rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAACdwQAAAACdAAHIndvcmxkInQAByJoZWxsbyJ4
print(base64.b64decode(task.get_variable('my_var'))) => b'\xac\xed\x00\x05sr\x00\x13java.util.ArrayListx\x81\xd2\x1d\x99\xc7a\x9d\x03\x00\x01I\x00\x04sizexp\x00\x00\x00\x02w\x04\x00\x00\x00\x02t\x00\x07"world"t\x00\x07"hello"x'
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the task.get_variable() entry point and the serialized value reproduced in the issue. Trace how list variables are returned by the external task client, then verify that the result can be used as a Python list and add or update coverage for this example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100