PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-42106

recurrence in workflow xml accepts second as scale but event will not run

    Details

    • Branch Version/s:
      6.2.x, 6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      9
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      Description

      Description

      User can upload a workflow xml for kaleo, which has a recurrence event with second as scale.
      Portal parses the xml without any complaints and creates a cron-text for the event.

      Excerpt from the recurrence-minute.xml file

      <task-timer>
         <name>OKRecurrentTimer</name>
         <delay>
           <duration>7</duration>
           <scale>second</scale>
         </delay>
         <recurrence>
           <duration>1</duration>
           <scale>minute</scale>
         </recurrence>
         <blocking>false</blocking>
      

      Check the <scale> tags. The attached recurrence-second.xml contains
      <scale>second</scale> for <recurrence> and <duration>10</duration>

      steps to reproduce

      1. start Liferay portal
      2. add Blogs portlet to a page
      3. deploy Kaleo-web plugin
      4. upload the attached workflow xml file: "recurrence_minute.xml"
        1. admin -> control panel -> Workflow -> upload definition
        2. after upload, "RecurrenceMinute" should appear in the list
      5. set up workflow for blog entries
        1. control panel -> Sites -> Liferay -> Configuration -> Workflow configuration
        2. select "RecurrenceMinute" for "Blogs Entry"
      6. Add a blog entry with blogs portlet
      7. check the logs, it should work
        • After 7 seconds, the first "===OK!===" will be on the logs.
        • After every 1 minute, a new "===OK!===" will be on the logs.
      8. approve the tasks to stop write messages in the log
        1. My Account -> My Workflow Tasks
        2. click on Actions->ConnectorXXX for every item
      9. upload the attached workflow xml file: "recurrence_second.xml"
      10. "RecurrenceSecond" should appear in the workflow-list
      11. set up this new workflow for "Blogs entry"
      12. Add a blog entry with blogs portlet
      13. check the logs:
        • After 7 seconds, the first "===OK!===" will be on the logs.

      Experienced behaviour

      There will be no more "===OK!===" messages in the log

      Expected behaviour

      There should be a new "===OK!===" message in every 10 seconds in the log

      Possible cause

      CronText.java does not care about seconds (probably there is a bug about years also when creating crontexts)
      DurationScale.java->getIntegerValue does not care about "seconds".
      It also does not care about "week" in parse method.

      1. recurrence-minute.xml
        2 kB
        Peter Borkuti
      2. recurrence-second.xml
        2 kB
        Peter Borkuti

        Activity

        Hide
        Peter Borkuti added a comment - - edited

        The fix needs two pulls, one for portal and one for kaleo-web-plugin:
        Here is the pull for portal:
        https://github.com/moltam89/liferay-portal/pull/296
        And for kaleo-web plugin:
        https://github.com/moltam89/liferay-plugins/pull/35

        Show
        Peter Borkuti added a comment - - edited The fix needs two pulls, one for portal and one for kaleo-web-plugin: Here is the pull for portal: https://github.com/moltam89/liferay-portal/pull/296 And for kaleo-web plugin: https://github.com/moltam89/liferay-plugins/pull/35
        Hide
        Linda Sui added a comment - - edited

        PASSED Manual Testing following the steps in the description.

        Reproduced on:
        Tomcat 7.0.42 + MySQL 5.5.29 Portal master GIT ID: a6dcd85666bcfa5ca7099eb11695b3bf08d5ee8e.
        Plugins master GIT ID: 6fd66c101db6faa14524ba59fbfec65547ec43b2.

        There is no more "===OK!===" messages in the log.

        Fixed on:
        Tomcat 7.0.42 + MySQL 5.5.29 Portal master GIT ID: d80818dc84b05302af96832519229a1d95bec6bd.
        Plugins master GIT ID: 007837505c6f4941f57de7822631655bf4ce589f.

        There is a new "===OK!===" message in every 10 seconds in the log.

        Show
        Linda Sui added a comment - - edited PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0.42 + MySQL 5.5.29 Portal master GIT ID: a6dcd85666bcfa5ca7099eb11695b3bf08d5ee8e. Plugins master GIT ID: 6fd66c101db6faa14524ba59fbfec65547ec43b2. There is no more "===OK!===" messages in the log. Fixed on: Tomcat 7.0.42 + MySQL 5.5.29 Portal master GIT ID: d80818dc84b05302af96832519229a1d95bec6bd. Plugins master GIT ID: 007837505c6f4941f57de7822631655bf4ce589f. There is a new "===OK!===" message in every 10 seconds in the log.
        Hide
        Peter Borkuti added a comment -

        kaleo-web-plugin backports:

        backport pull request for plugins-ee-6.2.x:
        https://github.com/dustinryerson/liferay-plugins-ee/pull/13
        for plugins-ee-6.1.x:
        https://github.com/dustinryerson/liferay-plugins-ee/pull/14
        I ran the unit tests and manually tested the kaleo-web-plugins on both portal version (6.1.x and 6.2.x).

        Show
        Peter Borkuti added a comment - kaleo-web-plugin backports: backport pull request for plugins-ee-6.2.x: https://github.com/dustinryerson/liferay-plugins-ee/pull/13 for plugins-ee-6.1.x: https://github.com/dustinryerson/liferay-plugins-ee/pull/14 I ran the unit tests and manually tested the kaleo-web-plugins on both portal version (6.1.x and 6.2.x).
        Hide
        Linda Sui added a comment -

        PASSED Manual Testing following the steps in the description.

        Fixed on:
        Tomcat 7.0.40 + MySQL 5.5.29 Portal 6.1.x EE GIT ID: 052279873c35a3dbfae4c67811980c07d88baf0f.
        Plugins ee-6.1.x GIT ID: 870bca97819a118520c498d7f71f83e1e5bb473f.
        Tomcat 7.0.42 + MySQL 5.5.29 Portal ee-6.2.x EE GIT ID: dbed895d70ec1eed66e3e85da16eb05aedb7bfe3.
        Plugins ee-6.2.x GIT ID: f052752fc86c024ea80e965a4361601be13d8b6a.

        There is a new "===OK!===" message in every 10 seconds in the log.

        Show
        Linda Sui added a comment - PASSED Manual Testing following the steps in the description. Fixed on: Tomcat 7.0.40 + MySQL 5.5.29 Portal 6.1.x EE GIT ID: 052279873c35a3dbfae4c67811980c07d88baf0f. Plugins ee-6.1.x GIT ID: 870bca97819a118520c498d7f71f83e1e5bb473f. Tomcat 7.0.42 + MySQL 5.5.29 Portal ee-6.2.x EE GIT ID: dbed895d70ec1eed66e3e85da16eb05aedb7bfe3. Plugins ee-6.2.x GIT ID: f052752fc86c024ea80e965a4361601be13d8b6a. There is a new "===OK!===" message in every 10 seconds in the log.

          People

          • Assignee:
            Linda Sui
            Reporter:
            Peter Borkuti
            Recent user:
            Gabor Kovacs
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 13 weeks, 5 days ago

              Development

                Structure Helper Panel