use of org.onap.so.db.catalog.beans.ActivitySpec in project so by onap.
the class WorkflowResource method getWorkflowActivitySpecSequence.
protected List<WorkflowActivitySpecSequence> getWorkflowActivitySpecSequence(List<String> activityNames, Workflow workflow) throws Exception {
if (activityNames == null || activityNames.isEmpty()) {
return null;
}
List<WorkflowActivitySpecSequence> workflowActivitySpecs = new ArrayList<>();
int seqNo = 1;
for (String activityName : activityNames) {
ActivitySpec activitySpec = activityRepo.findByName(activityName);
if (activitySpec != null) {
WorkflowActivitySpecSequence workflowActivitySpec = new WorkflowActivitySpecSequence();
workflowActivitySpec.setActivitySpec(activitySpec);
workflowActivitySpec.setWorkflow(workflow);
workflowActivitySpec.setSeqNo(seqNo);
seqNo++;
workflowActivitySpecs.add(workflowActivitySpec);
}
}
return workflowActivitySpecs;
}
Aggregations