<?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: Problem - invoke claim use rest api? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79313#M52770</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you&amp;nbsp; tell me in more detail.I am a new user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Sep 2011 09:21:50 GMT</pubDate>
    <dc:creator>cuizhiyong</dc:creator>
    <dc:date>2011-09-29T09:21:50Z</dc:date>
    <item>
      <title>Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79311#M52768</link>
      <description>We can invoke the claim request by http://localhost:8080/activiti-rest/service/task/307/claim. But I can't set the userId who the task I want to assignee&amp;nbsp; like taskService.claim(task.getId(), "fozzie");.</description>
      <pubDate>Thu, 29 Sep 2011 09:05:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79311#M52768</guid>
      <dc:creator>cuizhiyong</dc:creator>
      <dc:date>2011-09-29T09:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79312#M52769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;claiming is always done for the current user. I think you need 'assigning'&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 09:09:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79312#M52769</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-09-29T09:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79313#M52770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you&amp;nbsp; tell me in more detail.I am a new user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 09:21:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79313#M52770</guid>
      <dc:creator>cuizhiyong</dc:creator>
      <dc:date>2011-09-29T09:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79314#M52771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;sorry, no, I never used the rest api and have unfortunately no time to look into this in detail. The concept of 'claim' vs 'assign' however is independent of the rest api. See the docs for this&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 10:21:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79314#M52771</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-09-29T10:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79315#M52772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You do claiming like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;PUT /task/4711/claim&lt;BR /&gt;Host: 127.0.0.1:8080&lt;BR /&gt;Accept-Encoding: identity&lt;BR /&gt;Content-Length: 26&lt;BR /&gt;content-type: application/json&lt;BR /&gt;Authorization: Basic cnViZW46cnViZW5zc2VjcmV0cGFzcw==&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;The Authorization header contains my username and password base64 encoded, '4711' is the tasks id. The user authenticating himself like this is the one claiming the task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also note the thread "&lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=2296" rel="nofollow noopener noreferrer"&gt;REST API Bugs/Changes 'kermit' hardcoded&lt;/A&gt;&lt;SPAN&gt;" because claiming will always result in 'kermit' getting the task in Activiti 5.7 REST API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greets,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ruben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 14:44:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79315#M52772</guid>
      <dc:creator>ruben1</dc:creator>
      <dc:date>2011-09-29T14:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79316#M52773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 23:56:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79316#M52773</guid>
      <dc:creator>cuizhiyong</dc:creator>
      <dc:date>2011-09-29T23:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79317#M52774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;May we assume that since the fix for the "always claimed by kermit" bug was corrected in the trunk, that the fix made its way into Activiti 5.8?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attempting to use the REST interface to claim a task with the following call:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;[size=85]&lt;BR /&gt;&lt;BR /&gt;function claimTheTask(theTaskId)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("claimTheTask() was called with theTaskId = " + theTaskId);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var activitiClaimTaskUrl = "&lt;A href="http://172.30.1.67:8080/activiti-rest/service/task" rel="nofollow noopener noreferrer"&gt;http://172.30.1.67:8080/activiti-rest/service/task&lt;/A&gt;";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var theParameters = "/" + theTaskId + "/claim";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var theRequest = new Ajax.Request&lt;BR /&gt; (activitiClaimTaskUrl + theParameters,&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestHeaders: ["ContentType", "application/json;charset=UTF-8"],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; requestHeaders: ["Authorization", "Basic a2VybWl0Omtlcm1pdA=="],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method: "PUT",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onFailure:&amp;nbsp; function (originalRequest)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("theReply").innerHTML&lt;BR /&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; = "Failed with:&amp;nbsp; Status = " + originalRequest.status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("onFailure() was called.");&lt;BR /&gt;&amp;nbsp; },&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onSuccess:&amp;nbsp; function(originalRequest)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("theReply").innerHTML&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "Received:&amp;nbsp; " + originalRequest.responseText;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("onSuccess() was called.");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;BR /&gt;});&lt;BR /&gt;}[/size]&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;This give me a Status of 405 Method not allowed and the Request Header shows that a "POST" method was issued, instead of a "PUT".&amp;nbsp; "PUT" is the allowed method.&amp;nbsp; Could something be replacing the "PUT" my code issues with a "POST"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Request Header:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;POST &lt;A href="http://172.30.1.67:8080/activiti-rest/service/task/953/claim" rel="nofollow noopener noreferrer"&gt;http://172.30.1.67:8080/activiti-rest/service/task/953/claim&lt;/A&gt; HTTP/1.1&lt;BR /&gt;Host: 172.30.1.67:8080&lt;BR /&gt;User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.23) Gecko/20110920 Firefox/3.6.23&lt;BR /&gt;Accept: text/javascript, text/html, application/xml, text/xml, */*&lt;BR /&gt;Accept-Language: en-us,en;q=0.5&lt;BR /&gt;Accept-Encoding: gzip,deflate&lt;BR /&gt;Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;BR /&gt;Keep-Alive: 115&lt;BR /&gt;Connection: keep-alive&lt;BR /&gt;X-Requested-With: XMLHttpRequest&lt;BR /&gt;X-Prototype-Version: 1.7&lt;BR /&gt;Content-Type: application/x-www-form-urlencoded; charset=UTF-8&lt;BR /&gt;Authorization: Basic a2VybWl0Omtlcm1pdA==&lt;BR /&gt;Referer: &lt;A href="http://172.30.1.67:8080/Act-Control-Proj2/ActControlServlet" rel="nofollow noopener noreferrer"&gt;http://172.30.1.67:8080/Act-Control-Proj2/ActControlServlet&lt;/A&gt;&lt;BR /&gt;Content-Length: 11&lt;BR /&gt;Pragma: no-cache&lt;BR /&gt;Cache-Control: no-cache&lt;BR /&gt;&lt;BR /&gt;_method=put&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Please point out what I am doing incorrectly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 22:54:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79317#M52774</guid>
      <dc:creator>ct1</dc:creator>
      <dc:date>2011-11-10T22:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79318#M52775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe I don't understand your question, but to use the task operation REST service you are required to use a PUT message.&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>Sat, 12 Nov 2011 12:29:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79318#M52775</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2011-11-12T12:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem - invoke claim use rest api?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79319#M52776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Futher investigation revealed the solution.&amp;nbsp; I was using the prototype.js JavaScript library.&amp;nbsp; Documention I discovered after posting this question indicated that prototype.js wraps the "PUT" method call inside a "POST" rather than submitting a "PUT".&amp;nbsp; That explains why the "POST" was indicated in the request header.&amp;nbsp; When I changed this code to use the XMLHTTPRequest object itself, I was able to submit the "PUT".&amp;nbsp; I think this question has been resolved.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 14:13:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-invoke-claim-use-rest-api/m-p/79319#M52776</guid>
      <dc:creator>ct1</dc:creator>
      <dc:date>2011-11-14T14:13:37Z</dc:date>
    </item>
  </channel>
</rss>

