<?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: remote is not defined in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311250#M264380</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;That's where Open source is awesome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, is that webscript does it, so can you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the webscript you are calling is: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /alfresco/s/api/workflow-instances/{workflow_instance_id}?includeTasks={includeTasks?}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you list the webscripts on your Alfresco you'll end up on that page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://localhost:8080/alfresco/s/script/org/alfresco/repository/workflow/workflow-instance.get" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/script/org/alfresco/repository/workflow/workflow-instance.get&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Which tells you it's a java-backed webscript where the corresponding java class is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Implementation:&amp;nbsp;&amp;nbsp;&amp;nbsp;class org.alfresco.repo.web.scripts.workflow.WorkflowInstanceGet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at Alfresco code, you'll find the said class there:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2f/root/projects/remote-api/source/java/org/alfresco/repo/web/scripts/workflow/WorkflowInstanceGet.java" rel="nofollow noopener noreferrer"&gt;https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2f/root/projects/remote-api/source/java/org/alfresco/repo/web/scripts/workflow/WorkflowInstanceGet.java&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;(since you mentioned your version is 4.2 I picked 4.2.f in that link. Other versions are available too)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The key to get it done is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;workflowService.getWorkflowById(workflowInstanceId);&lt;SPAN class="line-numbers-rows"&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;So if you want wour workflow to be backed in Java that's what you should use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to work in Javascript, ignore the big wall of text above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Javascript has a root item to play with workflows. Play around with it and see if it does what you want:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://docs.alfresco.com/4.2/references/API-JS-WorkflowManager.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.2/references/API-JS-WorkflowManager.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 12:27:50 GMT</pubDate>
    <dc:creator>scouil</dc:creator>
    <dc:date>2014-11-05T12:27:50Z</dc:date>
    <item>
      <title>remote is not defined</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311247#M264377</link>
      <description>Hi allIn a workflow i want to retrieve history of this workflow at each task.So i created a javascript code that i tested on my javascript console on alfresco (admin tools). And it works perfectly !var connector = remote.connect("alfresco");var user = connector.call("ervice/api/login?u=admin&amp;amp;pw=</description>
      <pubDate>Tue, 04 Nov 2014 16:12:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311247#M264377</guid>
      <dc:creator>jeremiebal</dc:creator>
      <dc:date>2014-11-04T16:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: remote is not defined</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311248#M264378</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;"remote" is defined in Surf, hence is only available in Share webscripts, since only Share is built on Surf.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So same goes for the webscripts.script.remote bean. You cannot include it in alfresco side as it's defined in Surf.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But that's fine actually because it just prevented you from making an architecture mistake.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When you're in Alfresco code, you don't want to get out of it by calling a webscript that will re-enter the Alfresco context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What you'd want is actually to directly do something similar that the webscript you planned to call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It most likely heavily relies on an Alfresco service and using that same service will lead you to the same result.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 16:35:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311248#M264378</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2014-11-04T16:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: remote is not defined</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311249#M264379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, thanks a lot for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So if i understand you, i would call an Alfresco Service wich allow to get historic of the workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But, i searched and i found only the Webscript, no Alfresco Service &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I continue my searchs but if you could say to me what service did you talk, it would be great &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 08:29:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311249#M264379</guid>
      <dc:creator>jeremiebal</dc:creator>
      <dc:date>2014-11-05T08:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: remote is not defined</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311250#M264380</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;That's where Open source is awesome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, is that webscript does it, so can you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the webscript you are calling is: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /alfresco/s/api/workflow-instances/{workflow_instance_id}?includeTasks={includeTasks?}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you list the webscripts on your Alfresco you'll end up on that page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://localhost:8080/alfresco/s/script/org/alfresco/repository/workflow/workflow-instance.get" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/script/org/alfresco/repository/workflow/workflow-instance.get&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Which tells you it's a java-backed webscript where the corresponding java class is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Implementation:&amp;nbsp;&amp;nbsp;&amp;nbsp;class org.alfresco.repo.web.scripts.workflow.WorkflowInstanceGet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at Alfresco code, you'll find the said class there:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2f/root/projects/remote-api/source/java/org/alfresco/repo/web/scripts/workflow/WorkflowInstanceGet.java" rel="nofollow noopener noreferrer"&gt;https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2f/root/projects/remote-api/source/java/org/alfresco/repo/web/scripts/workflow/WorkflowInstanceGet.java&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;(since you mentioned your version is 4.2 I picked 4.2.f in that link. Other versions are available too)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The key to get it done is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;workflowService.getWorkflowById(workflowInstanceId);&lt;SPAN class="line-numbers-rows"&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;So if you want wour workflow to be backed in Java that's what you should use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to work in Javascript, ignore the big wall of text above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Javascript has a root item to play with workflows. Play around with it and see if it does what you want:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://docs.alfresco.com/4.2/references/API-JS-WorkflowManager.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.2/references/API-JS-WorkflowManager.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 12:27:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311250#M264380</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2014-11-05T12:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: remote is not defined</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311251#M264381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot !!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As i want to work in javascript, i will use all worklowManager possibilities in my code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 13:04:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/remote-is-not-defined/m-p/311251#M264381</guid>
      <dc:creator>jeremiebal</dc:creator>
      <dc:date>2014-11-06T13:04:00Z</dc:date>
    </item>
  </channel>
</rss>

