if (edge != null) edge.setTarget(act); act.addIncomingSequenceEdge(edge);
/** * Sets the target. */ public void setTarget(mxICell target) { if (getBpmnElement() != null) { MSequenceEdge medge = (MSequenceEdge) getBpmnElement(); if (getTarget() != null) { ((MActivity) ((VActivity) getTarget()).getBpmnElement()).removeIncomingSequenceEdge(medge); medge.setTarget(null); } if (target != null) { MActivity mtarget = (MActivity) ((VActivity) target).getBpmnElement(); mtarget.addIncomingSequenceEdge(medge); medge.setTarget(mtarget); } } super.setTarget(target); } }
MActivity tgt = (MActivity) emap.get(attrs.get("targetRef")); edge.setSource(src); edge.setTarget(tgt);
MSequenceEdge edge = (MSequenceEdge)edges.get(edgeid); act.addIncomingSequenceEdge(edge); edge.setTarget(act);
MSequenceEdge edge = (MSequenceEdge)edges.get(edgeid); act.addIncomingSequenceEdge(edge); edge.setTarget(act);
public void run() { // To schedule a step an implicit activity is created. // In order to put the step parameter value it is necessary // to have an edge with a mapping. Otherwise the parameter // value with be deleted in process thread updateParametersBeforeStep(). 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", SJavaParser.parseExpression("step", null, 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); } });