Esempio n. 1
0
        protected internal static void makeCancelEvent(BpmnModelInstance model, string eventId)
        {
            ModelElementInstance element = model.getModelElementById(eventId);

            CancelEventDefinition eventDefinition = model.newInstance(typeof(CancelEventDefinition));

            element.addChildElement(eventDefinition);
        }
Esempio n. 2
0
        public static void addUserTaskCompensationHandler(BpmnModelInstance modelInstance, string boundaryEventId, string compensationHandlerId)
        {
            BoundaryEvent boundaryEvent = modelInstance.getModelElementById(boundaryEventId);
            BaseElement   scope         = (BaseElement)boundaryEvent.ParentElement;

            UserTask compensationHandler = modelInstance.newInstance(typeof(UserTask));

            compensationHandler.Id = compensationHandlerId;
            compensationHandler.ForCompensation = true;
            scope.addChildElement(compensationHandler);

            Association association = modelInstance.newInstance(typeof(Association));

            association.AssociationDirection = AssociationDirection.One;
            association.Source = boundaryEvent;
            association.Target = compensationHandler;
            scope.addChildElement(association);
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testSetLocalScopeWithExecutionListenerTake()
        public virtual void testSetLocalScopeWithExecutionListenerTake()
        {
            BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("process").startEvent().id("activityId").sequenceFlowId("sequenceFlow").endEvent().done();

            CamundaExecutionListener listener = modelInstance.newInstance(typeof(CamundaExecutionListener));

            listener.CamundaEvent = ExecutionListener.EVENTNAME_TAKE;
//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            listener.CamundaClass = typeof(ExecutionListener).FullName;
            modelInstance.getModelElementById <SequenceFlow>("sequenceFlow").builder().addExtensionElement(listener);

            testHelper.deploy(modelInstance);
            engineRule.RuntimeService.startProcessInstanceByKey("process");
        }