public virtual void TestExecutionTasksMi() { runtimeService.StartProcessInstanceByKey("testProcess"); var processInstance = (ExecutionEntity)runtimeService.CreateProcessInstanceQuery().First(); Assert.AreEqual(0, processInstance.CachedEntityStateRaw); var executions = runtimeService.CreateExecutionQuery(c => c.ActivityId == "userTask").ToList(); foreach (var execution in executions) { var cachedEntityStateRaw = ((ExecutionEntity)execution).CachedEntityStateRaw; if (!((ExecutionEntity)execution).IsScope) { Assert.AreEqual( BitMaskUtil.GetMaskForBit(ExecutionEntity.TasksStateBit) | BitMaskUtil.GetMaskForBit(ExecutionEntity.VariablesStateBit), cachedEntityStateRaw); } else { Assert.AreEqual(BitMaskUtil.GetMaskForBit(ExecutionEntity.VariablesStateBit), cachedEntityStateRaw); } } }
public virtual void TestProcessInstanceEventSubscriptions() { runtimeService.StartProcessInstanceByKey("testProcess"); var processInstance = (ExecutionEntity)runtimeService.CreateProcessInstanceQuery().First(); Assert.AreEqual(BitMaskUtil.GetMaskForBit(ExecutionEntity.EventSubscriptionsStateBit), processInstance.CachedEntityStateRaw); }
public virtual void TestExecutionExternalTask() { runtimeService.StartProcessInstanceByKey("oneExternalTaskProcess"); var execution = (ExecutionEntity)runtimeService.CreateExecutionQuery(c => c.ActivityId == "externalTask").First(); Assert.AreEqual(BitMaskUtil.GetMaskForBit(ExecutionEntity.ExternalTasksBit), execution.CachedEntityStateRaw); }
public virtual void TestExecutionTasksParallel() { runtimeService.StartProcessInstanceByKey("testProcess"); var processInstance = (ExecutionEntity)runtimeService.CreateProcessInstanceQuery().First(); Assert.AreEqual(0, processInstance.CachedEntityStateRaw); var execution = (ExecutionEntity)runtimeService.CreateExecutionQuery(c => c.ActivityId == "userTask").First(); Assert.AreEqual(BitMaskUtil.GetMaskForBit(ExecutionEntity.TasksStateBit), execution.CachedEntityStateRaw); }
public virtual void TestExecutionEventSubscriptionsScope() { runtimeService.StartProcessInstanceByKey("testProcess"); var processInstance = (ExecutionEntity)runtimeService.CreateProcessInstanceQuery().First(); Assert.AreEqual(0, processInstance.CachedEntityStateRaw); var execution = (ExecutionEntity) runtimeService.CreateExecutionQuery(c => c.ActivityId == "IntermediateCatchEvent_1").First(); Assert.AreEqual(BitMaskUtil.GetMaskForBit(ExecutionEntity.EventSubscriptionsStateBit), execution.CachedEntityStateRaw); }
public virtual void TestExecutionIncidentParallel() { runtimeService.StartProcessInstanceByKey("testProcess"); var processInstance = (ExecutionEntity)runtimeService.CreateProcessInstanceQuery().First(); Assert.AreEqual(0, processInstance.CachedEntityStateRaw); var execution = (ExecutionEntity)runtimeService.CreateExecutionQuery(c => c.ActivityId == "task").First(); Assert.AreEqual(0, execution.CachedEntityStateRaw); processEngineConfiguration.CommandExecutorTxRequired.Execute(new CommandAnonymousInnerClass2(this, execution)); var execution2 = (ExecutionEntity)runtimeService.CreateExecutionQuery(c => c.ActivityId == "task").First(); Assert.AreEqual(BitMaskUtil.GetMaskForBit(ExecutionEntity.IncidentStateBit), execution2.CachedEntityStateRaw); }