2 Replies Latest reply on Jul 7, 2010 3:32 AM by Maciej Swiderski

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

    Felix Jose Newbie

      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">
      <start g="612,-10,48,48">
        <transition g="-68,-6" name="analystResearch"
         to="analystResearch" />
      <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" />


      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) {
        //Database update
        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" />
      <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