示例#1
0
 public void AddEndEvent(string id)
 {
     if (!IsIdInUse(id))
     {
         EndEvent endEvent = new EndEvent
         {
             id = id
         };
         trail.process.endEvents.Add(endEvent);
         BPMNShape bPMNShape = new BPMNShape
         {
             id          = id + "_shape",
             bpmnElement = id
         };
         bPMNShape.bounds.X      = placeX + "";
         bPMNShape.bounds.Y      = placeY + "";
         bPMNShape.bounds.Width  = SEHW + "";
         bPMNShape.bounds.Height = SEHW + "";
         trail.diagram.bpmnPlane.bpmnShapes.Add(bPMNShape);
         UpdatePlacement();
     }
     else
     {
         throw new Exception("Id in use.");
     }
 }
示例#2
0
 public void AddExclusiveGateway(string id, Boolean converging)
 {
     if (!IsIdInUse(id))
     {
         ExclusiveGateway exclusiveGateway = new ExclusiveGateway
         {
             id = id,
             gatewayDirection = (converging ? "Converging" : "Diverging")
         };
         trail.process.exclusiveGateways.Add(exclusiveGateway);
         BPMNShape bPMNShape = new BPMNShape
         {
             id          = id + "_shape",
             bpmnElement = id
         };
         bPMNShape.bounds.X      = placeX + "";
         bPMNShape.bounds.Y      = placeY + "";
         bPMNShape.bounds.Width  = GHW + "";
         bPMNShape.bounds.Height = GHW + "";
         trail.diagram.bpmnPlane.bpmnShapes.Add(bPMNShape);
         UpdatePlacement();
     }
     else
     {
         throw new Exception("Id in use.");
     }
 }
示例#3
0
 public void AddTask(string id, string name)
 {
     if (!IsIdInUse(id))
     {
         Task task = new Task
         {
             id   = id,
             name = name
         };
         trail.process.tasks.Add(task);
         BPMNShape bPMNShape = new BPMNShape
         {
             id          = id + "_shape",
             bpmnElement = id
         };
         bPMNShape.bounds.X      = placeX + "";
         bPMNShape.bounds.Y      = placeY + "";
         bPMNShape.bounds.Width  = TW + "";
         bPMNShape.bounds.Height = TH + "";
         trail.diagram.bpmnPlane.bpmnShapes.Add(bPMNShape);
         UpdatePlacement();
     }
     else
     {
         throw new Exception("Id in use.");
     }
 }