public void run()
{
MActivity act = new MActivity();
act.setName("External Step Activity: "+(cnt++));
act.setClazz(new ClassInfo(ExecuteStepTask.class));
act.addParameter(new MParameter(MParameter.DIRECTION_IN, new ClassInfo(Object[].class), "step", null));
act.setActivityType(MBpmnModel.TASK);
MSequenceEdge edge = new MSequenceEdge();
edge.setTarget(act);
UnparsedExpression exp = new UnparsedExpression(null, (Class<?>) null, "step", null);
SJavaParser.parseExpression(exp, null, null);
edge.addParameterMapping("step", exp, null);
act.addIncomingSequenceEdge(edge);
MPool pl = pool!=null? bpmnmodel.getPool(pool): (MPool)bpmnmodel.getPools().get(0);
act.setPool(pl);
ProcessThread thread = new ProcessThread(""+idcnt++, act, context, BpmnInterpreter.this);
thread.setLastEdge(edge);
thread.setParameterValue("step", new Object[]{step, ret});
context.addExternalThread(thread);
}
});