public override BaseElement Clone() { CancelEventDefinition clone = new CancelEventDefinition { Values = this }; return(clone); }
protected internal virtual void WriteCancelDefinition(Event parentEvent, CancelEventDefinition cancelEventDefinition, XMLStreamWriter xtw) { xtw.WriteStartElement(BpmnXMLConstants.BPMN_PREFIX, BpmnXMLConstants.ELEMENT_EVENT_CANCELDEFINITION, BpmnXMLConstants.BPMN2_NAMESPACE); bool didWriteExtensionStartElement = BpmnXMLUtil.WriteExtensionElements(cancelEventDefinition, false, xtw); if (didWriteExtensionStartElement) { xtw.WriteEndElement(); } xtw.WriteEndElement(); }
public override void ParseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) { if (!(parentElement is Event)) { return; } CancelEventDefinition eventDefinition = new CancelEventDefinition(); BpmnXMLUtil.AddXMLLocation(eventDefinition, xtr); ((Event)parentElement).EventDefinitions.Add(eventDefinition); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void getEventDefinition() public virtual void getEventDefinition() { CancelEventDefinition eventDefinition = eventDefinitionQuery.filterByType(typeof(CancelEventDefinition)).singleResult(); assertThat(eventDefinition).NotNull; }
public virtual BoundaryCancelEventActivityBehavior CreateBoundaryCancelEventActivityBehavior(CancelEventDefinition cancelEventDefinition) { return(new BoundaryCancelEventActivityBehavior()); }
public override object Create(object parent, IParseContext context, XElement element) { EventDefinition eventDefinition = null; var localName = Helper.GetRealLocalName(element); switch (localName) { case "cancelEventDefinition": eventDefinition = new CancelEventDefinition(); break; case "errorEventDefinition": var errorEventDefinition = new ErrorEventDefinition(); eventDefinition = errorEventDefinition; var errorRef = element.GetAttribute("errorRef"); if (errorRef != null) { context.AddReferenceRequest <Error>(errorRef, x => errorEventDefinition.ErrorRef = x); } break; case "timerEventDefinition": eventDefinition = new TimerEventDefinition(); break; case "terminateEventDefinition": eventDefinition = new TerminateEventDefinition(); break; case "messageEventDefinition": var messageEventDefinition = new MessageEventDefinition(); eventDefinition = messageEventDefinition; var operationRef = element.GetAttribute("operationRef"); if (operationRef != null) { context.AddReferenceRequest <Operation>(operationRef, x => messageEventDefinition.OperationRef = x); } var messageRef = element.GetAttribute("messageRef"); if (messageRef != null) { context.AddReferenceRequest <Message>(messageRef, x => messageEventDefinition.MessageRef = x); } break; case "conditionalEventDefinition": eventDefinition = new ConditionalEventDefinition(); break; case "compensateEventDefinition": var compensateEventDefinition = new CompensateEventDefinition(); eventDefinition = compensateEventDefinition; compensateEventDefinition.WaitForCompletion = element.GetBoolean("waitForCompletion"); var activityRef = element.GetAttribute("activityRef"); if (activityRef != null) { context.AddReferenceRequest <Activity>(activityRef, x => compensateEventDefinition.ActivityRef = x); } break; case "signalEventDefinition": var signalEventDefinition = new SignalEventDefinition(); eventDefinition = signalEventDefinition; var signalRef = element.GetAttribute("signalRef"); if (signalRef != null) { context.AddReferenceRequest <Signal>(signalRef, x => signalEventDefinition.SignalRef = x); } break; case "escalationEventDefinition": eventDefinition = new EscalationEventDefinition() { EscalationRef = element.GetAttribute("escalationRef") }; break; case "linkEventDefinition": eventDefinition = new LinkEventDefinition() { Name = element.GetAttribute("name"), Target = element.GetAttribute("target") }; break; } if (this.callback != null) { this.callback(parent, context, element, eventDefinition); } base.Init(eventDefinition, context, element); context.Push(eventDefinition); return(eventDefinition); }