Open ThorbenLindhauer opened 3 years ago
This comment was imported from JIRA and written by user akPKWEzWhat is this name?
This pseudonym name was generated based on the user name in JIRA to protect the personal data of our JIRA users. You can use this identifier to search for issues by the same reporter.
This bug makes using the generic task form and using objects in process variables mutually exclusive. Since its mostly about removing one level of escaping, it would be great if this can be fixed soon
I heard rumors that @derari is interested in fixing this issue.
Is there any advice we can give a community contributor on where to dig? I guess it is the core engine, not tasklist failing here?
Hi Nico,
This needs a fix in tasklist. Tasklist makes the following request:
POST http://localhost:8080/camunda/api/engine/engine/default/task/<task id>/submit-form
{
"variables": {
"myPojo": {
"value": "\"{\\\"prop1\\\":\\\"foo\\\",\\\"prop2\\\":42}\"",
"type": "Object",
"valueInfo": {
"objectTypeName": "org.camunda.bpm.platform.example.servlet.MyPojo",
"serializationDataFormat": "application/json"
}
}
}
}
whereas the correct request body would be:
{
"variables": {
"myPojo": {
"value": "{\"prop1\":\"foo\",\"prop2\":42}",
"type": "Object",
"valueInfo": {
"objectTypeName": "org.camunda.bpm.platform.example.servlet.MyPojo",
"serializationDataFormat": "application/json"
}
}
}
}
So a bit too much escaping going on. When fixing this, we should also check if that impacts any of the other variable types and make sure we are not introducing regressions.
Cheers, Thorben
edit: I don't have a pointer to the corresponding code as I'm not that familiar with the frontend code. But happy to let someone else look into this if there is a serious interest in contributing and another hint is needed :)
This issue was imported from JIRA:
What are the steps to reproduce your problem?
A sample application is attached for quick reference.
Steps followed
SomeDelegate
which sets an object variable in Java API.