Hi there, we do have a requirement to store long values as part of BPMN. In order to workaround the limitation of string’s 4K restriction, we decided to go with JSON. Now, the only way to pass JSON object I could find so far is the following:
this required to setup spin extension, but at least both groove and javascript script formats work well. But our main issue right now is that parameter value is mixed with some code (i.e. S function) which makes the whole setup be fragile. I am looking for any other way to pass such long variables? The ideal would be something like this:
@JussiL How would java delegate solve the issue? I mean if one defines long var in input param of BPMN, this will cause camunda to store it in DB, which once again raises value too long exception.
As I wrote in my question, the long variables are set via BPMN directly… You can find example attached. As you see, I have to use S function to compose the complex object, otherwise, if I used stringified representation of the JSON, it would fail with value too long exception. test.bpmn (31.2 KB)
Well if it is hardcoded, and you don’t want to include the S function, you could just write a Java delegate that creates the Json and stores it into a process variable.
@JussiL just to make it clear, the idea is to have some custom delegate code which will accept the stringified JSON and will save it as complex object (BLOB), instead of setting it manually in BPMN. Is this right?
If you are already have it as JSON I do not undertand why you need to convert it in the first place. If it is a String Object, I think you will be in trouble, as it will remain a string in history even if you convert it.