Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-5845

Resume ProcessInstance ignores all parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • jBPM 6.5.0.Final
    • Persistence, Runtime Engine
    • None

    Description

      If a processInstance was suspended ( for example in a human task) it can be resumed once that task was completed.

      The suggested method is:
      ResumeProcessInstanceCommand susp = new ResumeProcessInstanceCommand();
      susp.setProcessInstanceId(processInstanceId);
      ksession.execute(susp);

      Map<String, Object> parameters = new HashMap<String, Object>();
      parameters.put("processVar1", "5555");
      ksession.getWorkItemManager().completeWorkItem(workItemId, parameters);

      There are 3 significant issues:
      1. The workItemId is unknown!. there is NO API call that allows you to find the internal workitemId for a given processInstanceId
      2. Even when you get the number from the JBPM tables, you can't pass any parameters in the completeWorkItem. These parameters are ignored and the workitem as it was before the suspend was reloaded from disk.

      You would expect that completeWorkItem handles the parameters like it would when the process isn't suspended.

      3. You can't resume this process on another session. In a clustered environment this will cause issue. Besides, there is no guarantee the original session is still active when a process is resumed. In addition, since the processInstance is reloaded from disk, there is no need for this restriction. It will work just fine if a processInstance is resumed on another session (given it has the same environment)

      Even better would it if the original parameters are restored and the new parameters from the completeWorkItem call are merged ( added to) the saved data. That would be really user friendly!

      Attachments

        Activity

          People

            swiderski.maciej Maciej Swiderski (Inactive)
            leonv-1 leon v (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: