-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Steps to reproduce:
- deploy a process with a external task (with topic name foo)
- start an instance
- subscribe to the topic foo and set a serialized date variable
client.subscribe("foo", function({ task, taskService }) { const variables = new Variables(); variables.setTyped("dateValue", { type: "date", value: "2010-10-10T10:10:10", valueInfo: {} }); ... });
Actual Behavior:
The serialization of an already serialized date value fails with following message:
✖ couldn't complete task ..., TypeError: value.toISOString is not a function
Expected Behavior:
- the serialization is not executed in such a case
Additional:
The documentation [1] shows how to provide a date string as a value
// 2- providing a date string as a value: variables.setTyped("anotherDate", { type: "date", value: "31 march 1994", valueInfo: {} });
By default the provided date format "31 march 1994" is not supported by the REST Api.
The example should use a supported date format [2].
[1]: https://github.com/camunda/camunda-external-task-client-js/blob/master/docs/Variables.md#date
[2]: https://docs.camunda.org/manual/7.8/reference/rest/overview/date-format/