/** * Get an activity per id. */ public MActivity getActivity(String id) { MActivity ret = null; if(activities!=null) { for(MActivity act: activities) { if(act.getId().equals(id)) { ret = act; break; } } } return ret; }
/** * Get an activity per id. */ public MActivity getActivity(String id) { MActivity ret = null; if(activities!=null) { for(MActivity act: activities) { if(act.getId().equals(id)) { ret = act; break; } } } return ret; }
/** * Get an activity per id. */ public MActivity getActivity(String id) { MActivity ret = null; if(activities!=null) { for(MActivity act: activities) { if(act.getId().equals(id)) { ret = act; break; } } } return ret; }
/** * Get a string to identify this activity in a tool such as the debugger. * @return A unique but nicely readable name. */ public String getBreakpointId() { String name = getName(); if(name==null) name = getActivityType()+"("+getId()+")"; return name; }
/** * Processes the element. */ public Object postProcess(IContext context, Object object) { object = super.postProcess(context, object); BpmnReadContext rc = (BpmnReadContext) context.getUserContext(); MActivity act = (MActivity) object; MLane lane = rc.getLaneMap().get(act.getId()); if (lane != null) { lane.addActivity(act); object = IPostProcessor.DISCARD_OBJECT; } else { System.out.println("Not found: " + act.getId()); } return object; } }
allactivities.put(mact.getId(), acts.get(j)); if(mact instanceof MSubProcess)
public Object getValueAt(int row, int column) { Object ret = null; if(column==1) { MActivity act = (MActivity)activities.get(row); ret = act.getName(); if(ret!=null) { // ret = ret + " (type = " + act.getActivityType() + ", id = " + act.getId() + ")"; ret = ret + " (type = " + act.getActivityType() + ")"; } else { ret = act.getActivityType() + " (id = " + act.getId() + ")"; } } return ret; } public boolean isCellEditable(int row, int column)
public Object getValueAt(int row, int column) { Object ret = null; if(column==1) { MActivity act = (MActivity)activities.get(row); ret = act.getName(); if(ret!=null) { // ret = ret + " (type = " + act.getActivityType() + ", id = " + act.getId() + ")"; ret = ret + " (type = " + act.getActivityType() + ")"; } else { ret = act.getActivityType() + " (id = " + act.getId() + ")"; } } return ret; } public boolean isCellEditable(int row, int column)
MLane lane = lanemap.get(act.getId()); act.setLane(lane); Map<String, String> ehpm = (Map<String, String>) buffer.get("eventhandlerparentmap"); ((MActivity) emap.get(ehpm.get(act.getId()))).addEventHandler(act); sps.peek().addActivity(act); Map<String, MSubProcess> spem = (Map<String, MSubProcess>) buffer.get("subprocesselementmap"); spem.put(act.getId(), sps.peek()); emap.put(act.getId(), act);
/** * Writes the messaging edges of the semantics sections. * * @param out The output. * @param seqedges The messaging edges. */ protected static final void writeMessagingEdgeSemantics(PrintStream out, List<MMessagingEdge> medges, int baseind) { for (MMessagingEdge edge : medges) { out.print(getIndent(baseind) + "<semantic:messageFlow "); if (edge.getName() != null && edge.getName().length() > 0) { out.print("name=\""); out.print(escapeString(edge.getName())); out.print("\" "); } out.print("sourceRef=\""); out.print(escapeString(edge.getSource().getId())); out.print("\" targetRef=\""); out.print(escapeString(edge.getTarget().getId())); out.print("\" id=\""); out.print(escapeString(edge.getId())); out.println("\">"); out.println(getIndent(baseind) + "</semantic:messageFlow>"); } }
out.print(escapeString(activity.getId())); out.println("</semantic:flowNodeRef>");
Map<String, Tuple3<Integer, mxICell, mxICell>> elements, mxICell vparent, int depth) Tuple3<Integer, mxICell, mxICell> tup = elements.get(mactivity.getId()); if(tup!=null) elements.put(mactivity.getId(), new Tuple3<Integer, mxICell, mxICell>(Integer.valueOf(depth), tup.getSecondEntity(), vparent)); new VExternalSubProcess(graph): new VSubProcess(graph): new VActivity(graph); vactivity.setBpmnElement(mactivity); elements.put(mactivity.getId(), new Tuple3<Integer, mxICell, mxICell>(Integer.valueOf(depth), vactivity, vparent)); genActivity(graph, activity, sseqedges, elements, elements.get(mactivity.getId()).getSecondEntity(), depth+1); genActivity(graph, evthandler, sseqedges, elements, elements.get(mactivity.getId()).getSecondEntity(), depth+1);
out.print(escapeString(dedge.getId())); out.print("\" sourceRef=\""); out.print(escapeString(dedge.getSource().getId())); out.print("\" sourceParam=\""); out.print(escapeString(dedge.getSourceParameter())); out.print("\" targetRef=\""); out.print(escapeString(dedge.getTarget().getId())); out.print("\" targetParam=\""); out.print(escapeString(dedge.getTargetParameter()));
/** * Find the velement of the graph that fits to the bpmn id. * @param cell The start cell. * @param brpid The activity id. * @return The element. */ protected VElement getVElement(mxICell cell, String brpid) { VElement ret = null; if(cell instanceof VElement) { VElement ve = (VElement)cell; // if(ve.getBpmnElement() instanceof MActivity && ((MActivity)ve.getBpmnElement()).getBreakpointId().equals(brpid)) if(ve.getBpmnElement() instanceof MActivity && ((MActivity)ve.getBpmnElement()).getId().equals(brpid)) { ret = ve; } } if(ret==null) { for(int i=0; i<cell.getChildCount() && ret==null; i++) { ret = getVElement(cell.getChildAt(i), brpid); } } return ret; }
if(trigger.getSecondEntity().endsWith(mact.getId()))