Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-20059

KaleoInstanceLocalServiceImpl.updateKaleoInstance(long, Map, ServiceContext) does not persist KaleoInstance when changing workflow context

    Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Epic/Theme:
    • Fix Priority:
      4

      Description

      When changing the workflow context of a workflow instance by calling WorkflowInstanceManagerUtil.updateWorkflowContext() (forwarding to Kaleo implementation of WorkflowInstanceManager), the workflow context is changed in the workflow instance returned by the method, but the change is not committed to the database.

      KaleoInstanceLocalServiceImpl.updateKaleoInstance() should call KaleoInstancePersistence.update() after changing the workflow context.

      Untested correction is the following (note kaleoInstancePersistence.update()):

      KaleoInstanceLocalServiceImpl.java
      public KaleoInstance updateKaleoInstance(
      		long kaleoInstanceId, Map<String, Serializable> workflowContext,
      		ServiceContext serviceContext)
      	throws PortalException, SystemException {
      
      	KaleoInstance kaleoInstance = kaleoInstancePersistence.findByPrimaryKey(
      		kaleoInstanceId);
      
      	kaleoInstance.setWorkflowContext(
      		WorkflowContextUtil.convert(workflowContext));
      
      	kaleoInstancePersistence.update(kaleoInstance, false);
      
      	return kaleoInstance;
      }
      

      The JBPM implementation correctly calls jbpmContext.save(token) in WorkflowInstanceManagerImpl.updateWorkflowContext().

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 32 weeks, 5 days ago