Search in sources :

Example 1 with Page

use of org.activiti.api.runtime.shared.query.Page in project Activiti by Activiti.

the class ProcessRuntimeBPMNMessageIT method shouldTestCatchMessageExpressionWithVariableMappingExtensions.

@Test
public void shouldTestCatchMessageExpressionWithVariableMappingExtensions() {
    // when
    ProcessInstance process = processRuntime.start(ProcessPayloadBuilder.start().withBusinessKey("businessKey").withProcessDefinitionKey("testCatchMessageExpression").build());
    // then
    List<VariableInstance> variables = processRuntime.variables(ProcessPayloadBuilder.variables().withProcessInstance(process).build());
    assertThat(variables).extracting(VariableInstance::getName, VariableInstance::getValue).containsOnly(tuple("intermediate_var", ""), tuple("inter_message_var", "check2"));
    // when
    Page<Task> tasks = taskRuntime.tasks(Pageable.of(0, 2), TaskPayloadBuilder.tasks().withProcessInstanceId(process.getId()).build());
    // then
    assertThat(tasks.getContent()).hasSize(1);
    String taskId = tasks.getContent().get(0).getId();
    // when
    taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskId).withVariable("Text0739ze", "foo").build());
    // then
    variables = processRuntime.variables(ProcessPayloadBuilder.variables().withProcessInstance(process).build());
    assertThat(variables).extracting(VariableInstance::getName, VariableInstance::getValue).containsOnly(tuple("intermediate_var", "foo"), tuple("inter_message_var", "check2"));
    // when
    processRuntime.receive(MessagePayloadBuilder.receive("intermediate-catch-message-check2").withCorrelationKey("foo").build());
    // then
    tasks = taskRuntime.tasks(Pageable.of(0, 2), TaskPayloadBuilder.tasks().withProcessInstanceId(process.getId()).build());
    assertThat(tasks.getContent()).hasSize(1);
    taskId = tasks.getContent().get(0).getId();
    // then
    taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskId).build());
    // then
    assertThat(MessageTestConfiguration.messageEvents).isNotEmpty().extracting(BPMNMessageEvent::getEventType, BPMNMessageEvent::getProcessDefinitionId, BPMNMessageEvent::getProcessInstanceId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getMessagePayload().getName(), event -> event.getEntity().getMessagePayload().getCorrelationKey(), event -> event.getEntity().getMessagePayload().getBusinessKey(), event -> event.getEntity().getMessagePayload().getVariables()).contains(Tuple.tuple(BPMNMessageEvent.MessageEvents.MESSAGE_WAITING, process.getProcessDefinitionId(), process.getId(), process.getProcessDefinitionId(), process.getId(), "intermediate-catch-message-check2", "foo", process.getBusinessKey(), null), Tuple.tuple(BPMNMessageEvent.MessageEvents.MESSAGE_RECEIVED, process.getProcessDefinitionId(), process.getId(), process.getProcessDefinitionId(), process.getId(), "intermediate-catch-message-check2", "foo", process.getBusinessKey(), null));
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Pageable(org.activiti.api.runtime.shared.query.Pageable) TaskBaseRuntime(org.activiti.spring.boot.tasks.TaskBaseRuntime) ProcessRuntimeEvent(org.activiti.api.process.model.events.ProcessRuntimeEvent) Task(org.activiti.api.task.model.Task) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) SecurityUtil(org.activiti.spring.boot.security.util.SecurityUtil) Autowired(org.springframework.beans.factory.annotation.Autowired) MessagePayloadBuilder(org.activiti.api.process.model.builders.MessagePayloadBuilder) ProcessPayloadBuilder(org.activiti.api.process.model.builders.ProcessPayloadBuilder) ProcessRuntimeEventListener(org.activiti.api.process.runtime.events.listener.ProcessRuntimeEventListener) ArrayList(java.util.ArrayList) ProcessRuntime(org.activiti.api.process.runtime.ProcessRuntime) LocalEventSource(org.activiti.test.LocalEventSource) Collections.singletonMap(java.util.Collections.singletonMap) Assertions.catchThrowable(org.assertj.core.api.Assertions.catchThrowable) MessageSubscriptionEvent(org.activiti.api.process.model.events.MessageSubscriptionEvent) TaskRuntimeEvent(org.activiti.api.task.model.events.TaskRuntimeEvent) StartMessageDeploymentDefinition(org.activiti.api.process.model.StartMessageDeploymentDefinition) TaskRuntime(org.activiti.api.task.runtime.TaskRuntime) ProcessInstance(org.activiti.api.process.model.ProcessInstance) Tuple(org.assertj.core.groups.Tuple) Assertions.tuple(org.assertj.core.api.Assertions.tuple) TaskPayloadBuilder(org.activiti.api.task.model.builders.TaskPayloadBuilder) TestComponent(org.springframework.boot.test.context.TestComponent) RuntimeEvent(org.activiti.api.model.shared.event.RuntimeEvent) StartMessageDeployedEvents(org.activiti.api.runtime.event.impl.StartMessageDeployedEvents) ActivitiObjectNotFoundException(org.activiti.engine.ActivitiObjectNotFoundException) MessageTestConfiguration(org.activiti.spring.boot.MessageTestConfiguration) Import(org.springframework.context.annotation.Import) EventListener(org.springframework.context.event.EventListener) Page(org.activiti.api.runtime.shared.query.Page) MessageSubscriptionCancelledEvent(org.activiti.api.process.model.events.MessageSubscriptionCancelledEvent) Test(org.junit.jupiter.api.Test) StartMessageSubscription(org.activiti.api.process.model.StartMessageSubscription) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) ProcessCleanUpUtil(org.activiti.spring.boot.test.util.ProcessCleanUpUtil) VariableInstance(org.activiti.api.model.shared.model.VariableInstance) StartMessageDeployedEvent(org.activiti.api.process.model.events.StartMessageDeployedEvent) BPMNMessageEvent(org.activiti.api.process.model.events.BPMNMessageEvent) Task(org.activiti.api.task.model.Task) ProcessInstance(org.activiti.api.process.model.ProcessInstance) VariableInstance(org.activiti.api.model.shared.model.VariableInstance) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 2 with Page

use of org.activiti.api.runtime.shared.query.Page in project Activiti by Activiti.

the class UserTaskCandidateGroupAndAssigneeTest method shouldCreateAndCompleteATaskAndDontSeeNext.

@Test
public void shouldCreateAndCompleteATaskAndDontSeeNext() {
    securityUtil.logInAs("user1");
    // given
    ProcessInstance processInstance = processOperations.start(ProcessPayloadBuilder.start().withProcessDefinitionKey(processKey).withBusinessKey("my-business-key").withName("my-process-instance-name").build()).expectFields(processInstance().status(ProcessInstance.ProcessInstanceStatus.RUNNING), processInstance().name("my-process-instance-name"), processInstance().businessKey("my-business-key")).expect(processInstance().hasTask("Task User1", Task.TaskStatus.ASSIGNED, withAssignee("user1"))).expectEvents(processInstance().hasBeenStarted(), startEvent("StartEvent_1").hasBeenStarted(), startEvent("StartEvent_1").hasBeenCompleted(), sequenceFlow("SequenceFlow_1uccvwa").hasBeenTaken(), taskWithName("Task User1").hasBeenCreated(), taskWithName("Task User1").hasBeenAssigned()).andReturn();
    // I should be able to get the process instance from the Runtime because it is still running
    ProcessInstance processInstanceById = processRuntime.processInstance(processInstance.getId());
    assertThat(processInstanceById).isEqualTo(processInstance);
    // I should get a task for User1
    GetTasksPayload processInstanceTasksPayload = TaskPayloadBuilder.tasks().withProcessInstanceId(processInstance.getId()).build();
    Page<Task> tasks = taskRuntime.tasks(Pageable.of(0, 50), processInstanceTasksPayload);
    assertThat(tasks.getTotalItems()).isEqualTo(1);
    Task task = tasks.getContent().get(0);
    // given
    taskOperations.complete(TaskPayloadBuilder.complete().withTaskId(task.getId()).build()).expectEvents(task().hasBeenCompleted(), sequenceFlow("SequenceFlow_151v2cg").hasBeenTaken(), taskWithName("Task Group1").hasBeenCreated()).expect(processInstance().hasTask("Task Group1", Task.TaskStatus.CREATED, createdTask -> {
        assertThat(taskRuntime.userCandidates(createdTask.getId())).isEmpty();
        assertThat(taskRuntime.groupCandidates(createdTask.getId())).contains("group1");
    }));
    // Check with user1 as he is a candidate
    tasks = taskRuntime.tasks(Pageable.of(0, 50), processInstanceTasksPayload);
    assertThat(tasks.getTotalItems()).isEqualTo(1);
    // Check with user2 candidates which is not a candidate
    securityUtil.logInAs("user2");
    tasks = taskRuntime.tasks(Pageable.of(0, 50));
    assertThat(tasks.getTotalItems()).isEqualTo(0);
    // Check with user3 candidates which is a candidate
    securityUtil.logInAs("user3");
    tasks = taskRuntime.tasks(Pageable.of(0, 50), processInstanceTasksPayload);
    assertThat(tasks.getTotalItems()).isEqualTo(1);
}
Also used : ProcessInstanceMatchers.processInstance(org.activiti.test.matchers.ProcessInstanceMatchers.processInstance) Pageable(org.activiti.api.runtime.shared.query.Pageable) BPMNStartEventMatchers.startEvent(org.activiti.test.matchers.BPMNStartEventMatchers.startEvent) Task(org.activiti.api.task.model.Task) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Autowired(org.springframework.beans.factory.annotation.Autowired) RuntimeTestConfiguration(org.activiti.spring.conformance.util.RuntimeTestConfiguration) ProcessPayloadBuilder(org.activiti.api.process.model.builders.ProcessPayloadBuilder) GetTasksPayload(org.activiti.api.task.model.payloads.GetTasksPayload) ProcessRuntime(org.activiti.api.process.runtime.ProcessRuntime) TaskOperations(org.activiti.test.operations.TaskOperations) SequenceFlowMatchers.sequenceFlow(org.activiti.test.matchers.SequenceFlowMatchers.sequenceFlow) SecurityUtil(org.activiti.spring.conformance.util.security.SecurityUtil) TaskMatchers.task(org.activiti.test.matchers.TaskMatchers.task) TaskRuntime(org.activiti.api.task.runtime.TaskRuntime) ProcessOperations(org.activiti.test.operations.ProcessOperations) ProcessInstance(org.activiti.api.process.model.ProcessInstance) TaskPayloadBuilder(org.activiti.api.task.model.builders.TaskPayloadBuilder) ProcessTaskMatchers.taskWithName(org.activiti.test.matchers.ProcessTaskMatchers.taskWithName) Page(org.activiti.api.runtime.shared.query.Page) Test(org.junit.jupiter.api.Test) AfterEach(org.junit.jupiter.api.AfterEach) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) ProcessAdminRuntime(org.activiti.api.process.runtime.ProcessAdminRuntime) TaskMatchers.withAssignee(org.activiti.test.matchers.TaskMatchers.withAssignee) Task(org.activiti.api.task.model.Task) GetTasksPayload(org.activiti.api.task.model.payloads.GetTasksPayload) ProcessInstance(org.activiti.api.process.model.ProcessInstance) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 3 with Page

use of org.activiti.api.runtime.shared.query.Page in project Activiti by Activiti.

the class ProcessRuntimeBPMNTimerIT method shouldGetTimerCanceledEventOnBoundaryEvent.

@Test
public void shouldGetTimerCanceledEventOnBoundaryEvent() {
    // given
    ProcessInstance processInstance = processBaseRuntime.startProcessWithProcessDefinitionKey(PROCESS_TIMER_CANCELLED_EVENT);
    List<BPMNTimerScheduledEvent> eventsScheduled = listenerScheduled.getEvents();
    assertThat(eventsScheduled).extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId()).contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_SCHEDULED, processInstance.getProcessDefinitionId(), processInstance.getProcessDefinitionId(), processInstance.getId(), "timer"));
    clear();
    Page<Task> tasks = taskRuntime.tasks(Pageable.of(0, 10), TaskPayloadBuilder.tasks().withProcessInstanceId(processInstance.getId()).build());
    assertThat(tasks.getContent()).hasSize(1);
    Task task = tasks.getContent().get(0);
    taskRuntime.claim(TaskPayloadBuilder.claim().withTaskId(task.getId()).build());
    taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(task.getId()).build());
    List<BPMNTimerCancelledEvent> eventsCanceled = listenerCancelled.getEvents();
    assertThat(eventsCanceled).extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId()).contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_CANCELLED, processInstance.getProcessDefinitionId(), processInstance.getProcessDefinitionId(), processInstance.getId(), "timer"));
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Pageable(org.activiti.api.runtime.shared.query.Pageable) DummyBPMNTimerCancelledListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerCancelledListener) Task(org.activiti.api.task.model.Task) Date(java.util.Date) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) SecurityUtil(org.activiti.spring.boot.security.util.SecurityUtil) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) DummyBPMNTimerScheduledListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerScheduledListener) ProcessEngineConfiguration(org.activiti.engine.ProcessEngineConfiguration) BPMNTimerEvent(org.activiti.api.process.model.events.BPMNTimerEvent) DummyBPMNTimerExecutedListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerExecutedListener) TaskRuntime(org.activiti.api.task.runtime.TaskRuntime) ProcessInstance(org.activiti.api.process.model.ProcessInstance) Awaitility.await(org.awaitility.Awaitility.await) Tuple(org.assertj.core.groups.Tuple) BPMNTimerCancelledEvent(org.activiti.api.process.model.events.BPMNTimerCancelledEvent) Assertions.tuple(org.assertj.core.api.Assertions.tuple) TaskPayloadBuilder(org.activiti.api.task.model.builders.TaskPayloadBuilder) Import(org.springframework.context.annotation.Import) Page(org.activiti.api.runtime.shared.query.Page) BPMNTimerScheduledEvent(org.activiti.api.process.model.events.BPMNTimerScheduledEvent) DummyBPMNTimerFiredListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerFiredListener) Test(org.junit.jupiter.api.Test) AfterEach(org.junit.jupiter.api.AfterEach) List(java.util.List) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) ProcessCleanUpUtil(org.activiti.spring.boot.test.util.ProcessCleanUpUtil) VariableInstance(org.activiti.api.model.shared.model.VariableInstance) Task(org.activiti.api.task.model.Task) BPMNTimerScheduledEvent(org.activiti.api.process.model.events.BPMNTimerScheduledEvent) ProcessInstance(org.activiti.api.process.model.ProcessInstance) BPMNTimerCancelledEvent(org.activiti.api.process.model.events.BPMNTimerCancelledEvent) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 4 with Page

use of org.activiti.api.runtime.shared.query.Page in project Activiti by Activiti.

the class ProcessRuntimeBPMNTimerIT method shouldGetTimerFiredScheduledEventsForProcessWithTimer.

@Test
public void shouldGetTimerFiredScheduledEventsForProcessWithTimer() throws Exception {
    // given
    ProcessInstance processInstance = processBaseRuntime.startProcessWithProcessDefinitionKey(PROCESS_INTERMEDIATE_TIMER_EVENT);
    // when
    List<BPMNTimerScheduledEvent> eventsScheduled = listenerScheduled.getEvents();
    // then
    assertThat(eventsScheduled).extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId()).contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_SCHEDULED, processInstance.getProcessDefinitionId(), processInstance.getProcessDefinitionId(), processInstance.getId(), "timer"));
    assertThat(listenerFired.getEvents()).isEmpty();
    // when
    long waitTime = 10 * 60 * 1000;
    Date startTime = new Date();
    Date dueDate = new Date(startTime.getTime() + waitTime);
    // After setting the clock to time '5minutes and 5 seconds', the second timer should fire
    processEngineConfiguration.getClock().setCurrentTime(new Date(dueDate.getTime() + 5000));
    // then
    await().untilAsserted(() -> {
        assertThat(listenerFired.getEvents()).extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId()).contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_FIRED, processInstance.getProcessDefinitionId(), processInstance.getProcessDefinitionId(), processInstance.getId(), "timer"));
        assertThat(listenerExecuted.getEvents()).extracting(BPMNTimerEvent::getEventType, BPMNTimerEvent::getProcessDefinitionId, event -> event.getEntity().getProcessDefinitionId(), event -> event.getEntity().getProcessInstanceId(), event -> event.getEntity().getElementId()).contains(Tuple.tuple(BPMNTimerEvent.TimerEvents.TIMER_EXECUTED, processInstance.getProcessDefinitionId(), processInstance.getProcessDefinitionId(), processInstance.getId(), "timer"));
    });
    // then the execution reaches the task
    Page<Task> tasks = taskRuntime.tasks(Pageable.of(0, 10), TaskPayloadBuilder.tasks().withProcessInstanceId(processInstance.getId()).build());
    assertThat(tasks.getContent()).hasSize(1);
    assertThat(tasks.getContent().get(0).getName()).isEqualTo("User Task");
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Pageable(org.activiti.api.runtime.shared.query.Pageable) DummyBPMNTimerCancelledListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerCancelledListener) Task(org.activiti.api.task.model.Task) Date(java.util.Date) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) SecurityUtil(org.activiti.spring.boot.security.util.SecurityUtil) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) DummyBPMNTimerScheduledListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerScheduledListener) ProcessEngineConfiguration(org.activiti.engine.ProcessEngineConfiguration) BPMNTimerEvent(org.activiti.api.process.model.events.BPMNTimerEvent) DummyBPMNTimerExecutedListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerExecutedListener) TaskRuntime(org.activiti.api.task.runtime.TaskRuntime) ProcessInstance(org.activiti.api.process.model.ProcessInstance) Awaitility.await(org.awaitility.Awaitility.await) Tuple(org.assertj.core.groups.Tuple) BPMNTimerCancelledEvent(org.activiti.api.process.model.events.BPMNTimerCancelledEvent) Assertions.tuple(org.assertj.core.api.Assertions.tuple) TaskPayloadBuilder(org.activiti.api.task.model.builders.TaskPayloadBuilder) Import(org.springframework.context.annotation.Import) Page(org.activiti.api.runtime.shared.query.Page) BPMNTimerScheduledEvent(org.activiti.api.process.model.events.BPMNTimerScheduledEvent) DummyBPMNTimerFiredListener(org.activiti.spring.boot.process.listener.DummyBPMNTimerFiredListener) Test(org.junit.jupiter.api.Test) AfterEach(org.junit.jupiter.api.AfterEach) List(java.util.List) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) ProcessCleanUpUtil(org.activiti.spring.boot.test.util.ProcessCleanUpUtil) VariableInstance(org.activiti.api.model.shared.model.VariableInstance) Task(org.activiti.api.task.model.Task) BPMNTimerScheduledEvent(org.activiti.api.process.model.events.BPMNTimerScheduledEvent) ProcessInstance(org.activiti.api.process.model.ProcessInstance) Date(java.util.Date) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 5 with Page

use of org.activiti.api.runtime.shared.query.Page in project Activiti by Activiti.

the class ProcessRuntimeIT method should_OnlyProcessDefinitionsFromLatestVersionRetrieved.

@Test
public void should_OnlyProcessDefinitionsFromLatestVersionRetrieved() {
    Deployment deployment = processRuntime.selectLatestDeployment();
    Page<ProcessDefinition> processDefinitionPage = processRuntime.processDefinitions(PAGEABLE);
    assertThat(processDefinitionPage.getContent().stream().filter(c -> c.getKey().equals(SUPER_PROCESS))).extracting(ProcessDefinition::getAppVersion).containsOnly(deployment.getVersion().toString());
}
Also used : RuntimeService(org.activiti.engine.RuntimeService) BeforeEach(org.junit.jupiter.api.BeforeEach) Pageable(org.activiti.api.runtime.shared.query.Pageable) ProcessRuntimeImpl(org.activiti.runtime.api.impl.ProcessRuntimeImpl) Task(org.activiti.api.task.model.Task) APIVariableInstanceConverter(org.activiti.runtime.api.model.impl.APIVariableInstanceConverter) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) SecurityUtil(org.activiti.spring.boot.security.util.SecurityUtil) Autowired(org.springframework.beans.factory.annotation.Autowired) ProcessDefinition(org.activiti.api.process.model.ProcessDefinition) Mockito.spy(org.mockito.Mockito.spy) ProcessPayloadBuilder(org.activiti.api.process.model.builders.ProcessPayloadBuilder) Deployment(org.activiti.api.process.model.Deployment) ProcessRuntime(org.activiti.api.process.runtime.ProcessRuntime) RepositoryService(org.activiti.engine.RepositoryService) BigDecimal(java.math.BigDecimal) ProcessSecurityPoliciesManager(org.activiti.core.common.spring.security.policies.ProcessSecurityPoliciesManager) ProcessAdminRuntimeImpl(org.activiti.runtime.api.impl.ProcessAdminRuntimeImpl) SignalPayload(org.activiti.api.process.model.payloads.SignalPayload) ApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) Assertions.catchThrowable(org.assertj.core.api.Assertions.catchThrowable) APIProcessInstanceConverter(org.activiti.runtime.api.model.impl.APIProcessInstanceConverter) TaskRuntime(org.activiti.api.task.runtime.TaskRuntime) APIProcessDefinitionConverter(org.activiti.runtime.api.model.impl.APIProcessDefinitionConverter) ProcessVariablesPayloadValidator(org.activiti.runtime.api.impl.ProcessVariablesPayloadValidator) ProcessInstance(org.activiti.api.process.model.ProcessInstance) ProcessRuntimeConfiguration(org.activiti.api.process.runtime.conf.ProcessRuntimeConfiguration) APIDeploymentConverter(org.activiti.runtime.api.model.impl.APIDeploymentConverter) TaskPayloadBuilder(org.activiti.api.task.model.builders.TaskPayloadBuilder) ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException) UpdateProcessPayload(org.activiti.api.process.model.payloads.UpdateProcessPayload) Page(org.activiti.api.runtime.shared.query.Page) AccessDeniedException(org.springframework.security.access.AccessDeniedException) Collectors(java.util.stream.Collectors) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) StartProcessPayload(org.activiti.api.process.model.payloads.StartProcessPayload) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) RuntimeTestConfiguration(org.activiti.spring.boot.RuntimeTestConfiguration) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) ProcessCleanUpUtil(org.activiti.spring.boot.test.util.ProcessCleanUpUtil) ProcessAdminRuntime(org.activiti.api.process.runtime.ProcessAdminRuntime) VariableInstance(org.activiti.api.model.shared.model.VariableInstance) Tuple.tuple(org.assertj.core.groups.Tuple.tuple) Deployment(org.activiti.api.process.model.Deployment) ProcessDefinition(org.activiti.api.process.model.ProcessDefinition) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

ProcessInstance (org.activiti.api.process.model.ProcessInstance)8 Page (org.activiti.api.runtime.shared.query.Page)8 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)8 AfterEach (org.junit.jupiter.api.AfterEach)8 Test (org.junit.jupiter.api.Test)8 Autowired (org.springframework.beans.factory.annotation.Autowired)8 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)8 Pageable (org.activiti.api.runtime.shared.query.Pageable)7 Task (org.activiti.api.task.model.Task)7 SecurityUtil (org.activiti.spring.boot.security.util.SecurityUtil)7 ProcessCleanUpUtil (org.activiti.spring.boot.test.util.ProcessCleanUpUtil)7 BeforeEach (org.junit.jupiter.api.BeforeEach)7 List (java.util.List)6 VariableInstance (org.activiti.api.model.shared.model.VariableInstance)6 ProcessPayloadBuilder (org.activiti.api.process.model.builders.ProcessPayloadBuilder)5 ProcessRuntime (org.activiti.api.process.runtime.ProcessRuntime)5 TaskPayloadBuilder (org.activiti.api.task.model.builders.TaskPayloadBuilder)5 TaskRuntime (org.activiti.api.task.runtime.TaskRuntime)5 Assertions.tuple (org.assertj.core.api.Assertions.tuple)5 Import (org.springframework.context.annotation.Import)5