cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Odd issue when launching ECN NullPointerException is thrown in the Submit Now Synch robot

sdrzewiczewski
10-Marble

Odd issue when launching ECN NullPointerException is thrown in the Submit Now Synch robot

We are struggling with weird behavior on a workflow we are developing. When the ECN is created using the Submit Now option it fires off the Submit Now synch robot. The lifecycle has changed from Open to Under Review, but the code in the Synch Robot causes a failure seen below.


I have created a simple version of the workflow with just the synch robot and an activity after that and ran it on the now created ECN and now error is thrown on the Synch Robot.


Has anybody experienced anything like this? We are working with tech support, but are waiting for them to educated themselves on how the change process works before they can help us out.




wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
Nested exception is: wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
wt.workflow.WfException: wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
Nested exception is: wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
at wt.workflow.expr.WfExpression438118127.execute_INITIAL_SYNCH_EXPRESSION_(WfExpression438118127.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at wt.workflow.definer.WfExpression.executeFilter(WfExpression.java:1253)
at wt.workflow.definer.WfExpression.execute(WfExpression.java:517)
at wt.workflow.robots.WfSynchRobot.executeExpr(WfSynchRobot.java:1065)
at wt.workflow.robots.WfSynchRobot.checkInitialCondition(WfSynchRobot.java:626)
at wt.workflow.robots.WfSynchRobot.subscribeToObjectEvent(WfSynchRobot.java:907)
at wt.workflow.robots.WfSynchRobot.run(WfSynchRobot.java:212)
at wt.workflow.engine.StandardWfEngineService.runRobot(StandardWfEngineService.java:918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at wt.queue.QueueEntry.execute(QueueEntry.java:232)
at wt.queue.ProcessingQueue.execEntry(ProcessingQueue.java:287)
at wt.queue.ProcessingQueue.execEntries(ProcessingQueue.java:904)
at wt.queue.PollingQueueThread.run(PollingQueueThread.java:115)
java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
at wt.workflow.expr.WfExpression438118127.execute_INITIAL_SYNCH_EXPRESSION_(WfExpression438118127.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at wt.workflow.definer.WfExpression.executeFilter(WfExpression.java:1253)
at wt.workflow.definer.WfExpression.execute(WfExpression.java:517)
at wt.workflow.robots.WfSynchRobot.executeExpr(WfSynchRobot.java:1065)
at wt.workflow.robots.WfSynchRobot.checkInitialCondition(WfSynchRobot.java:626)
at wt.workflow.robots.WfSynchRobot.subscribeToObjectEvent(WfSynchRobot.java:907)
at wt.workflow.robots.WfSynchRobot.run(WfSynchRobot.java:212)
at wt.workflow.engine.StandardWfEngineService.runRobot(StandardWfEngineService.java:918)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at wt.queue.QueueEntry.execute(QueueEntry.java:232)
at wt.queue.ProcessingQueue.execEntry(ProcessingQueue.java:287)
at wt.queue.ProcessingQueue.execEntries(ProcessingQueue.java:904)
at wt.queue.PollingQueueThread.run(PollingQueueThread.java:115)

10 REPLIES 10

Hi Stephen,

Is it an OOTHB sync robot?
It generates null pointer exception when evaluating top block of the sync robot.
execute_INITIAL_SYNCH_EXPRESSION_

If you did modifications to PTC code check that all of your variables are initialized.


[cid:image001.jpg@01CF79B6.FC1495D0]

Igor Varshavsky
Senior Application Specialist

The code in the Synch robot is OOTB. We didn't modify any PTC code.

The variables in the ECN look good, but the isInitialPhase variable never changes from True to False as it should when the Synch Robot fires.

Does it work if you select no to Submit Now and then submit separately?

It still errors on the synch robot, but you can complete the Submit Now task, and then it fails on the next expression robot which is setting the submit date. Again ootb code.

It is extremely baffling.


Hmmmm..

We got rid of the whole Submit Now / Later concept. Instead, we send the first Task to the Creator, using Setup Participants - allowing them to select / confirm all needed approvers.

Looks like there is syn robot is running in the system which contain expression that is giving NPE.whenever state change event occurs for ECN that sync robot will fire and throws NPE. Also check if you able to change the state of ECN by set state



From stack trace it look like expression WfExpression438118127 is giving NPEYou can searchCreate some SQL to find out which process is in running state and using expression WfExpression438118127

Hope this help!!!
Thanks


Shreyas

Sent from my iPad

Thanks to all that have replied. Still haven't resolved the issue but are starting to narrow in on some causes. We've tried to delete all the old WF processes from this WF (Not many since it was being developed) and two of them can't be deleted. Looking at the logs, it reports that the ECN is not persistant. but the odd thing is both workflows which are for different ECNs give the same error.


I'm running some WinDU and WinRU tasks to see if that clears this up.

Hey Steve,


Did you modify anything in the workflow before submit later set state to under review? Did you create a new ECN or terminated the workflow by set-state back to open?


Just try to create a OOTB ECN from scratch using the OOTB ECN workflow. The submit now is supposed to promote the ECN to under review and terminate the submit later. If you remove the submit later task, you may get the null pointer.


I do recal getting that error before when trying to rearrange the OOTB process by removing the submit later activiity.


Start over and see,


Patrick

It's only affecting this object type and workflow. After some digging around and convincing PTC T.S. agrees that it appears to be a data issue. There is something wacky in the system that is causing it to hang. We showed that the same process works on another system, then when imported back into this system it would not work.

Right now we are at a waiting pattern for R&D to help us understand 1) how to fix it 2) why this happened so if it is something with our code later in the workflow that broke something we can fix it before we go live and take down production.

sd

The issue ultimately was in the workflow. The root cause was a new process level variable that was created as an int and did not have a default value. This caused the NullPointerException.

As soon as we updated the workflow to put a value of 0 for the one int variable the ECNs started to work as expected.

Today's workflow life lesson brought to you by iRobot. 🙂

Thanks for all the help!
Announcements


Top Tags