cancel
Showing results for 
Search instead for 
Did you mean: 

Integration between java class and activiti (eclipse)

linuxpointsuse
Champ in-the-making
Champ in-the-making
Hello, I' begin with activiti and I've some questions for my project.
1 . I made a diagram with eclipse in a activiti project with user task and service. Maven dependances enable and I've just a xx.bpmn ( it's ok act 5.9)
2 . I created 3 java class (implements JavaDelegate) and I created var in my diagramm (proprieties / form / id ) and I'm able to catch and set this with
my java class.
Questions : :!:
- How do a "main java class" (for new myObject() …) and how launch it when I start a process .
- How set an object' instance with his method ( .toMakeSomething()) , in diagramm I can just (service task / main config / java class ) put my class and not a method .
- I search idea and exemple for "best pratice" for my activiti 5.9 under eclipse ( webService / bean / … ) and in user guide it's not really easy to find how do that.
Thank you for your answer.
Ls. :!:
2 REPLIES 2

steve1
Champ on-the-rise
Champ on-the-rise
Hi,

Below is a quote from the user guide.

There are 4 ways of declaring how to invoke Java logic:

Specifying a class that implements JavaDelegate or ActivityBehavior

Evaluating an expression that resolves to a delegation object

Invoking a method expression

Evaluating a value expression

Based on your choice, you can specify method or JavaDelegate.execute will be called.


Below is another quote from the user guide.

Exposing configuration beans in expressions and scripts
By default, all beans that you specify in the activiti.cfg.xml configuration or in your own spring configuration file are available to expressions and in the scripts.

Each bean instance will be created on startup.

If you need, you can study more about beans.

Good luck!

linuxpointsuse
Champ in-the-making
Champ in-the-making
Thanks, you're right "Each bean instance will be created on startup" !!! and implements serializable !
Now all it's all right.