Skip to main content
15-Moonstone
November 21, 2023
Question

Workflow Creation Error

  • November 21, 2023
  • 1 reply
  • 1511 views

Hi Community,

 

I created a new flow by clicking new template from the templates page. But the flow gets stuck at the first step and gives an error that it should not give, what could be the reason for this?  Even though I defined all the parameters correctly, nothing changed.

Code:

wt.doc.WTDocument doc = (wt.doc.WTDocument) primaryBusinessObject;

 docNumber=doc.getNumber();
 docName=doc.getName();

 Error:

wt.workflow.engine.FailedExpressionException: 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

 

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
November 21, 2023

Hi @smcvr 

You should be sure that the primaryBusinessObject is not null and also is the correct type.

 

PetrH

smcvr15-MoonstoneAuthor
15-Moonstone
November 21, 2023

Hi @HelesicPetr 

 

Yes, I am sure. When I try it with another previously created workflow, it does not give these errors. I think I'm getting this error because I created this with a new template.

smcvr15-MoonstoneAuthor
15-Moonstone
November 21, 2023

I checked but it still doesn't work.

I'm trying the same type in a different stream, in an existing stream.
The code does not cause the same problem, it works.
When I look at the two streams I don't see any difference.
Is it difficult to create a flow with New Template?

 

smcvr_0-1700575967071.png

It doesn't import the above attribute values in the newly created stream.