Expand my Community achievements bar.

SOLVED

Unable to set JSON variable using set variable step

Avatar

Level 2

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:

SebasRios34_0-1630956673590.png

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

SebasRios34_1-1630956755385.png

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

1 Accepted Solution

Avatar

Correct answer by
Level 4

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

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.