Collection internalEvents = step.getAfterStatus().getEvents();
for (Iterator iter = step.getAfterStatus().getStates().iterator();
iter.hasNext();) {
State s = (State) iter.next();
Context ctx = scInstance.getContext(s);
Invoke i = s.getInvoke();
if (i != null && scInstance.getInvoker(s) == null) {
String src = i.getSrc();
if (src == null) {
String srcexpr = i.getSrcexpr();
Object srcObj = null;
try {
ctx.setLocal(NAMESPACES_KEY, i.getNamespaces());
srcObj = eval.eval(ctx, srcexpr);
ctx.setLocal(NAMESPACES_KEY, null);
src = String.valueOf(srcObj);
} catch (SCXMLExpressionException see) {
errRep.onError(ErrorConstants.EXPRESSION_ERROR,
see.getMessage(), i);
}
}
String source = src;
PathResolver pr = i.getPathResolver();
if (pr != null) {
source = i.getPathResolver().resolvePath(src);
}
String ttype = i.getTargettype();
Invoker inv = null;
try {
inv = scInstance.newInvoker(ttype);
} catch (InvokerException ie) {
TriggerEvent te = new TriggerEvent(s.getId()
+ ".invoke.failed", TriggerEvent.ERROR_EVENT);
internalEvents.add(te);
continue;
}
inv.setParentStateId(s.getId());
inv.setSCInstance(scInstance);
List params = i.params();
Map args = new HashMap();
for (Iterator pIter = params.iterator(); pIter.hasNext();) {
Param p = (Param) pIter.next();
String argExpr = p.getExpr();
Object argValue = null;