how to map workflow variables to json objects using the json tool ?

Confluence User - 18 Dec, 2016

I have used the JSON tool to map the data from a JSON url to the fields of a particular form. It is working fine as far as updating the form table is concerned. But adding the mapping for the workflow variable part of the JSON tool is throwing the following error:

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.Map

 at org.joget.apps.app.lib.JsonTool.getObjectFromMap_aroundBody18(JsonTool.java:157)

 at org.joget.apps.app.lib.JsonTool.getObjectFromMap_aroundBody19$advice(JsonTool.java:94)

 at org.joget.apps.app.lib.JsonTool.getObjectFromMap(JsonTool.java:1)

forms;plugins;process;json;tools

2


19 Dec, 2016
confluenceUser
confluenceUser

Hi, you might need to provide more information on how to reproduce your problem. Try providing steps to recreate the issue, or perhaps the JSON response that is returned.

21 Dec, 2016
confluenceUser
confluenceUser

Hi Anders, Thanks for responding. Here is what i tried: 1. I have a simple process with a plugin tool using JSON tool pugin. 2. I have a json object available in some url (which i provide in the JSON url property of the tool), which looks something like - {root:[{stem:1,........}]}. 3. in the workflow variable mapping section of the json tool, i tried a mapping like below(where var1 is a workflow variable created and added to the process): var1 -------> root.stem 4. I ran the process and checked the logs. 5. Got the Class Cast Exception logs as shown in the question.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print