use of org.onosproject.workflow.api.DefaultWorkplaceDescription in project onos by opennetworkinglab.
the class WorkplaceStoreCommand method rmWorkplace.
/**
* Removes workplace.
* @param name workplace name to remove
*/
private void rmWorkplace(String name) {
WorkflowService service = get(WorkflowService.class);
try {
DefaultWorkplaceDescription wpDesc = DefaultWorkplaceDescription.builder().name(name).build();
service.removeWorkplace(wpDesc);
} catch (WorkflowException e) {
error(e.getMessage() + ", trace: " + Arrays.asList(e.getStackTrace()));
}
}
use of org.onosproject.workflow.api.DefaultWorkplaceDescription in project onos by opennetworkinglab.
the class WorkplaceStoreCommand method addEmptyWorkplace.
/**
* Adds empty workplace.
* @param name workplace name
*/
private void addEmptyWorkplace(String name) {
WorkflowService service = get(WorkflowService.class);
try {
DefaultWorkplaceDescription wpDesc = DefaultWorkplaceDescription.builder().name(name).build();
service.createWorkplace(wpDesc);
} catch (WorkflowException e) {
error(e.getMessage() + ", trace: " + Arrays.asList(e.getStackTrace()));
}
}
Aggregations