Skip to Content
Former Member
Jul 05, 2013 at 08:21 AM

Null pointer error in Pre Phase change script


Hi Expert,

We have build a 1- step workflow and Approver are selected based on Commodity and Country of Master Agreement from a Custom Master Data Table.

We are having a requirement to call the workflow xpdl if there is a valid approver in Custom Master Data Table. If there is no match then prompt an error message to user that there is no matching Approver in Table.

We have assigned the workflow xpdl in "Route for Approval" phase.

So we have created a script in Pre Phase change scripting context to validate the table entry. We extracted the next phase in the script and if the next phase is "Route for Approval" then trigger this script and validate the custom table and the Script is working properly as expected.

But now when we are creating a new Contract Document it is throwing an error as "Null Pointer in Method Invocation" in findValidNextPhasesExternalIds().

home = doc.getIBeanHomeIfc();

nextPhase = home.findValidNextPhasesExternalIds(doc).get(0);

Can you please suggest how to get rid of this error message.

Appreciate your help.