StringUtils.ESCAPE_CHAR, new char[] {'"', '=', '.'});
WorkflowContext context = new WorkflowContext();
context.setWorkflowId(workflowId);
context.setWorkflowName(workflowName);
context.setWorkflowEntityName(workflowNodeName);
WorkflowDag dag = new WorkflowDag();
Matcher matcher = adjPattern.matcher(workflowAdjacencies);
while(matcher.find()){
WorkflowDagEntry dagEntry = new WorkflowDagEntry();
dagEntry.setSource(matcher.group(1).replace("\\", ""));
String[] values = StringUtils.getStrings(
matcher.group(2).replace("\\", ""));
if (values != null) {
for (String target : values) {
dagEntry.addTarget(target);
}
}
dag.addEntry(dagEntry);
}
if (dag.getEntries().isEmpty()) {
WorkflowDagEntry wfDagEntry = new WorkflowDagEntry();
wfDagEntry.setSource(workflowNodeName);
dag.addEntry(wfDagEntry);
}
context.setWorkflowDag(dag);
return context;
}