<?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: Calling RESTClient from Script Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/calling-restclient-from-script-task/m-p/184892#M138022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mike, nice seeing you here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A quick googling on the @Grab gave me this : &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/20009993/groovy-how-does-grab-inclusion-differ-from-classpath-inclusion" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/20009993/groovy-how-does-grab-inclusion-differ-from-classpath-inclusion&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Grab uses ivy to fetch the specified library (plus all of its dependencies) from the maven core repository. It then adds these downloaded libraries to the classpath of the loader that's running tge current script."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for Grab to work, it seems it needs Ivy on the classpath. Which probably is included by default in the Groovy binary when running from commandline. So adding the Ivy jars might do the trick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you are using Groovy, you can also - instead of using the http builder - use the standard JDK classes. Or even HttpClient.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2015 12:26:47 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2015-03-24T12:26:47Z</dc:date>
    <item>
      <title>Calling RESTClient from Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/calling-restclient-from-script-task/m-p/184891#M138021</link>
      <description>I'm trying to find the most simple way to make outbound REST calls from a script task.&amp;nbsp; I was hoping to keep it all simple with groovy with something like:import groovyx.net.http.RESTClientimport static groovyx.net.http.ContentType.* def client = new RESTClient( 'https://hooks.slack.com/services/' )</description>
      <pubDate>Mon, 23 Mar 2015 15:27:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/calling-restclient-from-script-task/m-p/184891#M138021</guid>
      <dc:creator>mike_waldrop</dc:creator>
      <dc:date>2015-03-23T15:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RESTClient from Script Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/calling-restclient-from-script-task/m-p/184892#M138022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mike, nice seeing you here &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A quick googling on the @Grab gave me this : &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/20009993/groovy-how-does-grab-inclusion-differ-from-classpath-inclusion" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/20009993/groovy-how-does-grab-inclusion-differ-from-classpath-inclusion&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Grab uses ivy to fetch the specified library (plus all of its dependencies) from the maven core repository. It then adds these downloaded libraries to the classpath of the loader that's running tge current script."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for Grab to work, it seems it needs Ivy on the classpath. Which probably is included by default in the Groovy binary when running from commandline. So adding the Ivy jars might do the trick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you are using Groovy, you can also - instead of using the http builder - use the standard JDK classes. Or even HttpClient.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 12:26:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/calling-restclient-from-script-task/m-p/184892#M138022</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-03-24T12:26:47Z</dc:date>
    </item>
  </channel>
</rss>

