Uploaded image for project: 'Newsletter'
  1. Newsletter
  2. NEWSLETTER-289

AutomaticNewslettersScheduler and validateActionIds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • 2.11.0
    • 2.5.0
    • None

      The plugin newsletter defines the component:

      <component role="org.ametys.plugins.newsletter.auto.AutomaticNewslettersScheduler"
                  		   id="org.ametys.plugins.newsletter.auto.AutomaticNewslettersScheduler"
                             class="org.ametys.plugins.newsletter.auto.AutomaticNewslettersScheduler"
                             logger="org.ametys.plugins.newsletter.auto.AutomaticNewslettersScheduler">
                      <workflow name="newsletter" initialActionId="1" validateActionIds="3,4"/>
                  </component> 

       

      And with demo data, workflows/newsletter.xml does not define a "3" action id

      Thus, with a newsletter auto, I'v got the following error :

      2019-04-09 15:07:02,413 ERROR [org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine] (AutomaticNewslettersEngine;/cms/_admin/plugins/admin/config/set) An error occurred creating the automatic newsletter contents.
      com.opensymphony.workflow.InvalidActionException: Action 3 is invalid
      	at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:562)
      	at org.ametys.plugins.workflow.AbstractAmetysWorkflow.doAction(AbstractAmetysWorkflow.java:164)
      	at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.validateNewsletter(AutomaticNewslettersEngine.java:516)
      	at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.createAndValidateAutomaticNewsletter(AutomaticNewslettersEngine.java:371)
      	at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.createAutomaticNewsletters(AutomaticNewslettersEngine.java:334)
      	at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.createAutomaticNewsletters(AutomaticNewslettersEngine.java:300)
      	at org.ametys.plugins.newsletter.auto.AutomaticNewslettersEngine.run(AutomaticNewslettersEngine.java:234)
      	at java.lang.Thread.run(Thread.java:745) 

      While it should check among "3" and "4" action ids before trying to execute them

            Unassigned Unassigned
            sprieul Simon Prieul (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: