use of com.emc.storageos.model.customservices.CustomServicesWorkflowCreateParam in project coprhd-controller by CoprHD.
the class WorkflowBuilder method createWorkflow.
public static void createWorkflow(final String workflowName, final String dirID) throws URISyntaxException {
// Create workflow with just name
final CustomServicesWorkflowCreateParam param = new CustomServicesWorkflowCreateParam();
final CustomServicesWorkflowDocument document = new CustomServicesWorkflowDocument();
document.setName(workflowName);
List<CustomServicesWorkflowDocument.Step> steps = getStartEndSteps();
document.setSteps(steps);
param.setDocument(document);
final CustomServicesWorkflowRestRep customServicesWorkflowRestRep = getCatalogClient().customServicesPrimitives().createWorkflow(param);
// Add this workflowid to directory
if (null != customServicesWorkflowRestRep) {
addResourceToWFDirectory(customServicesWorkflowRestRep.getId(), dirID);
} else {
flash.error("Error creating workflow");
}
renderJSON(customServicesWorkflowRestRep);
}
Aggregations