Hello!
Right now, we using flowable engine for BPM, so this is more easy to do
-
Define Spring Bean in spring boot app:
@Component("BaseBean") public class baseBean { public String doSomething() { System.out.println("do something"); return "Do something"; } } -
Use this bean inside script task. Bean name has to be matched with its name in spring context:
res = BaseBean.doSomething(); execution.setVariable("doSomething", res); -
Run process
-
Proof of work:
Conclusion
I recommend using a Spring Bean type of service task if you only need to call a method from a service, rather than relying on a script task worker. However, if you are developing the process during runtime, using a script task worker is acceptable.
Regards,
Dmitry




