Skip to main content
12-Amethyst
April 25, 2024
Solved

Change Workflow not starting

  • April 25, 2024
  • 2 replies
  • 2180 views

Change Notice and activity workflows are not starting suddenly. Didn't have any clue regarding the root cause. Earlier they are working fine. The same workflows are working on other environment. Can anyone throw some light on the root cause?

2024-04-25 11:39:10,182 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - java.lang.reflect.InvocationTargetException
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.definer.WfExpression.invokeByReflection(WfExpression.java:1464)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.definer.WfExpression.executeTransition(WfExpression.java:1407)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.definer.WfExpression.execute(WfExpression.java:523)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.engine.WfExecutionObject.evaluateExpression(WfExecutionObject.java:857)
2024-04-25 11:39:10,183 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:698)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:283)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.engine.StandardWfEngineService.changeState(StandardWfEngineService.java:1384)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at jdk.internal.reflect.GeneratedMethodAccessor560.invoke(Unknown Source)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.queue.QueueEntry.execute(QueueEntry.java:231)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.queue.QueueRunnable.run(QueueRunnable.java:159)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2024-04-25 11:39:10,184 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at java.base/java.lang.Thread.run(Thread.java:829)
2024-04-25 11:39:10,185 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - Caused by: java.lang.NullPointerException
2024-04-25 11:39:10,185 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	at wt.workflow.expr.WfExpression196435081.executemethod_1(WfExpression196435081.java:50)
2024-04-25 11:39:10,185 INFO [WfPropagationQueue.PoolQueueThread-25184] wt.system.err wcadmin - 	... 19 more
2024-04-25 11:39:10,200 ERROR [WfPropagationQueue.PoolQueueThread-25184] root wcadmin - Queue entry number: 8377992 java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor560.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at wt.queue.QueueEntry.execute(QueueEntry.java:231)
	at wt.queue.QueueRunnable.run(QueueRunnable.java:159)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: wt.workflow.engine.CannotStartException: 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.engine.WfProcess.getWfException(WfProcess.java:1336)
	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:919)
	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:283)
	at wt.workflow.engine.StandardWfEngineService.changeState(StandardWfEngineService.java:1384)
	... 8 more
Caused by: wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
	at wt.workflow.definer.WfExpression.executeTransition(WfExpression.java:1430)
	at wt.workflow.definer.WfExpression.execute(WfExpression.java:523)
	at wt.workflow.engine.WfExecutionObject.evaluateExpression(WfExecutionObject.java:857)
	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:698)
	... 10 more
Caused by: java.lang.NullPointerException
	at wt.workflow.expr.WfExpression196435081.executemethod_1(WfExpression196435081.java:50)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at wt.workflow.definer.WfExpression.invokeByReflection(WfExpression.java:1464)
	at wt.workflow.definer.WfExpression.executeTransition(WfExpression.java:1407)
	... 13 more

2024-04-25 11:39:10,207 WARN [WfPropagationQueue.PoolQueueThread-25184] wt.jmx.notif.queue wcadmin - Time=2024-04-25 11:39:10.206 -0600, Name=QueueNotifier, SourceObjectName=com.ptc:wt.subsystem=Monitors,wt.monitorType=Queues,Name=StandardQueueService,Emitter=GenericExecEntryNotifier, class=class javax.management.Notification, type=wt.queue.NotifierMBean.queueEntryExec.problems, userData=8377992, message=Queue WfPropagationQueue experiencing entry execution problems, JVM Name=946047@adcvmlx053.gates.com, Queue Info=[MinMinutesBetweenNotifications=30]
2024-04-25 11:39:10,211 ERROR [WfPropagationQueue.PoolQueueThread-25184] wt.method.MethodContextMonitor.contexts.other wcadmin - 2024-04-25 11:39:07.297 -0600, -4qvw2y4lp1yc;lvaswzxx;946047;nlquu1;494721, -, -, -, wcadmin, adcvmlx053.gates.com, wt.queue.QueueRunnable-WfPropagationQueue, run, , 0, 25, 0.043779136, 4, 0.004123892, 0.031180576, 2.914208913 wt.workflow.engine.CannotStartException: 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.WfExpression196435081.executemethod_1(WfExpression196435081.java:50)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at wt.workflow.definer.WfExpression.invokeByReflection(WfExpression.java:1464)
	at wt.workflow.definer.WfExpression.executeTransition(WfExpression.java:1407)
	at wt.workflow.definer.WfExpression.execute(WfExpression.java:523)
	at wt.workflow.engine.WfExecutionObject.evaluateExpression(WfExecutionObject.java:857)
	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:698)
	at wt.workflow.engine.WfProcess.changeState(WfProcess.java:283)
	at wt.workflow.engine.StandardWfEngineService.changeState(StandardWfEngineService.java:1384)
	at jdk.internal.reflect.GeneratedMethodAccessor560.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at wt.queue.QueueEntry.execute(QueueEntry.java:231)
	at wt.queue.QueueRunnable.run(QueueRunnable.java:159)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

 

Best answer by Florent@BRP

Hi,

 

you have a NPE (Null Pointer Exception) in a robot expression.

To see exactly where, you need to look at the Java source file generated by the framework: <WT_HOME>/codebase/wt/workflow/expr/WfExpression196435081.java

Caused by: java.lang.NullPointerException
	at wt.workflow.expr.WfExpression196435081.executemethod_1(WfExpression196435081.java:50)

 

 Line 50 is where you should see what variable is null.

 

To get that file generated, you have to "Externalize expressions" of the workflow that fails. 

 

Florent

2 replies

12-Amethyst
April 26, 2024

Hi,

 

you have a NPE (Null Pointer Exception) in a robot expression.

To see exactly where, you need to look at the Java source file generated by the framework: <WT_HOME>/codebase/wt/workflow/expr/WfExpression196435081.java

Caused by: java.lang.NullPointerException
	at wt.workflow.expr.WfExpression196435081.executemethod_1(WfExpression196435081.java:50)

 

 Line 50 is where you should see what variable is null.

 

To get that file generated, you have to "Externalize expressions" of the workflow that fails. 

 

Florent

Srivalli12-AmethystAuthor
12-Amethyst
April 26, 2024

This is awesome! I did "Externalize expressions", it generated a java file in src. 

The line where I am getting null pointer exception is because of a custom variable for change notice description, it was empty and didn't created a null check. Thank you very much @Florent@BRP 

 

Srivalli12-AmethystAuthor
12-Amethyst
May 20, 2024

@Florent@BRP  Once we externalize and do a restart, the workflow code in the robots is changed, we faced some issues while running workflows, they got stuck. Is there a way we can revert this?

 

Or, could you help me understand how do we manage if we externalize workflows in a cluster environment?

18-Opal
April 26, 2024

Clearly the process is having a hard time changing its state.

Is the target state even available for the process?

What is the target state?

 

You really need to post all the info.