<?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: UpdateJobFailure - Error 160 in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613380#M11713</link>
    <description>&lt;P&gt;I'm not exactly sure what you mean when you say that you want to "change a job from Ready to Paused"&lt;/P&gt;
&lt;P&gt;Jobs don't have a "Paused" state.&amp;nbsp; Looking at the JobStatus enum in the SDK documentation, the states are Failure, Ready, Running, Success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to move a job from Ready to Running, you call ReserveNextJob.&amp;nbsp; If you want to move the job back to Ready, call UnReserveJobById.&amp;nbsp; I you want to move a Ready job off the queue, you can either call DeleteJobById or you can reserve it and call UpdateJobSuccess.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that you want to get these jobs before Job Processor gets them.&amp;nbsp; The way that the job queue works is that a job gets reserved to the first client that requests a job of that type.&amp;nbsp; So there is no way to guarantee that your app will always get the job first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you could elaborate what problem you are trying to solve.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2012 18:13:25 GMT</pubDate>
    <dc:creator>Redmond.D</dc:creator>
    <dc:date>2012-09-10T18:13:25Z</dc:date>
    <item>
      <title>UpdateJobFailure - Error 160</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3610260#M11712</link>
      <description>&lt;P&gt;I am trying to manually update a job status in vault 2012 professional.&amp;nbsp; Is this possible?&amp;nbsp; I tried the method UpdateJobFailure, but get error 160.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My plan is to be able to change a job from Ready to Paused and then later change the Paused job back to Ready by resubmitting it.&amp;nbsp; I have the code working to resubmit it, but how can I cancel a job that is in the Ready state without the job prcessor actually picking it up and erroring it out?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2012 22:30:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3610260#M11712</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-06T22:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateJobFailure - Error 160</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613380#M11713</link>
      <description>&lt;P&gt;I'm not exactly sure what you mean when you say that you want to "change a job from Ready to Paused"&lt;/P&gt;
&lt;P&gt;Jobs don't have a "Paused" state.&amp;nbsp; Looking at the JobStatus enum in the SDK documentation, the states are Failure, Ready, Running, Success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to move a job from Ready to Running, you call ReserveNextJob.&amp;nbsp; If you want to move the job back to Ready, call UnReserveJobById.&amp;nbsp; I you want to move a Ready job off the queue, you can either call DeleteJobById or you can reserve it and call UpdateJobSuccess.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that you want to get these jobs before Job Processor gets them.&amp;nbsp; The way that the job queue works is that a job gets reserved to the first client that requests a job of that type.&amp;nbsp; So there is no way to guarantee that your app will always get the job first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you could elaborate what problem you are trying to solve.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2012 18:13:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613380#M11713</guid>
      <dc:creator>Redmond.D</dc:creator>
      <dc:date>2012-09-10T18:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateJobFailure - Error 160</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613552#M11714</link>
      <description>&lt;P&gt;I was just trying to manually "Fail" a job.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote my own job queue manager and one of the features I wanted was to "Pause" a job (prior to it ever running) so that the job processor would not pick it up.&amp;nbsp; "Resuming" a paused job is done by Re-submitting it.&amp;nbsp; It seems like I was just missing the ReserveNextJob bit as it's working after adding that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                    JobSvc.ReserveNextJob(New String() {job.Typ}, System.Environment.UserName)&lt;BR /&gt;                    JobSvc.UpdateJobFailure(job.Id, "User canceled job")&lt;/PRE&gt;&lt;P&gt;You might consider mentioning in the api help that a job needs to be reserved prior to updating the job failure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2012 19:50:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613552#M11714</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-10T19:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateJobFailure - Error 160</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613558#M11715</link>
      <description>&lt;P&gt;I missed the bit about unreserving to set it back to ready.&amp;nbsp; I will use that instead of re-submitting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2012 19:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/updatejobfailure-error-160/m-p/3613558#M11715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-10T19:53:19Z</dc:date>
    </item>
  </channel>
</rss>

