Руководство Разработчика для Cisco Cisco UCS Director 5.0
![Cisco](https://files.manualsbrain.com/attachments/7380d0050044647c30f5c24bbbf5d0c0b6d9bb84/common/fit/150/50/faa183d287233c52228cfea3dbc2a127fe780f60564fcb0955d9c3d1cd23/brand_logo.png)
Cisco UCS Director Cloupia Script Cookbook
10
6. To overwrite the existing task with the imported task, check the Overwrite if
the task exists with same name check box.
If the Overwrite if the task exists with same name check box is
unchecked, a new task will be added with a number (n) to make the
name unique.
name unique.
7. Click Import.
Custom Task Example: Get Submitter Details
function getSubmitterDetails(){
// Get the current workflow submitter’s profile
var userProfile = ctxt.getAPI().userAPIGetMyLoginProfile();
output.SUBMITTER_USERID = ctxt.getUserId();
output.SUBMITTER_FIRSTNAME = userProfile.getFirstName();
output.SUBMITTER_LASTNAME = userProfile.getLastName();
output.SUBMITTER_GROUP_NAME = userProfile.getGroupName();
// output fields are always Strings, to convert ID to
string
output.SUBMITTER_GROUP_ID = ""+userProfile.getGroupId();
output.SUBMITTER_ROLE = userProfile.getRole();
output.SUBMITTER_EMAIL = userProfile.getEmail();
var userProfile = ctxt.getAPI().userAPIGetMyLoginProfile();
output.SUBMITTER_USERID = ctxt.getUserId();
output.SUBMITTER_FIRSTNAME = userProfile.getFirstName();
output.SUBMITTER_LASTNAME = userProfile.getLastName();
output.SUBMITTER_GROUP_NAME = userProfile.getGroupName();
// output fields are always Strings, to convert ID to
string
output.SUBMITTER_GROUP_ID = ""+userProfile.getGroupId();
output.SUBMITTER_ROLE = userProfile.getRole();
output.SUBMITTER_EMAIL = userProfile.getEmail();
}
getSubmitterDetails();
getSubmitterDetails();