Flow Designer NullPointerException
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 11:52 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 12:06 PM
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**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 12:16 PM - edited 12-21-2022 12:43 PM
All data pills have values in the log.
Edit: Figured it out.
How do you log the value in the data pills?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 12:06 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 12:22 PM
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);