
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
11-16-2015 12:54 PM - edited 03-01-2019 06:39 AM
Task Name | Check the SR ID for status and cancel request |
Description | |
Prerequisites |
|
Category | Workflow |
Components | vSphere 5.x |
User Inputs | e-mail address |
Output | e-mail with counter |
Instructions for Regular Workflow Use:
- Download the attached .ZIP file below to your computer. *Remember the location of the saved file on your computer.
- Unzip the file on your computer. Should end up with a .WFD file.
- Log in to UCS Director as a user that has "system-admin" privileges.
- Navigate to "Policies-->Orchestration" and click on "Import".
- Click "Browse" and navigate to the location on your computer where the .WFDX file resides. Choose the .WFDX file and click "Open".
- Click "Upload" and then "OK" once the file upload is completed. Then click "Next".
- Click the "Select" button next to "Import Workflows". Click the "Check All" button to check all checkboxes and then the "Select" button.
- Click "Submit".
- A new folder should appear in "Policies-->Orchestration" that contains the imported workflow. You will now need to update the included tasks with information about the specific environment
A thank you goes out to Mike Zimmerman
The workflow:
Workflow input for cancel:
Workflow run:
Workflow input for complete:
Workflow run:
The custom code:
importPackage(java.util);
importPackage(com.cloupia.lib.util.managedreports);
function getReport(reportContext, reportName) {
var report = null;
try {
report = ctxt.getAPI().getConfigTableReport(reportContext, reportName);
} catch(e) {
}
if (report == null) {
return ctxt.getAPI().getTabularReport(reportName, reportContext);
} else {
var source = report.getSourceReport();
return ctxt.getAPI().getTabularReport(source, reportContext);
}
}
function getReportView(reportContext, reportName) {
var report = getReport(reportContext, reportName);
if (report == null)
{
logger.addError("No such report exists for the specified context "+reportName);
return null;
}
return new TableView(report);
}
var reportName = "ServiceRequestFeature.group.table_config";
var repContext = util.createContext("6", null, null);
var report = getReportView(repContext, reportName);
//"report" variable holds an array of table rows from the Service Requests tabular report in UCSD//
//Use the following filters if you want to grab specific data...here I'm getting the row where "Service Request ID" equals "333" as an example...
var results = report.filterRowsByColumn("Service Request Id", "333", false);
//Once you have the row you want, you can request a specific column value....here I'm requesting the value in column "Request Status" for the first row (designated by the "0")
var status = results.getColumnValue(0, "Request Status");
//print status to logger...
logger.addInfo("Status equals: "+status);