private void expandWorkflowTasksAndConditions(Graph graph,
Metadata staticMetadata) throws Exception {
if (graph.getExecutionType().equals("workflow")
|| graph.getExecutionType().equals("sequential")
|| graph.getExecutionType().equals("parallel")) {
ParentChildWorkflow workflow = new ParentChildWorkflow(graph);
workflow.setId(graph.getModelId());
workflow.setName(graph.getModelName());
graph.setWorkflow(workflow);
if (graph.getParent() == null
|| (graph.getParent() != null && graph.getParent().getWorkflow() == null)) {
LOG.log(Level.FINEST, "Workflow: [" + graph.getModelId()
+ "] has no parent: it's a top-level workflow");
}
if (workflow.getName() == null
|| (workflow.getName() != null && workflow.getName().equals(""))) {
workflow.setName(graph.getExecutionType() + "-" + workflow.getId());
}
this.workflows.put(graph.getModelId(), workflow);
} else if (graph.getExecutionType().equals("condition")) {
WorkflowCondition cond = null;