[jboss-user] [jBPM] - How the java task is instantaited and also how about its associated java classes.

Felix Jose do-not-reply at jboss.com
Tue Jul 6 08:32:38 EDT 2010


Felix Jose [http://community.jboss.org/people/FelixKJose] created the discussion

"How the java task is instantaited and also how about its associated java classes."

To view the discussion, visit: http://community.jboss.org/message/551223#551223

--------------------------------------------------------------
Hi All,

I am using JBPM with Spring.

My process definition contains Java tasks as follows:

*process name="ddrRequest" xmlns="* http://jbpm.org/4.3/jpdl *http://jbpm.org/4.3/jpdl**">
 <start g="612,-10,48,48">
  <transition g="-68,-6" name="analystResearch"
   to="analystResearch" />
 </start>
<java  class="com.collabera.poc.jbpm.custom.ReviewerResearchImpl" method="printHelloWorld" var="request"
  name="analystResearch" g="198,171,80,40">
 <arg><object expr="#{request}"/></arg>
      <transition g="-68,-18" name="startDecisionHandler" to="startDecisionHandler"/>
    </java> <decision g="431,94,48,48" name="startDecisionHandler">
  <handler />
  <transition g="991,122:-112,-18" name="to Waiting Assignment"
   to="Waiting Assignment" />   
  <transition g="-104,-18" name="to Being Researched" to="Being Researched" />
 </decision>*
** 
And the java task class(com.collabera.poc.jbpm.custom.ReviewerResearchImpl) is as follows:

*public class ReviewerResearchImpl {
 /**
  * 
  */
 private static final long serialVersionUID = 1L;
 
 private RequestService requestService;
 
 public RequestService getRequestService() {
  return requestService;
 }*
 *public void setRequestService(RequestService requestService) {
  this.requestService = requestService;
 }*

 *public ReviewerResearchImpl() {
* 
 *}
 
 public DdrRequest printHelloWorld(Request request) {
  System.out.println("Region=========="+request.getRegion());
  request.setRegion("CHINA");
  //Database update
  requestService.saveRequest(ddrRequest)
  
  return request;*
 *}
* 
* 
}*

My doubt is I am using spring also So when instantiating the  *com.collabera.poc.jbpm.custom.ReviewerResearchImpl* class from the jbpm  whether its property RequestService requestService also gets instatiated because in spring config file I have the following snippet:

*<bean id="reviewerResearch" class="com.collabera.poc.jbpm.custom.ReviewerResearchImpl">
  
  <property name="requestService">
   <ref bean="requestService" />
  </property>
</bean>
<bean id="requestService"/>*

If not how can i make use of Spring to instantiate the jbpm java task class (for Eg: com.collabera.poc.jbpm.custom.ReviewerResearchImpl) and its associated classes (for eg:RequestService requestService).?

Please let me know about this as soon as possible. I have stucked in this point. PLease help......


Thank You and Regards,
Felix K Jose 

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/551223#551223]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100706/0000fdec/attachment.html 


More information about the jboss-user mailing list