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

Workflow does not properly handle invalid definition files

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.0.X, Master
    • Fix Version/s: None
    • Component/s: Workflow
    • Story Points:
      1
    • Fix Priority:
      4

      Description

      Steps to Reproduce(For Master):

      1. Go to Control Panel > Configuration > Workflow
      2. Click Upload Definition
      3. Add invalid definition file (ie plain .txt file)
      4. Click Save

      Expected Result:
      The error message should show up, such as "Please enter a valid definition before publishing".

      Actual Result:
      The success message showed up, but actually the invalid definition didn't save successfully.

      2018-06-11 08:56:00.853 ERROR [http-nio-8080-exec-9][GoogleJavaScriptMinifier:124] (http://localhost:8080/group/control_panel/manage:1): Parse error. primary expression expected [JSC_PARSE_ERROR]
      2018-06-11 08:56:00.854 ERROR [http-nio-8080-exec-9][GoogleJavaScriptMinifier:143] (http://localhost:8080/group/control_panel/manage): 1 error(s), 0 warning(s)
      

      Steps to Reproduce(For 7.0.x-private):

      1. Go to Control Panel > Configuration > Workflow Definition
      2. Click Upload Definition
      3. Add invalid definition file (ie plain .txt file)
      4. Click Save

      Expected Result:
      The error message should show up, such as "Please enter a valid definition before publishing".

      Actual Result:
      Both error message and success message showed up at the same time. Actually, the invalid definition didn't save successfully.

      2018-06-11 08:48:04.594 WARN  [http-nio-9080-exec-5][PortalImpl:7770] Unable to impersonate 20155 because the string cannot be decrypted
      2018-06-11 08:48:09.903 WARN  [http-nio-9080-exec-6][ProxyMessageListener:88] com.liferay.portal.kernel.workflow.WorkflowDefinitionFileException: Unable to parse definition
      com.liferay.portal.kernel.workflow.WorkflowDefinitionFileException: Unable to parse definition
      	at com.liferay.portal.workflow.kaleo.definition.internal.parser.XMLWorkflowModelParser.parse(XMLWorkflowModelParser.java:80)
      	at com.liferay.portal.workflow.kaleo.runtime.internal.DefaultWorkflowEngineImpl.deployWorkflowDefinition(DefaultWorkflowEngineImpl.java:104)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy452.deployWorkflowDefinition(Unknown Source)
      	at com.liferay.portal.workflow.kaleo.runtime.integration.impl.internal.WorkflowDefinitionManagerImpl.deployWorkflowDefinition(WorkflowDefinitionManagerImpl.java:60)
      

        Attachments

        1. 7.0.x.png
          7.0.x.png
          53 kB
        2. master.png
          master.png
          27 kB
        3. test.txt
          2 kB

          Issue Links

            Activity

              People

              Assignee:
              joyce.wang Joyce Wang
              Reporter:
              joyce.wang Joyce Wang
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 19 weeks, 6 days ago

                  Packages

                  Version Package