Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Using @Autowired in User Task > On Exit Script to call Spring Service(JBPM 6.2 :: Calling Spring Service from Eclipse BPMN2 Modeller Screen for User Task > Exit Script)
Using @Autowired in User Task > On Exit Script to call Spring Service [message #1711600] Sun, 18 October 2015 01:28 Go to next message
Devendra Chaudhari is currently offline Devendra ChaudhariFriend
Messages: 1
Registered: October 2015
Junior Member
I have created a BPMN2 process for Order approval using Eclipse BPMN2 Modeller for JBPM 6.2. To keep the process light weight, I have defined the key (Order ID) in the process and rest of the details (Order Name, Create Date, Create User Id, Status etc) are stored in the database.

There is a user task where the Approver can approve or reject the order. My requirement is to update the status of the order back into the database. For this I tried using @Autowired / @Inject to inject the Spring Service (for updating the status to the DB) into the Exit Script for the User Task. But this does not work and on the server startup, Jboss gives the below error:

23:54:47,290 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runtimeManager' defined in class path resource [META-INF/spring/bean-config/jbpm-application-config.xml]: Cannot resolve reference to bean 'runtimeEnvironment' while setting bean property 'runtimeEnvironment'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runtimeEnvironment': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Cannot add asset: Process Compilation error Autowired cannot be resolved to a type,

I tried importing the Annotation from the Process > Interface > Import but it is not available there for importing.

As an alternate solution I tried using the new operator to create the object for the service, but as the service uses spring DI, it is not able to load the DAO and other dependent classes and gives nullpointer exception while executing the task.

Any help on integrating Spring with Eclipse BPMN2 Modeller for JBPM is highly appreciated.
Re: Using @Autowired in User Task > On Exit Script to call Spring Service [message #1711949 is a reply to message #1711600] Tue, 20 October 2015 11:58 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

You should probably ask this question on the jBPM forum here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/jbpm-usage
Previous Topic:Bpmn2 diagram editor - Properties, constraint field is not showing up
Next Topic:Some things we're working on for Neon
Goto Forum:
  


Current Time: Thu Apr 25 16:47:45 GMT 2024

Powered by FUDForum. Page generated in 0.02953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top