protected internal virtual HistoryEvent createHistoryEvent(DmnDecisionEvaluationEvent evaluationEvent) { DmnDecision decisionTable = evaluationEvent.DecisionResult.Decision; if (isDeployedDecisionTable(decisionTable) && historyLevel.isHistoryEventProduced(HistoryEventTypes.DMN_DECISION_EVALUATE, decisionTable)) { //JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: org.camunda.bpm.engine.impl.context.CoreExecutionContext<? extends org.camunda.bpm.engine.impl.core.instance.CoreExecution> executionContext = org.camunda.bpm.engine.impl.context.Context.getCoreExecutionContext(); CoreExecutionContext <CoreExecution> executionContext = Context.CoreExecutionContext; if (executionContext != null) { CoreExecution coreExecution = executionContext.Execution; if (coreExecution is ExecutionEntity) { ExecutionEntity execution = (ExecutionEntity)coreExecution; return(eventProducer.createDecisionEvaluatedEvt(execution, evaluationEvent)); } else if (coreExecution is CaseExecutionEntity) { CaseExecutionEntity caseExecution = (CaseExecutionEntity)coreExecution; return(eventProducer.createDecisionEvaluatedEvt(caseExecution, evaluationEvent)); } } return(eventProducer.createDecisionEvaluatedEvt(evaluationEvent)); } else { return(null); } }
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); }
private CaseExecutionEntity prepareCaseExecution(CaseDefinitionEntity caseDefinitionEntity1) { //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 = new org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity(); CaseExecutionEntity caseExecutionEntity = new CaseExecutionEntity(); caseExecutionEntity.Id = System.Guid.randomUUID().ToString(); caseExecutionEntity.CaseDefinition = caseDefinitionEntity1; return(caseExecutionEntity); }
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); }
public virtual void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) { ActivityImpl callActivity = (ActivityImpl)migratingInstance.SourceScope; // A call activity is typically scope and since we guarantee stability of scope executions during migration, // the superExecution link does not have to be maintained during migration. // There are some exceptions, though: A multi-instance call activity is not scope and therefore // does not have a dedicated scope execution. In this case, the link to the super execution // must be maintained throughout migration if (!callActivity.Scope) { ExecutionEntity callActivityExecution = migratingInstance.resolveRepresentativeExecution(); CaseExecutionEntity calledCaseInstance = callActivityExecution.getSubCaseInstance(); migratingInstance.addMigratingDependentInstance(new MigratingCalledCaseInstance(calledCaseInstance)); } }
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); }
public virtual void testUpdateCaseDefinitionIdInCaseExecutionEntity() { // given //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity caseDefinitionEntity1 = prepareCaseDefinition(java.util.UUID.randomUUID().toString()); CaseDefinitionEntity caseDefinitionEntity1 = prepareCaseDefinition(System.Guid.randomUUID().ToString()); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity caseDefinitionEntity2 = prepareCaseDefinition(java.util.UUID.randomUUID().toString()); CaseDefinitionEntity caseDefinitionEntity2 = prepareCaseDefinition(System.Guid.randomUUID().ToString()); //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 = prepareCaseExecution(caseDefinitionEntity1); CaseExecutionEntity caseExecutionEntity = prepareCaseExecution(caseDefinitionEntity1); assertThat(caseExecutionEntity.CaseDefinitionId).isEqualTo(caseDefinitionEntity1.Id); createCaseExecution(caseExecutionEntity); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity createdCaseExecution = findCaseExecution(caseExecutionEntity.getId()); CaseExecutionEntity createdCaseExecution = findCaseExecution(caseExecutionEntity.Id); assertThat(createdCaseExecution).NotNull; createdCaseExecution.CaseDefinition = caseDefinitionEntity2; assertThat(createdCaseExecution.CaseDefinitionId).isEqualTo(caseDefinitionEntity2.Id); // when update(createdCaseExecution); // then //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity updatedCaseExecution = findCaseExecution(createdCaseExecution.getId()); CaseExecutionEntity updatedCaseExecution = findCaseExecution(createdCaseExecution.Id); assertThat(updatedCaseExecution.CaseDefinitionId).isEqualTo(caseDefinitionEntity2.Id); deleteCaseExecution(updatedCaseExecution); deleteCaseDefinition(caseDefinitionEntity1); deleteCaseDefinition(caseDefinitionEntity2); }
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); }
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); }
protected internal virtual string getCaseDefinitionTenantId(CaseExecutionEntity caseExecution) { CaseDefinitionEntity caseDefinition = (CaseDefinitionEntity)caseExecution.CaseDefinition; return(caseDefinition.TenantId); }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET: //ORIGINAL LINE: private void createCaseExecution(final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity) private void createCaseExecution(CaseExecutionEntity caseExecutionEntity) { processEngineConfiguration.CommandExecutorTxRequiresNew.execute(new CommandAnonymousInnerClass3(this, caseExecutionEntity)); }
protected internal virtual void initCaseActivityInstanceEvent(HistoricCaseActivityInstanceEventEntity evt, CaseExecutionEntity caseExecutionEntity, HistoryEventTypes eventType) { evt.Id = caseExecutionEntity.Id; evt.ParentCaseActivityInstanceId = caseExecutionEntity.ParentId; evt.EventType = eventType.EventName; evt.CaseDefinitionId = caseExecutionEntity.CaseDefinitionId; evt.CaseInstanceId = caseExecutionEntity.CaseInstanceId; evt.CaseExecutionId = caseExecutionEntity.Id; evt.CaseActivityInstanceState = caseExecutionEntity.State; evt.Required = caseExecutionEntity.Required; evt.CaseActivityId = caseExecutionEntity.ActivityId; evt.CaseActivityName = caseExecutionEntity.ActivityName; evt.CaseActivityType = caseExecutionEntity.ActivityType; evt.TenantId = caseExecutionEntity.TenantId; }
protected internal virtual HistoricCaseActivityInstanceEventEntity loadCaseActivityInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) { return(newCaseActivityInstanceEventEntity(caseExecutionEntity)); }
protected internal virtual void initCaseInstanceEvent(HistoricCaseInstanceEventEntity evt, CaseExecutionEntity caseExecutionEntity, HistoryEventTypes eventType) { evt.Id = caseExecutionEntity.CaseInstanceId; evt.EventType = eventType.EventName; evt.CaseDefinitionId = caseExecutionEntity.CaseDefinitionId; evt.CaseInstanceId = caseExecutionEntity.CaseInstanceId; evt.CaseExecutionId = caseExecutionEntity.Id; evt.BusinessKey = caseExecutionEntity.BusinessKey; evt.State = caseExecutionEntity.State; evt.TenantId = caseExecutionEntity.TenantId; }
protected internal virtual HistoricCaseInstanceEventEntity newCaseInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) { return(new HistoricCaseInstanceEventEntity()); }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET: //ORIGINAL LINE: private Void deleteCaseExecution(final org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity caseExecutionEntity) private Void deleteCaseExecution(CaseExecutionEntity caseExecutionEntity) { return(processEngineConfiguration.CommandExecutorTxRequiresNew.execute(new CommandAnonymousInnerClass2(this, caseExecutionEntity))); }
public MigratingCalledCaseInstance(CaseExecutionEntity caseInstance) { this.caseInstance = caseInstance; }
public CaseExecutionEntityReferencer(CaseExecutionEntity caeExecution) { this.caseExecution = caeExecution; }
public CommandAnonymousInnerClass3(CaseDefinitionIdUpdateTest outerInstance, CaseExecutionEntity caseExecutionEntity) { this.outerInstance = outerInstance; this.caseExecutionEntity = caseExecutionEntity; }