I have generated simple camunda-modeler form with relative values than i want to use this form values( after submiting and use it as an argument for my another embedded form , for this reason i have used this java code:
public void execute(DelegateExecution execution) throws Exception {
Object jsonObjectData = new JSONObject();
Long id=(Long) execution.getVariable(“id”);
String period=(String) execution.getVariable(“period”);
String CardNumber=(String) execution.getVariable(“Number”);
((JSONObject) jsonObjectData).put(“CardNumber”,CardNumber);
((JSONObject) jsonObjectData).put(“id”,id);
((JSONObject) jsonObjectData).put(“period”, period);
JSONArray arr=new JSONArray();
arr.put(jsonObjectData);
JSONObject processedData=new JSONObject();
processedData.put(“data”,arr );
execution.setVariable(“jsonData”,processedData);
System.out.println(processedData);
}
and then i want to use it in another form , but i got this error:
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
and when i use this console.log( jsonData) i got this <?xml version="1.0" encoding="UTF-8"?><JSONObject/>
what should i add to be able to use camunda modeller form data into my embedded form?