public virtual ConditionalEventDefinitionBuilder conditionalEventDefinition(string id) { ConditionalEventDefinition eventDefinition = createInstance(typeof(ConditionalEventDefinition)); if (!string.ReferenceEquals(id, null)) { eventDefinition.Id = id; } element.EventDefinitions.add(eventDefinition); return(new ConditionalEventDefinitionBuilder(modelInstance, 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() { ConditionalEventDefinition eventDefinition = eventDefinitionQuery.filterByType(typeof(ConditionalEventDefinition)).singleResult(); assertThat(eventDefinition).NotNull; assertThat(eventDefinition.CamundaVariableEvents).Null; assertThat(eventDefinition.CamundaVariableName).Null; Expression condition = eventDefinition.Condition; assertThat(condition).NotNull; assertThat(condition.TextContent).isEqualTo("${test}"); }
protected internal virtual IList <ActivityImpl> findConditionalStartEventActivities(ProcessDefinitionEntity processDefinition) { IList <ActivityImpl> activities = new List <ActivityImpl>(); foreach (EventSubscriptionDeclaration declaration in ConditionalEventDefinition.getDeclarationsForScope(processDefinition).Values) { if (isConditionStartEvent(declaration)) { activities.Add(((ConditionalEventDefinition)declaration).ConditionalActivity); } } return(activities); }
protected internal virtual bool evaluateCondition(ConditionSet conditionSet, ActivityImpl activity) { ExecutionEntity temporaryExecution = new ExecutionEntity(); if (conditionSet.Variables != null) { temporaryExecution.initializeVariableStore(conditionSet.Variables); } temporaryExecution.setProcessDefinition(activity.ProcessDefinition); ConditionalEventDefinition conditionalEventDefinition = activity.Properties.get(BpmnProperties.CONDITIONAL_EVENT_DEFINITION); if (string.ReferenceEquals(conditionalEventDefinition.VariableName, null) || conditionSet.Variables.containsKey(conditionalEventDefinition.VariableName)) { return(conditionalEventDefinition.tryEvaluate(temporaryExecution)); } else { return(false); } }
public EventSubProcessStartConditionalEventActivityBehavior(ConditionalEventDefinition conditionalEvent) { this.ConditionalEvent = conditionalEvent; }
public BoundaryConditionalEventActivityBehavior(ConditionalEventDefinition conditionalEvent) { this.ConditionalEvent = conditionalEvent; }
public AbstractConditionalEventDefinitionBuilder(BpmnModelInstance modelInstance, ConditionalEventDefinition element, Type selfType) : base(modelInstance, element, selfType) { }
public IntermediateConditionalEventBehavior(ConditionalEventDefinition conditionalEvent, bool isAfterEventBasedGateway) : base(isAfterEventBasedGateway) { this.ConditionalEvent = conditionalEvent; }
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); }