Search in sources :

Example 1 with ExecutionEntityImpl

use of org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl in project Activiti by Activiti.

the class APIProcessInstanceConverterTest method anInternalProcessInstance.

private ExecutionEntity anInternalProcessInstance(Integer appVersion) {
    ExecutionEntity internalProcessInstance = new ExecutionEntityImpl();
    internalProcessInstance.setId(PROCESS_INSTANCE_ID);
    internalProcessInstance.setParentProcessInstanceId(PARENT_PROCESS_INSTANCE_ID);
    internalProcessInstance.setProcessDefinitionId(PROCESS_DEFINITION_ID);
    internalProcessInstance.setProcessDefinitionKey(PROCESS_DEFINITION_KEY);
    internalProcessInstance.setProcessDefinitionVersion(PROCESS_DEFINITION_VERSION);
    internalProcessInstance.setBusinessKey(BUSINESS_KEY);
    internalProcessInstance.setName(NAME);
    internalProcessInstance.setDescription(DESCRIPTION);
    internalProcessInstance.setStartUserId(START_USER_ID);
    internalProcessInstance.setStartTime(START_TIME);
    internalProcessInstance.setActive(true);
    internalProcessInstance.setAppVersion(appVersion);
    return internalProcessInstance;
}
Also used : ExecutionEntity(org.activiti.engine.impl.persistence.entity.ExecutionEntity) ExecutionEntityImpl(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl)

Example 2 with ExecutionEntityImpl

use of org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl in project Activiti by Activiti.

the class ExecutionElResolverTest method canResolve_should_returnTrueWhenItsExecutionEntityAndPropertyIsExecution.

@Test
public void canResolve_should_returnTrueWhenItsExecutionEntityAndPropertyIsExecution() {
    // when
    boolean canResolve = resolver.canResolve(EXECUTION_KEY, new ExecutionEntityImpl());
    // then
    assertThat(canResolve).isTrue();
}
Also used : ExecutionEntityImpl(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl) Test(org.junit.Test)

Example 3 with ExecutionEntityImpl

use of org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl in project Activiti by Activiti.

the class ExecutionElResolverTest method resolve_should_returnVariableScopeWhenItsExecutionEntity.

@Test
public void resolve_should_returnVariableScopeWhenItsExecutionEntity() {
    // given
    ExecutionEntity variableScope = new ExecutionEntityImpl();
    // when
    Object result = resolver.resolve(EXECUTION_KEY, variableScope);
    // then
    assertThat(result).isEqualTo(variableScope);
}
Also used : ExecutionEntity(org.activiti.engine.impl.persistence.entity.ExecutionEntity) ExecutionEntityImpl(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl) Test(org.junit.Test)

Example 4 with ExecutionEntityImpl

use of org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl in project Activiti by Activiti.

the class ProcessInitiatorELResolverTest method canResolve_should_returnTrueWhenItsExecutionEntityAndPropertyIsInitiator.

@Test
public void canResolve_should_returnTrueWhenItsExecutionEntityAndPropertyIsInitiator() {
    // when
    boolean canResolve = resolver.canResolve(INITIATOR, new ExecutionEntityImpl());
    // then
    assertThat(canResolve).isTrue();
}
Also used : ExecutionEntityImpl(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl) Test(org.junit.Test)

Example 5 with ExecutionEntityImpl

use of org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl in project Activiti by Activiti.

the class ExecutionElResolverTest method canResolve_should_returnFalseWhenItsExecutionEntityAndPropertyIsNotExecution.

@Test
public void canResolve_should_returnFalseWhenItsExecutionEntityAndPropertyIsNotExecution() {
    // when
    boolean canResolve = resolver.canResolve("anyOtherProperty", new ExecutionEntityImpl());
    // then
    assertThat(canResolve).isFalse();
}
Also used : ExecutionEntityImpl(org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl) Test(org.junit.Test)

Aggregations

ExecutionEntityImpl (org.activiti.engine.impl.persistence.entity.ExecutionEntityImpl)9 Test (org.junit.Test)6 ExecutionEntity (org.activiti.engine.impl.persistence.entity.ExecutionEntity)2 ProcessInstance (org.activiti.api.process.model.ProcessInstance)1 StartProcessPayload (org.activiti.api.process.model.payloads.StartProcessPayload)1 ProcessInstanceImpl (org.activiti.api.runtime.model.impl.ProcessInstanceImpl)1 ActivitiEntityEventImpl (org.activiti.engine.delegate.event.impl.ActivitiEntityEventImpl)1 TaskEntityImpl (org.activiti.engine.impl.persistence.entity.TaskEntityImpl)1 ProcessInstanceQuery (org.activiti.engine.runtime.ProcessInstanceQuery)1 Task (org.activiti.engine.task.Task)1 Test (org.junit.jupiter.api.Test)1