Flow Designer NullPointerException

Kaniel Battles
Tera Contributor

I am receiving the error below when running a flow that calls a custom action to insert records into a SQL Database.  

Flow Designer: Operation(SQL Insert.9695db1397f31d5497b2f576f053afab.5295db1397f31d5497b2f576f053afcb./start) failed with error: com.snc.process_flow.exception.InValEvaluationException: java.lang.NullPointerException

 

The action works as designed.  I am receiving this error as soon as the flow calls the action.  I have deleted and recreated the flow.  I have removed the action and added it back.  I have hard coded values in the test.  Nothing works. Any ideas what is causing this error?  

7 REPLIES 7

reshmapatil
Tera Guru

Hi @Kaniel Battles ,

 

Have you checked Flow Execution?

Best to put logs in the script or Log action where you are passing or setting values from Data pill.

 

Maybe you are passing the record object as sys_id to any action.

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

All data pills have values in the log.

Edit:  Figured it out.  

How do you log the value in the data pills?

SanjivMeher
Kilo Patron
Kilo Patron

Do you have a field which may contain null value and you are trying to convert it to string or array?

Can you post the script in your action?


Please mark this response as correct or helpful if it assisted you with your question.

The action works fine.  It is failing when called from the flow.

(function execute(inputs, outputs) {
// ... code ...
var c = inputs.columns;
 for(var i=0; i < c.length; i++){
   c[i] = "'" + c[i] + "'";
 }

var q = c.join(",");
gs.info("C: " + c);
gs.info("Q: " + q.toString());
outputs.sqlcolumns = q.toString();
gs.info("INSERT INTO ATM_Master Values (" + q + ")");
})(inputs, outputs);