jBPM has just been released in version 4.3 and the spring integration has been changed. If you used to have an application that uses the spring integration of previous versions of jBPM, this might lead to exceptions like this:
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'repositoryService': Requested bean is currently in creation: Is there an unresolvable circular reference?
The problem is that rather than having to declare all of jBPM’s services in your application context — like it used to be up to jBPM 4.2 —, the new spring integration provides access to them through the Process Engine. All you need in your application context is this:
<bean id="springHelper"> <property name="jbpmCfg" value="PATH TO YOUR jbpm.cfg.xml"> </property> </bean> <bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
Now you can inject the processEngine into your classes and retrieve jBPM’s services like this:
processEngine.getExecutionService() … processEngine.getRepositoryService() … …