PUBLIC - Liferay Portal Community Edition

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

Details

  • Type: Bug Bug
  • Status: Analyzed Analyzed
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 6.0.6 GA, 6.1.0 CE RC1, 6.0.X EE
  • Fix Version/s: Issues Backlog
  • Component/s: Kaleo, Workflow Portlets
  • Labels:
  • Environment:
    Tomcat 6.0.32 + MySQL 5.1.58. 6.0.x Revision 87920.
    Tomcat 6.0.32 + MySQL 5.1.58. 6.1.x Revision 87920.
  • Branch Version/s:
    6.0.x
  • Similar Issues:
    Show 5 results 

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().

Activity

Hide
Soeren Unruh added a comment -

Patch against trunk revision 87119 fixing issue.

Show
Soeren Unruh added a comment - Patch against trunk revision 87119 fixing issue.
Hide
Ryan Wan added a comment -

Hi Soeren,

Thank you for reporting this issue. I have verified this in trunk and 6.0. I will now update the ticket.

Show
Ryan Wan added a comment - Hi Soeren, Thank you for reporting this issue. I have verified this in trunk and 6.0. I will now update the ticket.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: