Search in sources :

Example 61 with BpmnModelInstance

use of org.camunda.bpm.model.bpmn.BpmnModelInstance in project camunda-bpm-platform by camunda.

the class MigrationPlanGenerationTest method testMapEqualActivitiesWithBoundaryEvent.

@Test
public void testMapEqualActivitiesWithBoundaryEvent() {
    BpmnModelInstance testProcess = modify(ProcessModels.SUBPROCESS_PROCESS).activityBuilder("subProcess").boundaryEvent("messageBoundary").message(MESSAGE_NAME).moveToActivity("userTask").boundaryEvent("signalBoundary").signal(SIGNAL_NAME).moveToActivity("userTask").boundaryEvent("timerBoundary").timerWithDate(TIMER_DATE).done();
    assertGeneratedMigrationPlan(testProcess, testProcess).hasInstructions(migrate("subProcess").to("subProcess"), migrate("messageBoundary").to("messageBoundary"), migrate("userTask").to("userTask"), migrate("signalBoundary").to("signalBoundary"), migrate("timerBoundary").to("timerBoundary"));
}
Also used : BpmnModelInstance(org.camunda.bpm.model.bpmn.BpmnModelInstance) Test(org.junit.Test)

Example 62 with BpmnModelInstance

use of org.camunda.bpm.model.bpmn.BpmnModelInstance in project camunda-bpm-platform by camunda.

the class MigrationPlanGenerationTest method testMapEqualActivitiesToNewScopes.

@Test
public void testMapEqualActivitiesToNewScopes() {
    BpmnModelInstance sourceProcess = ProcessModels.DOUBLE_SUBPROCESS_PROCESS;
    BpmnModelInstance targetProcess = modify(ProcessModels.DOUBLE_SUBPROCESS_PROCESS).changeElementId("outerSubProcess", "newOuterSubProcess").changeElementId("innerSubProcess", "newInnerSubProcess");
    assertGeneratedMigrationPlan(sourceProcess, targetProcess).hasEmptyInstructions();
}
Also used : BpmnModelInstance(org.camunda.bpm.model.bpmn.BpmnModelInstance) Test(org.junit.Test)

Example 63 with BpmnModelInstance

use of org.camunda.bpm.model.bpmn.BpmnModelInstance in project camunda-bpm-platform by camunda.

the class MigrationPlanGenerationTest method testMapEqualActivitiesToParentScope.

@Test
public void testMapEqualActivitiesToParentScope() {
    BpmnModelInstance sourceProcess = modify(ProcessModels.DOUBLE_SUBPROCESS_PROCESS).changeElementId("outerSubProcess", "subProcess");
    BpmnModelInstance targetProcess = ProcessModels.SUBPROCESS_PROCESS;
    assertGeneratedMigrationPlan(sourceProcess, targetProcess).hasInstructions(migrate("subProcess").to("subProcess"));
}
Also used : BpmnModelInstance(org.camunda.bpm.model.bpmn.BpmnModelInstance) Test(org.junit.Test)

Example 64 with BpmnModelInstance

use of org.camunda.bpm.model.bpmn.BpmnModelInstance in project camunda-bpm-platform by camunda.

the class MigrationPlanGenerationTest method testMapConditionalBoundaryEvents.

@Test
public void testMapConditionalBoundaryEvents() {
    BpmnModelInstance sourceProcess = modify(ProcessModels.ONE_TASK_PROCESS).activityBuilder(USER_TASK_ID).boundaryEvent(BOUNDARY_ID).condition(VAR_CONDITION).done();
    assertGeneratedMigrationPlan(sourceProcess, sourceProcess, false).hasInstructions(migrate(BOUNDARY_ID).to(BOUNDARY_ID).updateEventTrigger(true), migrate(USER_TASK_ID).to(USER_TASK_ID).updateEventTrigger(false));
}
Also used : BpmnModelInstance(org.camunda.bpm.model.bpmn.BpmnModelInstance) Test(org.junit.Test)

Example 65 with BpmnModelInstance

use of org.camunda.bpm.model.bpmn.BpmnModelInstance in project camunda-bpm-platform by camunda.

the class MigrationPlanGenerationTest method testMapEqualUnsupportedAsyncBeforeActivities.

@Test
public void testMapEqualUnsupportedAsyncBeforeActivities() {
    BpmnModelInstance testModel = modify(ProcessModels.UNSUPPORTED_ACTIVITIES).flowNodeBuilder("startEvent").camundaAsyncBefore().moveToNode("decisionTask").camundaAsyncBefore().moveToNode("throwEvent").camundaAsyncAfter().moveToNode("serviceTask").camundaAsyncBefore().moveToNode("sendTask").camundaAsyncBefore().moveToNode("scriptTask").camundaAsyncBefore().moveToNode("endEvent").camundaAsyncBefore().done();
    assertGeneratedMigrationPlan(testModel, testModel).hasInstructions(migrate("startEvent").to("startEvent"), migrate("decisionTask").to("decisionTask"), migrate("throwEvent").to("throwEvent"), migrate("serviceTask").to("serviceTask"), migrate("sendTask").to("sendTask"), migrate("scriptTask").to("scriptTask"), migrate("endEvent").to("endEvent"));
}
Also used : BpmnModelInstance(org.camunda.bpm.model.bpmn.BpmnModelInstance) Test(org.junit.Test)

Aggregations

BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)587 Test (org.junit.Test)408 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)258 Task (org.camunda.bpm.engine.task.Task)139 TaskQuery (org.camunda.bpm.engine.task.TaskQuery)124 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)119 MigrationPlan (org.camunda.bpm.engine.migration.MigrationPlan)67 ProcessApplicationDeployment (org.camunda.bpm.engine.repository.ProcessApplicationDeployment)47 Deployment (org.camunda.bpm.engine.repository.Deployment)39 ProcessDefinitionQuery (org.camunda.bpm.engine.repository.ProcessDefinitionQuery)27 Job (org.camunda.bpm.engine.runtime.Job)24 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)22 VariableInstance (org.camunda.bpm.engine.runtime.VariableInstance)21 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)16 Date (java.util.Date)15 HashMap (java.util.HashMap)15 HistoricVariableInstance (org.camunda.bpm.engine.history.HistoricVariableInstance)14 Execution (org.camunda.bpm.engine.runtime.Execution)14 MigratingBpmnEventTrigger (org.camunda.bpm.engine.test.api.runtime.migration.util.MigratingBpmnEventTrigger)14 SequenceFlow (org.camunda.bpm.model.bpmn.instance.SequenceFlow)14