0 Replies Latest reply on Dec 21, 2015 7:16 PM by Arif Mohammed

    getting active process image in spring based deployment.

    Arif Mohammed Novice

      - I am using jbpm-6.3.0.Final in my spring web application

      - I am not deploying my bpmn files as deployment units (kjars)

      - The bpmn files are scanned through class path while creating Runtime Environment as follows.

      - I have also looked into the code of jbpm-console-ng-rest here to get an idea of how to get the process image, the method getActiveProcessImage in this class is using the API ProcessDefinition procDef = dataService.getProcessesByDeploymentIdProcessId(deploymentId, processId);


      My question is what is the value I need to pass for the first argument in the above method. If I look into the the DB in TASK.DEPLOYMENTID I see the value inserted is "spring-rm" So I made a call as dataService.getProcessesByDeploymentIdProcessId("spring-rm", "approval-process"); but no data is returned for ProcessDefinition, I also tried calling ProcessDefinition procDef = runtimeDataService.getProcessById(processId); but still it does not return any data.


        <bean id="runtimeEnvironment" class="org.kie.spring.factorybeans.RuntimeEnvironmentFactoryBean">

          <property name="type" value="DEFAULT"/>

          <property name="entityManagerFactory" ref="jbpmEMF"/>

          <property name="transactionManager" ref="myTrxMgr"/>

          <property name="assets">


              <entry key-ref="approval-process"><util:constant static-field="org.kie.api.io.ResourceType.BPMN2"/></entry>



          <property name="taskService" ref="taskService"/>

          <property name="registerableItemsFactory" ref="myRegisterableItemsFactory"/>


        <bean id="runtimeManager" class="org.kie.spring.factorybeans.RuntimeManagerFactoryBean" destroy-method="close">

          <property name="identifier" value="spring-rm"/>

          <property name="runtimeEnvironment" ref="runtimeEnvironment"/>

          <property name="type" value="PER_PROCESS_INSTANCE"/>