Hi there,
I would like to ask if Camunda supports the fetching of an existing JSON variable by writing Java code.
Something like this but with Java (not Javascript):
Thanks in advance,
Steve
Hi there,
I would like to ask if Camunda supports the fetching of an existing JSON variable by writing Java code.
Something like this but with Java (not Javascript):
Thanks in advance,
Steve
Hey Steve,
are you looking for something like this: https://docs.camunda.org/manual/7.11/user-guide/data-formats/json/#native-json-variable-value ?
You would need to integrate Spin in your application, if you did not yet do it: https://docs.camunda.org/manual/7.11/user-guide/data-formats/configuring-spin-integration/
Best,
Tobias
Hey @tmetzke and thanks a lot for your feedback
I think that this is what I want but I have to test it with the help of a developper.
As far as the Spin integration is concerned, I’ve been using the pre-packaged distribution of Apache Tomcat in my Camunda project so, I think that Spin is already integrated, isn’t it ?
Best,
Steve
Hey Steve,
great that this looks promising to you, let me know if it worked out.
The default configuration comes with the Spin plugin enabled, yes.
You can check the bpm-platform.xml
in your tomcat server to make sure this is true, it should look like documented here: https://docs.camunda.org/manual/latest/user-guide/data-formats/configuring-spin-integration/#configuring-the-spin-process-engine-plugin
Best,
Tobias
Hi @tmetzke,
As far as the Spin integration is concerned, I just checked it, it is enabled in my server.
I would like to ask you if you know how can I take an html from an existing JSON variable by writing Java. My final purpose is to give this html to a function (like openhtmltopdf for example) so as to produce a pdf document.
Thanks a lot,
Steve
Hey Steve,
sorry for the late response, just returned from a vacation.
Could you provide an example for this?
Can the HTML be serialized as a string and put as a value of an attribute in the JSON variable, as shown here: https://www.thorntech.com/2012/07/4-things-you-must-do-when-putting-html-in-json/ ?
This way, you could extract the HTML String in Java from the JSON variable as documented, transform it back to valid HTML and pass it on to another function.
Hope that helps.
Best,
Tobias