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

Potential Race Condition while uploading workflow definition from a portal instance lifecycle listener

    Details

      Description

      Uploading a workflow definition fails, when trying to deploy a new workflow definition from a PortalInstanceLifecycleListener.

      Service used : WorkflowDefinitionManager
      Method used : deployWorkflowDefinition(long companyId, long userId, String title, byte[] bytes)

      Following is the error :

      _Caused by: java.lang.NullPointerException
      at com.liferay.portal.workflow.kaleo.runtime.internal.WorkflowDefinitionManagerImpl.deployWorkflowDefinition(WorkflowDefinitionManagerImp
      l.java:60)_

      This is possibly happening as the reference to WorkflowEngine is not satisfied yet, because of the optional caridinality.

      @Reference(
      		cardinality = ReferenceCardinality.OPTIONAL,
      		policy = ReferencePolicy.DYNAMIC,
      		policyOption = ReferencePolicyOption.GREEDY
      	)
      	private volatile WorkflowEngine _workflowEngine;
      

      Above piece of code was originally added to resolve circular dependency between the spring bean and the osgi module - (70d491d0f4a92de031ab554c3b58c64a628602cc)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 37 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP8
                7.0.0 DXP SP2
                7.0.3 CE GA4
                Master