Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4629

Disable default behaviour of auto-save for process instances

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.2.1.CR1
    • Fix Version/s: 2.2.1.CR2
    • Component/s: None
    • Labels:
      None

      Description

      When injecting org.jboss.seam.bpm.ProcessInstance in a Seam components the code ends up in the following code snipped of this class:
      ********
      if (processId!=null)

      { //TODO: do we need to cache this?? return ManagedJbpmContext.instance().getProcessInstanceForUpdate(processId); }

      ********

      the org.jbpm.JbpmContext#getProcessInstanceForUpdate(processId) method will get a process instance from the db and will register it for auto-save. It will then be saved automatically at the close() .

      Continuous registering for auto-save can cause performance issues as when the jbpmContext closes it will save all instances in the autoSaveProcessInstances list which can be huge.

      The proposed fix is to change to the code to:

      if (processId!=null)

      { return ManagedJbpmContext.instance().getProcessInstance(processId); }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tsurdilovic Tihomir Surdilovic
                  Reporter:
                  tsurdilovic Tihomir Surdilovic
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: