Search in sources :

Example 1 with CustomServicesWorkflowCreateParam

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);
}
Also used : CustomServicesWorkflowCreateParam(com.emc.storageos.model.customservices.CustomServicesWorkflowCreateParam) CustomServicesWorkflowDocument(com.emc.storageos.model.customservices.CustomServicesWorkflowDocument) CustomServicesWorkflowRestRep(com.emc.storageos.model.customservices.CustomServicesWorkflowRestRep)

Aggregations

CustomServicesWorkflowCreateParam (com.emc.storageos.model.customservices.CustomServicesWorkflowCreateParam)1 CustomServicesWorkflowDocument (com.emc.storageos.model.customservices.CustomServicesWorkflowDocument)1 CustomServicesWorkflowRestRep (com.emc.storageos.model.customservices.CustomServicesWorkflowRestRep)1