The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The CloupiaScript interpreter is a JavaScript interpreter populated with built-in libraries and APIs. You can use the CloupiaScript interpreter to test CloupiaScript code without having to create and run a workflow task.
PrintObj()—Takes an object as an argument and prints out all the properties and methods in the object. The printed result provides the names and values for variables in the object and the names of all the object's functions. You can then call toString() on any of the method names to examine the method signature.
Upload()—Takes a filename as an argument and uploads the file's contents to the CloupiaScript interpreter.
You can evaluate JavaScript in the context of a particular a custom task. To do so, you select a custom task, launch the CloupiaScript Interpreter, and supply the context variables that are defined for executing that custom task.
When you launch the interpreter, it prompts you for values of the custom task input fields and populates the input object of the task. All the variables that are available when you actually execute the custom task are made available.
To open the CloupiaScript interpreter with a context available, do the following:
The printObj( ) function prints all the properties and methods it contains. Call functiontoString() to find more details about a function. The following example shows how to examine the ReportContext class and get details about ReportContext.setCloudName().
session started > importPackage(com.cloupia.model.cIM); > var ctx = new ReportContext(); > printObj(ctx); properties = cloudName:null class:class com.cloupia.model.cIM.ReportContext filterId:null id:null targetCuicId:null type:0 ids:[Ljava.lang.String;@4de27bc5 methods = setIds jdoReplaceField jdoReplaceFields toString getCloudName wait getClass jdoReplaceFlags hashCode jdoNewInstance jdoReplaceStateManager jdoIsDetached notify jdoGetVersion jdoProvideField jdoCopyFields jdoGetObjectId jdoGetPersistenceManager jdoCopyKeyFieldsToObjectId jdoGetTransactionalObjectId getType getFilterId setType jdoIsPersistent equals setCloudName jdoNewObjectIdInstance jdoIsDeleted getTargetCuicId setId setFilterId jdoProvideFields jdoMakeDirty jdoIsNew requiresCloudName getIds notifyAll jdoIsTransactional getId jdoReplaceDetachedState jdoIsDirty setTargetCuicId jdoCopyKeyFieldsFromObjectId > var func = ctx.setCloudName; > func void setCloudName(java.lang.String) > func.toString(); function setCloudName() {/* void setCloudName(java.lang.String) */}