<?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 RTDM Flow inside RTDM via REST in SAS Customer Intelligence</title>
    <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Calling-RTDM-Flow-inside-RTDM-via-REST/m-p/401301#M625</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, this is a generic Groovy development&amp;nbsp;question, it seems to have little to do with the fact that you are running it from RTDM. You could create a similar script&amp;nbsp;(substituting some input parameters) with the same REST call and run it as a standalone Groovy program, and likely get the same issue.&amp;nbsp; Naturally, stackoverflow.com would be the place to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A number of articles are being googled by "Groovy&amp;nbsp;&lt;SPAN&gt;HttpResponseException Not Found". All point out to the issues in URL and Path formats.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try this advice:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/33387753/groovy-grails-get-httpresponseexception-by-using-httpbuilder" target="_blank"&gt;https://stackoverflow.com/questions/33387753/groovy-grails-get-httpresponseexception-by-using-httpbuilder&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would be creating a RESTClient for&amp;nbsp;'http://sgbdcmpweb01:7980/' URL, and using path 'RTDM/rest/runtime/decisions/mpgPortout' or something like that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 12:28:27 GMT</pubDate>
    <dc:creator>Dmitry_Alergant</dc:creator>
    <dc:date>2017-10-05T12:28:27Z</dc:date>
    <item>
      <title>Calling RTDM Flow inside RTDM via REST</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Calling-RTDM-Flow-inside-RTDM-via-REST/m-p/401223#M624</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to call an RTDM flow on a different server via RESTful call. Please see code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// @Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.1')&lt;BR /&gt;import groovyx.net.http.Method&lt;BR /&gt;import groovyx.net.http.RESTClient&lt;BR /&gt;import org.apache.http.entity.StringEntity&lt;BR /&gt;import groovyx.net.http.HttpResponseException&lt;/P&gt;&lt;P&gt;class callmpgPortout implements Runnable {&lt;BR /&gt;// Input variables&lt;BR /&gt;String MSISDN;&lt;BR /&gt;Date REQUEST_START_TIME;&lt;BR /&gt;String NP_TXN_ID;&lt;BR /&gt;String PORT_ID;&lt;BR /&gt;String LOG_ID;&lt;BR /&gt;String OLO;&lt;BR /&gt;String VARIABLE1;&lt;BR /&gt;String VARIABLE2;&lt;BR /&gt;String VARIABLE3;&lt;BR /&gt;String VARIABLE4;&lt;BR /&gt;String VARIABLE5;&lt;/P&gt;&lt;P&gt;// Output variables&lt;BR /&gt;String MSGCODE;&lt;BR /&gt;String MSGDESC;&lt;BR /&gt;&lt;BR /&gt;private Long status;&lt;BR /&gt;public void run() {&lt;BR /&gt;def client = new RESTClient( 'http://sgbdcmpweb01:7980/RTDM/rest/runtime/decisions' )&lt;BR /&gt;def resp = client.post( path : '/mpgPortout' ,&lt;BR /&gt;query: [decisionId: 'mpgPortout'],&lt;BR /&gt;requestContentType : 'application/json',&lt;BR /&gt;body : '{ \n' +&lt;BR /&gt;' "clientTimeZone": "GMT",\n' +&lt;BR /&gt;' "version": 1,\n' +&lt;BR /&gt;' "inputs": {"MSISDN":MSISDN,"REQUEST_START_TIME":REQUEST_START_TIME,"NP_TXN_ID":NP_TXN_ID,"PORT_ID" : PORT_ID,"LOG_ID":LOG_ID,"OLO" : OLO,"VARIABLE1":VARIABLE1,"VARIABLE2":VARIABLE2,"VARIABLE3":VARIABLE3,"VARIABLE4":VARIABLE4,"VARIABLE5":VARIABLE5\n' +&lt;BR /&gt;' \t"TestPath" : 1\n' +&lt;BR /&gt;' }\n' +&lt;BR /&gt;'}'&lt;BR /&gt;)&lt;BR /&gt;status = resp.status;&lt;BR /&gt;}&lt;BR /&gt;public Long getStatus() {&lt;BR /&gt;return status;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;com.sas.analytics.ph.RTDMException: Failure running user groovy activity&lt;BR /&gt;at com.sas.analytics.crm.rtdm.activities.GroovyClassActivity.execute(GroovyClassActivity.java:374)&lt;BR /&gt;at com.sas.rtdm.implementation.EventExecutor.execute(EventExecutor.java:243)&lt;BR /&gt;at com.sas.rtdm.implementation.TestExecutor.execute(TestExecutor.java:209)&lt;BR /&gt;at com.sas.rtdm.implementation.engine.ActivityNode._execute(ActivityNode.java:58)&lt;BR /&gt;at com.sas.rtdm.implementation.engine.ActivityNode._execute(ActivityNode.java:18)&lt;BR /&gt;at com.sas.rtdm.implementation.engine.SchedulableNode$1.call(SchedulableNode.java:89)&lt;BR /&gt;at com.sas.rtdm.implementation.engine.SchedulableNode$1.call(SchedulableNode.java:82)&lt;BR /&gt;at java.util.concurrent.FutureTask.run(FutureTask.java:262)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: groovyx.net.http.HttpResponseException: Not Found&lt;BR /&gt;at groovyx.net.http.RESTClient.defaultFailureHandler(RESTClient.java:263)&lt;BR /&gt;at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt;at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)&lt;BR /&gt;at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)&lt;BR /&gt;at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)&lt;BR /&gt;at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1077)&lt;BR /&gt;at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)&lt;BR /&gt;at groovy.lang.Closure.call(Closure.java:426)&lt;BR /&gt;at groovyx.net.http.HTTPBuilder$1.handleResponse(HTTPBuilder.java:503)&lt;BR /&gt;at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:945)&lt;BR /&gt;at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919)&lt;BR /&gt;at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:515)&lt;BR /&gt;at groovyx.net.http.RESTClient.post(RESTClient.java:141)&lt;BR /&gt;at groovyx.net.http.RESTClient$post.call(Unknown Source)&lt;BR /&gt;at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)&lt;BR /&gt;at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)&lt;BR /&gt;at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)&lt;BR /&gt;at callmpgPortout.run(script15071903301131828657077.groovy:31)&lt;BR /&gt;at com.sas.analytics.crm.rtdm.activities.GroovyClassActivity.execute(GroovyClassActivity.java:362)&lt;BR /&gt;... 10 more&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.TestExecutor - TestExecutor shutting down.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.EventExecutor - EventExecutor shutting down.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.engine.concurrent.RTDMConcurrentExecutor - RTDMConcurrentExecutor shutting down.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.engine.concurrent.RTDMConcurrentExecutor - RTDMConcurrentExecutor shutdown complete.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.RTDMObjectFactory - RTDMObjectFactory shutting down.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.resource.ResourcePool - ResourcePool sync monitor shutting down.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.resource.ResourcePool - ResourcePool sync monitor shutdown complete.&lt;BR /&gt;2017-10-05 15:58:50,302 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.resource.JDBCConnectionPool - JDBCConnectionValidator shutdown flag set.&lt;BR /&gt;2017-10-05 15:58:50,338 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.resource.JDBCConnectionPool - Finished closing pool jdbc:sastkts://sgbdcmprtcapp01:24142&lt;BR /&gt;2017-10-05 15:58:50,338 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.resource.JDBCConnectionPool - JDBCConnectionPool for Resource $SAS_Activity_Resource shutdown complete.&lt;BR /&gt;2017-10-05 15:58:50,338 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.RTDMObjectFactory - RTDMObjectFactory shutdown complete.&lt;BR /&gt;2017-10-05 15:58:50,338 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.EventExecutor - EventExecutor shutdown complete.&lt;BR /&gt;2017-10-05 15:58:50,338 INFO sasdemo SASDSDesignRepository com.sas.rtdm.implementation.TestExecutor - TestExecutor shutdown complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 08:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Calling-RTDM-Flow-inside-RTDM-via-REST/m-p/401223#M624</guid>
      <dc:creator>dianevictoriap</dc:creator>
      <dc:date>2017-10-05T08:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calling RTDM Flow inside RTDM via REST</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/Calling-RTDM-Flow-inside-RTDM-via-REST/m-p/401301#M625</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, this is a generic Groovy development&amp;nbsp;question, it seems to have little to do with the fact that you are running it from RTDM. You could create a similar script&amp;nbsp;(substituting some input parameters) with the same REST call and run it as a standalone Groovy program, and likely get the same issue.&amp;nbsp; Naturally, stackoverflow.com would be the place to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A number of articles are being googled by "Groovy&amp;nbsp;&lt;SPAN&gt;HttpResponseException Not Found". All point out to the issues in URL and Path formats.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try this advice:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/33387753/groovy-grails-get-httpresponseexception-by-using-httpbuilder" target="_blank"&gt;https://stackoverflow.com/questions/33387753/groovy-grails-get-httpresponseexception-by-using-httpbuilder&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would be creating a RESTClient for&amp;nbsp;'http://sgbdcmpweb01:7980/' URL, and using path 'RTDM/rest/runtime/decisions/mpgPortout' or something like that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 12:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/Calling-RTDM-Flow-inside-RTDM-via-REST/m-p/401301#M625</guid>
      <dc:creator>Dmitry_Alergant</dc:creator>
      <dc:date>2017-10-05T12:28:27Z</dc:date>
    </item>
  </channel>
</rss>

