Example #1
0
        public virtual HistoryEvent createCaseActivityInstanceUpdateEvt(DelegateCaseExecution caseExecution)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity = (org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity) caseExecution;
            CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity)caseExecution;

            // create event instance
            HistoricCaseActivityInstanceEventEntity evt = loadCaseActivityInstanceEventEntity(caseExecutionEntity);

            // initialize event
            initCaseActivityInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_ACTIVITY_INSTANCE_UPDATE);

            if (caseExecutionEntity.Task != null)
            {
                evt.TaskId = caseExecutionEntity.Task.Id;
            }

            if (caseExecutionEntity.getSubProcessInstance() != null)
            {
                evt.CalledProcessInstanceId = caseExecutionEntity.getSubProcessInstance().Id;
            }

            if (caseExecutionEntity.getSubCaseInstance() != null)
            {
                evt.CalledCaseInstanceId = caseExecutionEntity.getSubCaseInstance().Id;
            }

            return(evt);
        }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            HistoryEvent historyEvent = createHistoryEvent(caseExecution);

            if (historyEvent != null)
            {
                Context.ProcessEngineConfiguration.HistoryEventHandler.handleEvent(historyEvent);
            }
        }
Example #3
0
 protected internal override HistoryEvent createHistoryEvent(DelegateCaseExecution caseExecution)
 {
     if (historyLevel.isHistoryEventProduced(HistoryEventTypes.CASE_ACTIVITY_INSTANCE_END, caseExecution))
     {
         return(eventProducer.createCaseActivityInstanceEndEvt(caseExecution));
     }
     else
     {
         return(null);
     }
 }
Example #4
0
 protected internal override HistoryEvent createHistoryEvent(DelegateCaseExecution caseExecution)
 {
     if (historyLevel.isHistoryEventProduced(HistoryEventTypes.CASE_INSTANCE_CREATE, caseExecution))
     {
         return(eventProducer.createCaseInstanceCreateEvt(caseExecution));
     }
     else
     {
         return(null);
     }
 }
Example #5
0
        public virtual HistoryEvent createCaseInstanceUpdateEvt(DelegateCaseExecution caseExecution)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity = (org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity) caseExecution;
            CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity)caseExecution;

            // create event instance
            HistoricCaseInstanceEventEntity evt = loadCaseInstanceEventEntity(caseExecutionEntity);

            // initialize event
            initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_UPDATE);

            return(evt);
        }
Example #6
0
        public virtual HistoryEvent createCaseActivityInstanceCreateEvt(DelegateCaseExecution caseExecution)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity = (org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity) caseExecution;
            CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity)caseExecution;

            // create event instance
            HistoricCaseActivityInstanceEventEntity evt = newCaseActivityInstanceEventEntity(caseExecutionEntity);

            // initialize event
            initCaseActivityInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_ACTIVITY_INSTANCE_CREATE);

            // set start time
            evt.CreateTime = ClockUtil.CurrentTime;

            return(evt);
        }
Example #7
0
        public virtual HistoryEvent createCaseInstanceCloseEvt(DelegateCaseExecution caseExecution)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity = (org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity) caseExecution;
            CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity)caseExecution;

            // create event instance
            HistoricCaseInstanceEventEntity evt = loadCaseInstanceEventEntity(caseExecutionEntity);

            // initialize event
            initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_CLOSE);

            // set end time
            evt.EndTime = ClockUtil.CurrentTime;

            if (evt.StartTime != null)
            {
                evt.DurationInMillis = evt.EndTime.Ticks - evt.StartTime.Ticks;
            }

            return(evt);
        }
Example #8
0
        public virtual HistoryEvent createCaseInstanceCreateEvt(DelegateCaseExecution caseExecution)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity = (org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity) caseExecution;
            CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity)caseExecution;

            // create event instance
            HistoricCaseInstanceEventEntity evt = newCaseInstanceEventEntity(caseExecutionEntity);

            // initialize event
            initCaseInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_INSTANCE_CREATE);

            // set create time
            evt.CreateTime = ClockUtil.CurrentTime;

            // set create user id
            evt.CreateUserId = Context.CommandContext.AuthenticatedUserId;

            // set super case instance id
            CmmnExecution superCaseExecution = caseExecutionEntity.SuperCaseExecution;

            if (superCaseExecution != null)
            {
                evt.SuperCaseInstanceId = superCaseExecution.CaseInstanceId;
            }

            // set super process instance id
            ExecutionEntity superExecution = caseExecutionEntity.getSuperExecution();

            if (superExecution != null)
            {
                evt.SuperProcessInstanceId = superExecution.ProcessInstanceId;
            }

            return(evt);
        }
Example #9
0
 public TenantIdProviderProcessInstanceContext(ProcessDefinition processDefinition, VariableMap variables, DelegateCaseExecution superCaseExecution) : this(processDefinition, variables)
 {
     this.superCaseExecution = superCaseExecution;
 }
Example #10
0
 public TenantIdProviderHistoricDecisionInstanceContext(DecisionDefinition decisionDefinition, DelegateCaseExecution caseExecution) : this(decisionDefinition)
 {
     this.caseExecution = caseExecution;
 }
Example #11
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            caseExecution.setVariable("businessKey", caseExecution.BusinessKey);
            caseExecution.setVariable("caseBusinessKey", caseExecution.CaseBusinessKey);
        }
Example #12
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            caseExecution.setVariable("listener", "listener-notified");
        }
Example #13
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution execution) throws Exception
        public virtual void notify(DelegateCaseExecution execution)
        {
            decisionResult = (DmnDecisionResult)execution.getVariable(DecisionEvaluationUtil.DECISION_RESULT_VARIABLE);
        }
Example #14
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            Context.ProcessEngineConfiguration.MetricsRegistry.markOccurrence(Metrics.ACTIVTY_INSTANCE_START);
        }
Example #15
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            ScriptInvocation invocation = new ScriptInvocation(script, caseExecution);

            Context.ProcessEngineConfiguration.DelegateInterceptor.handleInvocation(invocation);
        }
Example #16
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            caseExecution.setVariable("var", "test");
        }
Example #17
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            string eventName = caseExecution.EventName;

            caseExecution.setVariable(eventName, true);
        }
Example #18
0
 public CaseExecutionListenerInvocation(CaseExecutionListener listenerInstance, DelegateCaseExecution caseExecution) : base(caseExecution, null)
 {
     this.listenerInstance = listenerInstance;
     this.caseExecution    = caseExecution;
 }
Example #19
0
 protected internal abstract HistoryEvent createHistoryEvent(DelegateCaseExecution caseExecution);
Example #20
0
 public TenantIdProviderCaseInstanceContext(CaseDefinition caseDefinition, VariableMap variables, DelegateCaseExecution superCaseExecution) : this(caseDefinition, variables)
 {
     this.superCaseExecution = superCaseExecution;
 }
Example #21
0
        public virtual string getNewValue(DelegateCaseExecution caseExecution)
        {
            object variableValue = caseService.getVariable(caseExecution.Id, "var");

            return(variableValue.ToString() + variableValue.ToString());
        }
Example #22
0
 public void doAssert(DelegateCaseExecution execution)
 {
     assertThat(execution.TenantId, @is(expectedTenantId));
 }
Example #23
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void notify(org.camunda.bpm.engine.delegate.DelegateCaseExecution caseExecution) throws Exception
        public virtual void notify(DelegateCaseExecution caseExecution)
        {
            // Return value of expression is ignored
            expression.getValue(caseExecution);
        }