public ProcessInstanceBuilder AddSequenceFlow(string id, string name, string sourceRef, string targetRef, string conditionExpression = null) { SequenceFlows.Add(new SequenceFlow { ConditionExpression = conditionExpression, SourceRef = sourceRef, TargetRef = targetRef, Id = id, Name = name }); return(this); }
public XElement ToXElement() { return(new XElement("Process", new XAttribute("Id", Id), new XElement("Name", Name), new XElement("IsExecutable", IsExecutable), new XElement("ParticipantId", ParticipantId), new XElement("CustomScript", CustomScript), new XElement("SequenceFlows", SequenceFlows.Select(s => s.Value.ToXElement()).ToList()), new XElement("ProcessElements", ProcessElements.Select(e => e.Value.ToXElement()).ToList()) )); }
public override object Clone() { return(new ProcessInstanceAggregate { AggregateId = AggregateId, ProcessFileId = ProcessFileId, ProcessFileName = ProcessFileName, Version = Version, CreateDateTime = CreateDateTime, UpdateDateTime = UpdateDateTime, Status = Status, SequenceFlows = SequenceFlows.Select(_ => (SequenceFlow)_.Clone()).ToList(), SerializedElementDefs = SerializedElementDefs.Select(_ => (SerializedFlowNodeDefinition)_.Clone()).ToList(), ElementInstances = ElementInstances.Select(_ => (FlowNodeInstance)_.Clone()).ToList(), ExecutionPathLst = ExecutionPathLst.Select(_ => (ExecutionPath)_.Clone()).ToList(), ItemDefs = ItemDefs.Select(_ => (ItemDefinition)_.Clone()).ToList(), Messages = Messages.Select(_ => (Message)_.Clone()).ToList(), Interfaces = Interfaces.Select(_ => (BPMNInterface)_.Clone()).ToList(), StateTransitions = StateTransitions.Select(_ => (StateTransitionToken)_.Clone()).ToList() }); }
public override object Clone() { return(new ProcessInstanceAggregate { AggregateId = AggregateId, ProcessFileId = ProcessFileId, ProcessFileName = ProcessFileName, Version = Version, CreateDateTime = CreateDateTime, UpdateDateTime = UpdateDateTime, Status = Status, SequenceFlows = new ConcurrentBag <SequenceFlow>(SequenceFlows.Select(_ => (SequenceFlow)_.Clone())), ElementDefs = new ConcurrentBag <BaseFlowNode>(ElementDefs.Select(_ => (BaseFlowNode)_.Clone())), ElementInstances = new ConcurrentBag <FlowNodeInstance>(ElementInstances.Select(_ => (FlowNodeInstance)_.Clone())), ExecutionPathLst = new ConcurrentBag <ExecutionPath>(ExecutionPathLst.Select(_ => (ExecutionPath)_.Clone())), ItemDefs = new ConcurrentBag <ItemDefinition>(ItemDefs.Select(_ => (ItemDefinition)_.Clone())), Messages = new ConcurrentBag <Message>(Messages.Select(_ => (Message)_.Clone())), Interfaces = new ConcurrentBag <BPMNInterface>(Interfaces.Select(_ => (BPMNInterface)_.Clone())), StateTransitions = new ConcurrentBag <StateTransitionNotification>(StateTransitions.Select(_ => (StateTransitionNotification)_.Clone())) }); }
public ICollection <SequenceFlow> GetOutgoingSequenceFlows(string elementId) { return(SequenceFlows.Where(_ => _.SourceRef == elementId).ToList()); }
public ICollection <SequenceFlow> GetIncomingSequenceFlows(string elementId) { return(SequenceFlows.Where(_ => _.TargetRef == elementId).ToList()); }