Unable to set JSON variable using set variable step | Community
Skip to main content
Level 2
September 6, 2021
Solved

Unable to set JSON variable using set variable step

  • September 6, 2021
  • 1 reply
  • 724 views

Hello,

 

I'm trying to set a few variables inside a JSON variable I created in my workflow, but is giving me the following error:

 

Caused by: com.adobe.granite.workflow.WorkflowException: com.adobe.granite.workflow.WorkflowException: Variable: shopsReviewResults to be updated is null
at com.adobe.granite.workflow.core.process.SetVariableProcess.execute(SetVariableProcess.java:178)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:195)
... 8 more
Caused by: com.adobe.granite.workflow.WorkflowException: Variable: shopsReviewResults to be updated is null
at com.adobe.granite.workflow.core.process.SetVariableProcess.execute(SetVariableProcess.java:102)
... 9 more

 

When I first created the JSON variable in the workflow, it asked my to create a JSON Schema:

Here Im trying to provide the first values to the JSON, but then the error showed before is triggered: 

Can somebody help me if I'm missing any steps, the set variable here I'm using is to initally load the JSON with some data but is not working.

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by manpreetk908

Hi,

This looks like a custom code implementation. Based on the attached log snippet, it looks like SetVariableProcess is null. This might be invoked from the java file SetVariableProcess. Also, you can check if the JSON data is getting stored at the node where the code is expecting to read this data.

1 reply

manpreetk908
manpreetk908Accepted solution
Level 4
September 14, 2021

Hi,

This looks like a custom code implementation. Based on the attached log snippet, it looks like SetVariableProcess is null. This might be invoked from the java file SetVariableProcess. Also, you can check if the JSON data is getting stored at the node where the code is expecting to read this data.