<?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 What is the syntax for the printtask.execute errback? in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/what-is-the-syntax-for-the-printtask-execute/m-p/770377#M74</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm writing an angular application that uses the esri map control and a lot of other functionality. I have a printtask that allows a user to print a map with any layers they may have added. I've also allowed them to select pages sizes from A4, A3, A1, A0. When I first started working with this, A1 would timeout. I then set my print service to be Async, and provided the async: true param to the PrintTask constructor. However I find that if the map has a large number of layers and the user selects A0, the service is still timing out with the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"type":"esriJobMessageTypeInformative","description":"Processing request took longer than the usage timeout for service 'Utilities/PrintingTools.GPServer'."}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've provided the errback parameter to the call to execute for the printtask, however it isn't invoked. I set a param in the app to indicate a print job is currently underway, however because the error callback isn't called, I'm unable to set this flag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I go about implementing the error callback? I've searched the web and can't find an example that implements this callback. I see in the network tab of the chrome dev tools that the arcgis api is polling the server every second for (i guess) about 5 minutes, and the final message is the failure message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my current code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printTask.execute(printParameters,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function (result) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $log.debug('Esri portion of print task complete...');&lt;/P&gt;&lt;P&gt;//work with print task output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function(errorResult) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $log.Info(errorResult);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, where do I configure the "usage timeout" for the print tools service?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prints larger than A3 can take 3 or 4 minutes - this is on a server with a reasonable spec - is this expected? Is there anything I can do to improve print performance times?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2016 04:30:21 GMT</pubDate>
    <dc:creator>AllisterFarn1</dc:creator>
    <dc:date>2016-06-23T04:30:21Z</dc:date>
    <item>
      <title>What is the syntax for the printtask.execute errback?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/what-is-the-syntax-for-the-printtask-execute/m-p/770377#M74</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm writing an angular application that uses the esri map control and a lot of other functionality. I have a printtask that allows a user to print a map with any layers they may have added. I've also allowed them to select pages sizes from A4, A3, A1, A0. When I first started working with this, A1 would timeout. I then set my print service to be Async, and provided the async: true param to the PrintTask constructor. However I find that if the map has a large number of layers and the user selects A0, the service is still timing out with the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"type":"esriJobMessageTypeInformative","description":"Processing request took longer than the usage timeout for service 'Utilities/PrintingTools.GPServer'."}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've provided the errback parameter to the call to execute for the printtask, however it isn't invoked. I set a param in the app to indicate a print job is currently underway, however because the error callback isn't called, I'm unable to set this flag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I go about implementing the error callback? I've searched the web and can't find an example that implements this callback. I see in the network tab of the chrome dev tools that the arcgis api is polling the server every second for (i guess) about 5 minutes, and the final message is the failure message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my current code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printTask.execute(printParameters,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function (result) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $log.debug('Esri portion of print task complete...');&lt;/P&gt;&lt;P&gt;//work with print task output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function(errorResult) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $log.Info(errorResult);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, where do I configure the "usage timeout" for the print tools service?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prints larger than A3 can take 3 or 4 minutes - this is on a server with a reasonable spec - is this expected? Is there anything I can do to improve print performance times?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 04:30:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/what-is-the-syntax-for-the-printtask-execute/m-p/770377#M74</guid>
      <dc:creator>AllisterFarn1</dc:creator>
      <dc:date>2016-06-23T04:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: What is the syntax for the printtask.execute errback?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/what-is-the-syntax-for-the-printtask-execute/m-p/770378#M75</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone advise how I can get visibility of this question to esri developers who would hopefully know the api? This is not functioning as defined here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/printtask-amd.html#execute" title="https://developers.arcgis.com/javascript/3/jsapi/printtask-amd.html#execute"&gt;PrintTask | API Reference | ArcGIS API for JavaScript 3.17&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I can't find any documentation or examples of usage of the error callback. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 01:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/what-is-the-syntax-for-the-printtask-execute/m-p/770378#M75</guid>
      <dc:creator>AllisterFarn1</dc:creator>
      <dc:date>2016-06-30T01:00:11Z</dc:date>
    </item>
  </channel>
</rss>

