UCS Director Cloupia Script Methods?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2014 06:48 AM - edited 03-01-2019 02:45 AM
Can someone point me to better documentation that describes what the default included methods and variables are in the following Cloupia script objects:
ctxt
logger
util
input
output
metadata
I see that same javadocs zipfile is included in the SDK for both OA and CS but I seem to be bumping into walls just trying to get stuff to work. I can find a ton of references to importpackages where the class listed as 'model' but it will not get past the importpackages area if I don't change 'model' to 'service'.
- Labels:
-
General

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2014 05:34 AM
Hi Jeremy,
The Cloupia script is a combination of JavaScript and Cloupia libraries, which you can execute from within
the Cloupia server platform. You can access subset of Cloupia Java APIs and objects from the script. The
Cloupia script supports all JavaScript syntax. However, browser-based objects are not supported because the
Cloupia script contains a server-side scripting.
Three predefined top-level implicit variables or objects are in any Cloupia script:
• ctxt—This variable or object points to the Cloupia Workflow Execution context. Using this object, the
script can access information about the current workflow, task, input, output and can access the Cloupia
APIs. Using the Cloupia APIs, you can invoke the create, read, update, and delete (CRUD) operations,
workflow tasks, and expose other REST APIs. The ctxt object maps to the platform API:
com.cloupia.service.cIM.inframgr.customactions.CustomActionTriggerContext.
• logger—This variable or object points to the Cloupia workflow logger object. All scripts must add
reasonable amount of logging statements, which will be logged into the Service Request log. The logger
implicit object maps to the platform API:
com.cloupia.service.cIM.inframgr.customactions.CustomActionLogger.
• util—Few built-in utility concepts can be accessed using this variable or object. The util implicit object
maps to the platform API: com.cloupia.lib.util.managedreports.APIFunctions.
Reference - https://developer.cisco.com/fileMedia/download/dc4fbebc-f485-483f-bd00-df85c54b8a19
Thanks and Regards,
Geevarghese
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2014 11:55 AM
Gotcha. In further examples it seems like more is available but not readily documented:
e.g.
The above URL has a section for "Sending Emails from the Cloupia Script". You can see it is calling importPackage yet there is no indication in the javadocs that these are available to be imported. I have tried importPackage for a few other items listed in the javadocs yet it either ignores the lines or errors out. Is there more documentation elsewhere about what is allowed to be imported into cloupiascript for use?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 04:08 PM
Have you found any good ways to dig deeper into Cloupia? I am starting out myself and am finding the documentation lacking as well.
