JBoss Community

JBPM Workflow not proceeding further after human task completion

created by Mohamed Abuthahir in jBPM - View the full discussion

Hi,

 

I am having a jbpm process as below

 

Start--->Script--->Human Task---->Script---->End

 

I have created web service and am calling the above jbpm process inside the webservice. The process is started fine. And it is waiting in the human task node.

 

For the human task handling I have created a separate web project and claiming,completing. After my completion the task status is changed to "completed" but my workflow is not proceeding further means my script task is getting executed.

 

I am using jbpm spring implementation in my web service project and web project.

 

The configuration is as follows in both of my projects

 

<bean id="ds" class="org.springframework.jdbc.datasource.DriverManagerDataSource">

<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>

<property name="url" value="jdbc:mysql://localhost:3306/jbpmworkflow?autoReconnect=true"/>

<property name="username" value="root"/>

<property name="password" value="Abu@123a"/>

</bean>

 

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"

                  p:dataSource-ref="ds">

<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />

<property name="persistenceUnitName" value="org.jbpm.persistence.jpa" />

 

<property name="jpaVendorAdapter">

<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">

<property name="database" value="MYSQL"/>

<property name="showSql" value="true"/>  

<property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect" />

</bean>         

</property>

</bean>

 

 

 

<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" p:entityManagerFactory-ref="entityManagerFactory">

<property name="dataSource" ref="ds"/>

</bean>

 

 

<jbpm:kbase id="kbase">

    <jbpm:resources>

    <jbpm:resource type="BPMN2" source="classpath:com/igate/dam/dynamic/workflow/process/TestWorkFlow.bpmn"/>  

    <jbpm:resource type="DRL" source="classpath:com/igate/dam/dynamic/workflow/process/AXN.drl"></jbpm:resource>

    <jbpm:resource type="CHANGE_SET" source="classpath:com/igate/dam/dynamic/workflow/changeset/ChangeSet.xml"/>

   

    </jbpm:resources>

  </jbpm:kbase>

 

<jbpm:ksession id="ksession" type="stateful" kbase="kbase" >

<jbpm:configuration>

      <jbpm:jpa-persistence>

        <jbpm:entity-manager-factory ref="entityManagerFactory"/>

        <jbpm:transaction-manager ref="transactionManager"/>

      </jbpm:jpa-persistence>

     

    </jbpm:configuration>

</jbpm:ksession>

 

<!-- Declare a TaskClient -->

  <bean class="org.jbpm.task.service.mina.MinaTaskClientConnector" id="taskClientConnector">

    <constructor-arg value="taskClient"/>

    <constructor-arg>

      <bean class="org.jbpm.task.service.mina.MinaTaskClientHandler">

        <constructor-arg>

          <bean class="org.drools.SystemEventListenerFactory" factory-method="getSystemEventListener"/>

        </constructor-arg>

      </bean>

    </constructor-arg>

  </bean>

  <bean class="org.jbpm.task.service.TaskClient" id="taskClient">

    <constructor-arg ref="taskClientConnector"/>

  </bean>

 

  <!-- Declare a HumanTaskHandler. It uses previously created TaskClient -->

  <bean class="org.jbpm.task.service.AsyncTaskServiceWrapper" id="humanTaskClient">

    <constructor-arg ref="taskClient"/>

  </bean>

  <bean class="org.jbpm.process.workitem.wsht.SyncWSHumanTaskHandler" id="humanTaskHandler">

    <constructor-arg ref="humanTaskClient"/>

    <constructor-arg ref="ksession"/>

  </bean>

  <!-- Configure its connection to the local server -->

  <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="humanTaskHandler" id="setConnection">

    <property name="targetObject" ref="humanTaskHandler"/>

    <property name="targetMethod" value="setConnection"/>

    <property name="arguments">

      <list>

        <value>127.0.0.1</value>

        <value>9123</value>

      </list>

    </property>

  </bean>

  <!-- And connect HumanTaskHandler (implicit TaskClient connection) -->

  <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="setConnection">

    <property name="targetObject" ref="humanTaskHandler"/>

    <property name="targetMethod" value="connect"/>

  </bean>

 

  <!-- Finnaly, register HumanTaskHandler in the session -->

  <bean factory-bean="ksession" factory-method="getWorkItemManager" id="workItemManager"/>

  <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">

    <property name="targetObject" ref="workItemManager"/>

    <property name="targetMethod" value="registerWorkItemHandler"/>

    <property name="arguments">

      <list>

        <value>Human Task</value>

        <ref bean="humanTaskHandler"/>

      </list>

    </property>

  </bean>

</beans>

 

 

Kindly help me on this....

 

--Abuthahir

Reply to this message by going to Community

Start a new discussion in jBPM at Community