<?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 Strange (threading?) issue regarding rest services in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132622#M93161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using angularjs to call activiti-rest interface. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The scenario I am following is,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Listing all tasks of a user - OK&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Request URL:&lt;A href="http://localhost:8088/activiti-rest/service/tasks?assignee=kermit&amp;amp;start=0" rel="nofollow noopener noreferrer"&gt;http://localhost:8088/activiti-rest/service/tasks?assignee=kermit&amp;amp;start=0&lt;/A&gt;&lt;BR /&gt;Request Method:GET&lt;BR /&gt;Status Code:200 OK&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Completing the task - OK&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Request URL:&lt;A href="http://localhost:8088/activiti-rest/service/task/578/complete" rel="nofollow noopener noreferrer"&gt;http://localhost:8088/activiti-rest/service/task/578/complete&lt;/A&gt;&lt;BR /&gt;Request Method:PUT&lt;BR /&gt;Status Code:200 OK&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Refreshing the task list - NOT OK!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Request URL:&lt;A href="http://localhost:8088/activiti-rest/service/tasks?assignee=kermit&amp;amp;start=0" rel="nofollow noopener noreferrer"&gt;http://localhost:8088/activiti-rest/service/tasks?assignee=kermit&amp;amp;start=0&lt;/A&gt;&lt;BR /&gt;Request Method:GET&lt;BR /&gt;Status Code:404 Not Found&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;it is strange, as the call is the same at (1), double checked it. The response is strange, &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Status page&amp;lt;/title&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body style="font-family: sans-serif;"&amp;gt;&lt;BR /&gt;&amp;lt;p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;"&amp;gt;No task found for taskId &amp;amp;apos;578&amp;amp;apos;&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;p&amp;gt;The server has not found anything matching the request URI&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;p&amp;gt;You can get technical details &amp;lt;a href="&lt;A href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5&lt;/A&gt;"&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;br&amp;gt;&lt;BR /&gt;Please continue your visit at our &amp;lt;a href="/"&amp;gt;home page&amp;lt;/a&amp;gt;.&lt;BR /&gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Huh ? TaskID ? I havent been sending one… The headers :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Accept:application/json, text/plain, */*&lt;BR /&gt;Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3&lt;BR /&gt;Accept-Encoding:gzip,deflate,sdch&lt;BR /&gt;Accept-Language:en-US,en;q=0.8&lt;BR /&gt;Authorization:Basic a2VybWl0Omtlcm1pdA==&lt;BR /&gt;Connection:keep-alive&lt;BR /&gt;Host:localhost:8088&lt;BR /&gt;Referer:&lt;A href="http://localhost:8088/angularjs_1/app/index.html" rel="nofollow noopener noreferrer"&gt;http://localhost:8088/angularjs_1/app/index.html&lt;/A&gt;&lt;BR /&gt;User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, after the error, I resent the same call, using chromes developer tools, so no modification, and returns http 200 again after the failure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only difference, is calling the list method just after the complete method on the failing one. I am calling the list method immediately after calling complete, as the complete call is implemented in a callback, maybe the function has not been finished yet, so that might be the reason, but the failure message is garbage. I am wondering if there are some multithreading problems. Would be really glad if you could help me out. Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Apr 2013 22:14:16 GMT</pubDate>
    <dc:creator>atcevik</dc:creator>
    <dc:date>2013-04-22T22:14:16Z</dc:date>
    <item>
      <title>Strange (threading?) issue regarding rest services</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132622#M93161</link>
      <description>Hello,I am using angularjs to call activiti-rest interface. The scenario I am following is, 1. Listing all tasks of a user - OKRequest URL:http://localhost:8088/activiti-rest/service/tasks?assignee=kermit&amp;amp;start=0Request Method:GETStatus Code:200 OK‍‍‍‍‍2. Completing the task - OKRequest URL:http</description>
      <pubDate>Mon, 22 Apr 2013 22:14:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132622#M93161</guid>
      <dc:creator>atcevik</dc:creator>
      <dc:date>2013-04-22T22:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Strange (threading?) issue regarding rest services</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132623#M93162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Seems really strange that the "/tasks?assignee=XXX" call returns an error-message for the "/task/XXX" call. Is it possible that the framework you're using has some issues with sending a new HTTP-request from within the response-callback of the task-complete success?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you verify (using net-console or firebug or whatever) that the http-call done from the callback is indeed the "/tasks?assignee=XXX"? Because we're using rest let for URL-to-resource mapping and I really doubt there is a bug in restlet-routing. Also, since the error-message is "No task found for taskId &amp;amp;apos;578&amp;amp;apos;", it actually means that rest let received a call to tasks/578. Since restlet uses a new resource for each request, there is no way that it's a problem with server-side threading, as the container will NOT use the same request-context for multiple incoming requests. I suspect that the client-framework has a sticky URL somewhere…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 07:34:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132623#M93162</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-04-24T07:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Strange (threading?) issue regarding rest services</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132624#M93163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Frederik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I am sure that the call is done to that adress, as I stated, I repeat the call using the captured packet by the chrome dev tools and the fault does not occur on the repititive manual call. I do not change the log nor the adress, just resend it. Thus, the XHR call made from the browser is actually sent to the correct adress. My previous message includes log from the browser, not hand crafted. So the request url etc there are the actual adresses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I stated previously, the call is somehow an immediate call, maybe the update of the task mentioned in the log is not completed while listing the tasks of the same user, and I guess might be a problem regarding jpa/persistence at the activiti side.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2013 18:10:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132624#M93163</guid>
      <dc:creator>atcevik</dc:creator>
      <dc:date>2013-05-06T18:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Strange (threading?) issue regarding rest services</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132625#M93164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The headers included do not say anything about the URL that is called. I'm pretty confident that this is something client-related, as we use Restlet for routing to the correct resource, which is a proven technology that won't just 'route" the request to the wrong resource just like that…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 07:42:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/strange-threading-issue-regarding-rest-services/m-p/132625#M93164</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-05-08T07:42:19Z</dc:date>
    </item>
  </channel>
</rss>

