<?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: How to detect / manually re-run tasks that have failed after retries in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217117#M170247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. I've discovered that I can indeed query for jobs that have no retries left and that failed with an exception, using the ManagementService:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Job&amp;gt; failedJobs = managementService.createJobQuery()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .withException().noRetriesLeft()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .orderByJobDuedate().desc().list();&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;And then re-run those jobs with executeJob(). As the documentation says, this will run the job synchronously, in the thread that calls the executeJob() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've seen there's also a way to set the number of retries on a job, but if I do that then Activiti is not automatically going to pick up and run the job using the job executor that I've configured the engine with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 May 2016 06:43:19 GMT</pubDate>
    <dc:creator>jesper1</dc:creator>
    <dc:date>2016-05-02T06:43:19Z</dc:date>
    <item>
      <title>How to detect / manually re-run tasks that have failed after retries</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217115#M170245</link>
      <description>If you have an asynchronous task which is a JavaDelegate task, and it throws an exception, then Activiti can automatically retry it a number of times according to a schedule, as is described in section 8.7.2 of the user manual.What happens to a process instance when the retry counter reaches zero? D</description>
      <pubDate>Thu, 28 Apr 2016 09:41:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217115#M170245</guid>
      <dc:creator>jesper1</dc:creator>
      <dc:date>2016-04-28T09:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect / manually re-run tasks that have failed after retries</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217116#M170246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jasper.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What happens to a process instance when the retry counter reaches zero?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;retries is set to 0. You can fetch jobs with no retries left.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;is it possible to manually retry such a task (e.g. through an API call)?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;yes, e.g. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; /** &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Forced synchronous execution of a job (eg. for administation or testing)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * The job will be executed, even if the process definition and/or the process instance&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * is in suspended state.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * &lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @param jobId id of the job to execute, cannot be null.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * @throws ActivitiObjectNotFoundException when there is no job with the given id. &lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; void executeJob(String jobId);&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 06:32:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217116#M170246</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-05-02T06:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect / manually re-run tasks that have failed after retries</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217117#M170247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. I've discovered that I can indeed query for jobs that have no retries left and that failed with an exception, using the ManagementService:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Job&amp;gt; failedJobs = managementService.createJobQuery()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .withException().noRetriesLeft()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .orderByJobDuedate().desc().list();&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;And then re-run those jobs with executeJob(). As the documentation says, this will run the job synchronously, in the thread that calls the executeJob() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've seen there's also a way to set the number of retries on a job, but if I do that then Activiti is not automatically going to pick up and run the job using the job executor that I've configured the engine with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 06:43:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-detect-manually-re-run-tasks-that-have-failed-after/m-p/217117#M170247</guid>
      <dc:creator>jesper1</dc:creator>
      <dc:date>2016-05-02T06:43:19Z</dc:date>
    </item>
  </channel>
</rss>

