<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Email Task Exceptions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127551#M89723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would welcome an additional Activiti attribute where you define if you want the task to fail if the mail could not be sent. And based on this attribute you could change the exception throw to a logging statement like you did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Nov 2013 15:28:24 GMT</pubDate>
    <dc:creator>trademak</dc:creator>
    <dc:date>2013-11-20T15:28:24Z</dc:date>
    <item>
      <title>Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127546#M89718</link>
      <description>Hi,The email task is a quite useful simple task - however, I think in it's current form it is hardly usable in a productive environment: any failure (be it a missing / invalid email address or a failure on the server side) is propagated as exception to the workflow, where it cannot be handled gracef</description>
      <pubDate>Wed, 26 Jun 2013 15:14:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127546#M89718</guid>
      <dc:creator>conradi</dc:creator>
      <dc:date>2013-06-26T15:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127547#M89719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well the answer is typical: when a jira is created we can follow up on it, weighted against other priorities. To be fair, expanding the mail task is not something that's currently high on that list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You say that you have a custom delegate, one thing that would speed up tremendously is if you can share that through a pull request. That way, you're sure it's added quickly to the code. Of course we are here to assist with that and where everything should go etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 11:48:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127547#M89719</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-06-27T11:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127548#M89720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am aware, that the priorities have to be weighted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And my post can be read as a question if it makes sense at all to send possible patches.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, I can't use github, but can of course give a patch which modifies the MailActivityBehavior in such a way, that no exception is thrown, but instead the error info is written into process variables (added as attachment, the patch is against 5.11, but should apply against 5.13)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jun 2013 11:13:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127548#M89720</guid>
      <dc:creator>conradi</dc:creator>
      <dc:date>2013-06-28T11:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127549#M89721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The patch uses the "set variable instead of fail" behavior always. Existing users can depend on the error occurring and might have other ways of retying/error-handling (e.g. Using async=true on email-activities and use job-mechanism for retrying/error-trapping). We can only accept this patch if the existing behavior is (by default) kept and the "new" behavior can be turned on using configuration on the XML…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:22:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127549#M89721</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-07-03T09:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127550#M89722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, in my opinion this problem is critical, simply the system crash in production environment if any problem with the mail server happens, or even more, if only one recipient of the email is not a current email address in the server. I had to change the MailActivityBehavior also, commenting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; throw new ActivitiException("Could not send e-mail", e); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and adding:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.warn("Could not send email:" + e.getMessage());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.debug("", e);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/java]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2013 21:03:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127550#M89722</guid>
      <dc:creator>abentan</dc:creator>
      <dc:date>2013-11-16T21:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127551#M89723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would welcome an additional Activiti attribute where you define if you want the task to fail if the mail could not be sent. And based on this attribute you could change the exception throw to a logging statement like you did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 15:28:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127551#M89723</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-11-20T15:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127552#M89724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Coming back to an old topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are currently upgrading our 5.11 codebase to use the current 5.15.1 release, and I would like to get rid of the mail patch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When speaking of 'activiti attribute' do you mean something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;serviceTask id="sendMail" activiti:type="mail" activiti:throwMailException="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:field name="throwException" expression="false" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But even more important, in my previous patch I wrote the information about the exception into a process variable, so that it can be used later in the workflow, e.g. by a gateway:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; private void handleException(ActivityExecution execution, String msg, Exception e) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; log.log(Level.SEVERE, msg, e);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable("EMAIL_ERROR", Boolean.TRUE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable("EMAIL_ERROR_MSG", msg);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would that be acceptable?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 13:40:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127552#M89724</guid>
      <dc:creator>conradi</dc:creator>
      <dc:date>2014-04-15T13:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127553#M89725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created a new patch (including new tests) based on the assumption that the configuration is done with an extensionElement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The old behavior is only changed when ignoreException is explicitly activated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 09:14:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127553#M89725</guid>
      <dc:creator>conradi</dc:creator>
      <dc:date>2014-04-16T09:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127554#M89726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the patch. Applied it with some small changes in the following commit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/Activiti/Activiti/commit/4b17821b1687ed671ee71f798099f48d8abe6efb" rel="nofollow noopener noreferrer"&gt;https://github.com/Activiti/Activiti/commit/4b17821b1687ed671ee71f798099f48d8abe6efb&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 14:01:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127554#M89726</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-04-16T14:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127555#M89727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 15:10:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127555#M89727</guid>
      <dc:creator>conradi</dc:creator>
      <dc:date>2014-04-16T15:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127556#M89728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have realized that the user documentation needs an update too and have attached a patch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 09:15:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127556#M89728</guid>
      <dc:creator>conradi</dc:creator>
      <dc:date>2014-05-05T09:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Email Task Exceptions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127557#M89729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I've applied the patch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 14:01:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/email-task-exceptions/m-p/127557#M89729</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-05-06T14:01:47Z</dc:date>
    </item>
  </channel>
</rss>

