1 Reply Latest reply on Apr 1, 2016 4:45 PM by Adam Mautner

    jBPM 6.3 User Stuck after the Execution of the First User Task

    Adam Mautner Newbie

      Hi,

       

       

      I have experimented with jBPM 6 user tasks using Reward example from Jiri Svitak (https://github.com/jsvitak/jbpm-6-examples/tree/master/rewards-cdi-jsf).

       

       

      I deployed the this project to wildfly-9.0.2.Final (using the default built in H2 database). I have upgraded the jBPM version to 6.3.0.final (from 6.2.0.Final-redhat-4, which is used in the example). I have slightly changed the code and put an EJB wrapper around the ProcessService and TaskService. Then I also changed the example to use BPMN from the classpath (loaded as classpath resource).

       

       

      What I experience is that the example process (rewards) is stuck after the first user task (Approval PM) without any particular error (no task is executed afterwards, neither user tasks nor simple script task).

       

       

      I used the following code to manage user tasks:

       

       

        CompositeCommand compositeCommand = new CompositeCommand(new CompleteTaskCommand(taskId, user,

               outputParams),

               new StartTaskCommand(taskId, user));

        taskService.execute(compositeCommand);

       

       

      - This code results process being stuck.

       

       

      When I use the following call from the example, the process proceeds as expected:

       

       

        CompositeCommand compositeCommand = new CompositeCommand(new CompleteTaskCommand(taskId, user,

               outputParams),

               new StartTaskCommand(taskId, user));

        userTaskService.execute(StartupBean.DEPLOYMENT_ID, compositeCommand);

       

       

      But this implies, that I have to use a deployment ID. I could not figure out, how to get a deployment ID for classpath resource deployment (it seems to be only possible for Maven deployed processes).

       

       

      - Is there a bug in taskService.execute(compositeCommand); call or it is not supposed to work anymore (it used to with older version) for classpath resource BPMNs?

      - Is there a way to get deployment ID for classpath resource process deployment?

      - Do I do something wrong? Can you please help me, what right way would be?

       

       

      I have attached my example projects (rewards-example-with.bpmn-in-maven.zip), I have marked problematic parts with TODOs.

       

       

      Thank you.

       

       

      Regards,

       

       

      Adam