-
1. using spring beans in jbpm5
krisverlaenen Jan 16, 2011 1:22 AM (in response to riteshadval)Using service tasks you can plug in any implementation you want, as long as there is a way to invoke it from Java.
The idea would be to create a domain-specific node that would invoke your spring beans:
- define what parameters you want the user to define in the process
- write and register a handler that invokes your spring bean based on the values provided by the process instance
If you want, I could assist you in writing something like this, so we can add this to the list of domain-specific service nodes we support out-of-the-box?
Regarding process variables, they are stored as part of the process instance state (inside the binary state of the process instance). Pluggable variable persistence can allow you to change this though. What are you trying to achieve?
Kris
-
2. using spring beans in jbpm5
mstencel Apr 28, 2011 2:38 AM (in response to krisverlaenen)It would be nice to have Spring beans accessible in some simple way inside process e.g. in on entry/exit actions, constrains, basically in all expressions. It's possible now for example by defining global or by passing Spring bean as variable to process instance. But you have to implicitly specify, that the process is going to use such variable or global. It would be helpful to integrate this kind of beans injection into the engine (e.g. specifying which beans are going to be injected, or whether to inject all beans) without further overhead for programmer.
I tried to implement custom GlobalResolver that try to resolve global from Spring context. I post it at http://community.jboss.org/message/601479#601479
But it still needs to define global in process definitions files.