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

cancel
Showing results for 
Search instead for 
Did you mean: 
gdharley
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.

ilyass_act
Active Member

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

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

gdharley
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

ilyass_act
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 ?