Skip to content

Commit

Permalink
Include exception thrown in innerloop in result error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Apr 8, 2011
1 parent 2a0774d commit 80e0bc6
Showing 1 changed file with 8 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,15 @@ public StatusResult dispatch(final ExecutionContext context, final INodeEntry no
final Collection<String> strings = workflowExecutionResult.getFailureMessages().get(s);
failures.put(s, strings);
}
if(null!=workflowExecutionResult.getException()) {
final ArrayList<String> strings = new ArrayList<String>();
if(null!=failures.get(nodename)) {
strings.addAll(failures.get(nodename));
}
strings.add(workflowExecutionResult.getException().getMessage());
failures.put(nodename, strings);
}
}
//conver failures

nodesuccess = dispatch.isSuccess();

Expand All @@ -136,34 +143,4 @@ public static WorkflowExecutionItem createInnerLoopItem(WorkflowExecutionItem it
return workflowExecutionItem;
}

/**
* Create Callables to execute the workflow on a single node
* @param node
* @return
*/
/* public Callable createCallable(final INodeEntry node) {
//create temporary nodeset for the single node
final NodeSet tempNodeset = new NodeSet();
tempNodeset.setSingleNodeName(node.getNodename());
final IWorkflow workflow = item.getWorkflow();
final List<IWorkflowCmdItem> iWorkflowCmdItems = workflow.getCommands();
return new Callable() {
public Object call() throws Exception {
final List<String> localList = new ArrayList<String>();
if (!executeWorkflowItemsForNodeSet(workflow,localList, resultList, iWorkflowCmdItems, tempNodeset)) {
if(1==localList.size()) {
failedList.add(localList.get(0));
}
throw new WorkflowAction.WorkflowFailureException(
"Some steps in the workflow failed: " + localList);
}
if (1 == localList.size()) {
failedList.add(localList.get(0));
}
return resultList;
}
};
}*/

}

0 comments on commit 80e0bc6

Please sign in to comment.