calling getter inside method Returns java.lang.NullPointerException with Activiti Engine

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

Re: calling getter inside method Returns java.lang.NullPointerException with Activiti Engine

Nope, these are simple spring beans and need to be declared in the spring context.

Highlighted
Active Member

Re: calling getter inside method Returns java.lang.NullPointerException with Activiti Engine

For example @Service("bookOrder") won't work ? 

Highlighted
Intermediate

Re: calling getter inside method Returns java.lang.NullPointerException with Activiti Engine

If you're using spring annotation based configuration then this is what you would do.

If you are using xml based configuration (which is what it appears you are doing) then you would use the activiti.cfg.xml

Highlighted
Active Member

Re: calling getter inside method Returns java.lang.NullPointerException with Activiti Engine

Thank you Geg ,
Let's say you have a ServiceTask where you pass expression , activiti:expression="${operationController.sayHello()}" .
and your method implements something like this :
public void sayHello(){

System.out.println("the isbn :"+bookOrder.getIsbn()); 

}

the value of ISBN comes from a JSF Form , How would you implement this ?