cancel
Showing results for 
Search instead for 
Did you mean: 

CAF: How can I call the create method in BO from Application Service

Former Member
0 Kudos

Hello!

When I create a Business Object in CAF I get some methods like "create" automatically.

With this method I can create the BO over a webservice.

My problem is: How can I call this method from the Application Service logic.

The problem is, that the EntityManeger, the SessionContext and the DataAccessService is NULL when I call only the create method.

How can I initilalize this?

Can anybody help me?

Thanks, Thomas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you add your BO that you want to access as a dependency to your application service.

Within the implementation code for the operation you are creating you can do something like:

e.g If your BO is called Car you can call the create method:

 getCarService().create(params....) 

Former Member
0 Kudos

Hi Jhon!

I solved my problem.

The problem was to define the dependency between Application Service and BO.

Thanks, very much!

Thomas

Answers (0)