BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
psmerill
Obsidian | Level 7

Hi,

 

I'm tring to create a SAS Process for reading data at Mongo DB in SAS Real Time Decision Manager using Groovy code.
When I've created a new SAS Process in SAS Customer Intelligence Studio, I've chosen "other" as "Code type" instead of SAS DS2, and I've chosen "Node" for "Process type".


Therefore I did not understand what I have to put in tab "Class Code" on Properties page, and whether the Groovy code should be put on the SAS Code page or if should be saved on a path on the middle tier machine of SAS RTDM.

I've created a sample code in Groovy and tested it via Groovy Console; the code ends as correctly.
After I've created a SAS process with the same Groovy code entered on SAS Code page, while in tab Class Code I've inserted the name of package created into Groovy code. However the test of a campaign (into CIS) that uses this node, ends with errors.

 

Are the errors due to the creation mode of SAS process described above?

Is there any documentations or example that describe how to create a SAS Process using groovy or python code?

 

Thanks,
Paolo

1 ACCEPTED SOLUTION

Accepted Solutions
JamesAnderson
SAS Employee
HI Paolo,
In the Code Class field enter "com.sas.analytics.crm.rtdm.activities.GroovyClassActivity".
Cheers
James

View solution in original post

4 REPLIES 4
JamesAnderson
SAS Employee
HI Paolo,
In the Code Class field enter "com.sas.analytics.crm.rtdm.activities.GroovyClassActivity".
Cheers
James
psmerill
Obsidian | Level 7

Hi James,

 

Thank you for the tip.


Do you have any idea if the Groovy code can be inserted into the SAS Code page or should it be inserted in some specific folder of the machine?
Can you tell me what is"com.sas.analytics.crm.rtdm.activities.GroovyClassActivity", should it be the name of the groovy code package?

Thanks again for the helpfulness,
Paolo

JamesAnderson
SAS Employee
Hi Paolo,
Yes you can use the code page to enter the code you have written - you do not need to compile the code elsewhere.
The package name inside the groovy code can be anything you like, but in the Code Class box inside CI Studio you must use "com.sas.analytics.crm.rtdm.activities.GroovyClassActivity". This tells RTDM which built in function to use to compile and execute the code you have written.
The package name that you use in the code (for example MyCustomGroovyClass) can then be referenced in the SASDecisionServicesEngineServer.6.x-log4j.xml file to enable different levels of logging (assuming you have written code for log messages in your package).
Regards
James
shill
SAS Employee

Regarding this question:


 


Is there any documentations or example that describe how to create a SAS Process using groovy or python code?

 

The use of Groovy and Jython in the SAS Process Node in RTDM is considered "experimental", and is not enabled out of the box. In order to even have the ability to use Groovy or Jython in that node requires documentation, which includes the instructions on how to properly use this capability. I suggest you check with whoever enabled this feature for you to get access to that documentation.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

How to improve email deliverability

SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 3089 views
  • 1 like
  • 3 in conversation