Cisco Cisco UCS Director 5.0 Developer's Guide
Cisco UCS Director Cloupia Script Cookbook
7
Field Group Name: If specified, all the fields with matching group would be
put in to the field group.
put in to the field group.
Mandatory: If checked, the user must provide a value for this field.
According to the input field type, the field attributes need to be defined:
The Text Field Attributes are applicable when the input field type is Text.
The LOV Field Attributes are applicable when the input field type is LOV (List of
Values) or LOV with Radio buttons.
Values) or LOV with Radio buttons.
The Table Name is applicable when the input field type is Table or Popup Table or
Table with selection checkbox.
Table with selection checkbox.
3.1.2 Defining Custom Task Outputs
Output Field Name: A unique name of the output field. It must start with an
alphabetic character and must not contain spaces or special characters.
alphabetic character and must not contain spaces or special characters.
Output Field Description: Description of the output field.
Output Field Type: Type of the output. This determines how the output can
be mapped to other task inputs.
be mapped to other task inputs.
Internally all outputs are treated as String objects irrespective of the type of the
output.
3.1.3 Creating the Custom Task Script
CloupiaScript is used to define the handler for the custom task. There are six pre-
defined top level variables in any CloupiaScript: ctxt, logger, util, input, output, and
metadata.
defined top level variables in any CloupiaScript: ctxt, logger, util, input, output, and
metadata.
Object ctxt: This variable points to the Cloupia Workflow Execution context.
Using this object, the script can access information about the current
workflow, task, input, and 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.
Using this object, the script can access information about the current
workflow, task, input, and 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.
Object 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.
object. All scripts must add reasonable amount of logging statements, which
will be logged into the Service Request log.
Object util: Few built-in utility methods can be accessed using this variable.
Object input: This variable points to a simple POJO (object) that holds all the
task input variables.
task input variables.
Object output: This variable points to a simple POJO (object) that holds all
task output variables.
task output variables.