public virtual void testMapUserTaskInEventSubProcess() { var testProcess = ModifiableBpmnModelInstance.Modify(ProcessModels.SubprocessProcess) .AddSubProcessTo("subProcess") .TriggerByEvent() ////.EmbeddedSubProcess() //.StartEvent() ////.Message(MESSAGE_NAME) .UserTask("innerTask") .EndEvent() .SubProcessDone() .Done(); var sourceProcessDefinition = testHelper.DeployAndGetDefinition(testProcess); var targetProcessDefinition = testHelper.DeployAndGetDefinition(testProcess); var migrationPlan = runtimeService.CreateMigrationPlan(sourceProcessDefinition.Id, targetProcessDefinition.Id) .MapActivities("userTask", "userTask") .MapActivities("innerTask", "innerTask") .Build(); MigrationPlanAssert.That(migrationPlan) .HasSourceProcessDefinition(sourceProcessDefinition) .HasTargetProcessDefinition(targetProcessDefinition) .HasInstructions(MigrationPlanAssert.Migrate("userTask") .To("userTask"), MigrationPlanAssert.Migrate("innerTask") .To("innerTask")); }
public virtual void testMapAllBoundaryEvents() { IBpmnModelInstance testProcess = ModifiableBpmnModelInstance.Modify(ProcessModels.SubprocessProcess) //.ActivityBuilder("subProcess") //.BoundaryEvent("error") //.Error(ERROR_CODE) //.MoveToActivity("subProcess") //.BoundaryEvent("escalation") //.Escalation(ESCALATION_CODE) //.Done() ; var sourceProcessDefinition = testHelper.DeployAndGetDefinition(testProcess); var targetProcessDefinition = testHelper.DeployAndGetDefinition(testProcess); var migrationPlan = runtimeService.CreateMigrationPlan(sourceProcessDefinition.Id, targetProcessDefinition.Id) .MapActivities("subProcess", "subProcess") .MapActivities("error", "error") .MapActivities("escalation", "escalation") .MapActivities("userTask", "userTask") .Build(); MigrationPlanAssert.That(migrationPlan) .HasSourceProcessDefinition(sourceProcessDefinition) .HasTargetProcessDefinition(targetProcessDefinition) .HasInstructions(MigrationPlanAssert.Migrate("subProcess") .To("subProcess"), MigrationPlanAssert.Migrate("error") .To("error"), MigrationPlanAssert.Migrate("escalation") .To("escalation"), MigrationPlanAssert.Migrate("userTask") .To("userTask")); }
public virtual void testMapBoundaryToLowerScope() { IBpmnModelInstance sourceProcess = ModifiableBpmnModelInstance.Modify(ProcessModels.SubprocessProcess) //.ActivityBuilder("userTask") //.BoundaryEvent("boundary") ////.Message(MESSAGE_NAME) //.Done() ; IBpmnModelInstance targetProcess = ModifiableBpmnModelInstance.Modify(ProcessModels.OneTaskProcess) //.ActivityBuilder("userTask") //.BoundaryEvent("boundary") ////.Message(MESSAGE_NAME) //.Done() ; var sourceProcessDefinition = testHelper.DeployAndGetDefinition(sourceProcess); var targetProcessDefinition = testHelper.DeployAndGetDefinition(targetProcess); var migrationPlan = runtimeService.CreateMigrationPlan(sourceProcessDefinition.Id, targetProcessDefinition.Id) .MapActivities("userTask", "userTask") .MapActivities("boundary", "boundary") .Build(); MigrationPlanAssert.That(migrationPlan) .HasSourceProcessDefinition(sourceProcessDefinition) .HasTargetProcessDefinition(targetProcessDefinition) .HasInstructions(MigrationPlanAssert.Migrate("userTask") .To("userTask"), MigrationPlanAssert.Migrate("boundary") .To("boundary")); }
public virtual void testMigrateTaskToHigherScope() { var sourceDefinition = testHelper.DeployAndGetDefinition(ProcessModels.OneTaskProcess); var targetDefinition = testHelper.DeployAndGetDefinition(ProcessModels.SubprocessProcess); var migrationPlan = runtimeService.CreateMigrationPlan(sourceDefinition.Id, targetDefinition.Id) .MapActivities("userTask", "userTask") .Build(); MigrationPlanAssert.That(migrationPlan) .HasSourceProcessDefinition(sourceDefinition) .HasTargetProcessDefinition(targetDefinition) .HasInstructions(MigrationPlanAssert.Migrate("userTask") .To("userTask")); }
public virtual void testCanUpdateEventTriggerForEventSubProcessStartEvent() { var sourceProcessDefinition = testHelper.DeployAndGetDefinition(EventSubProcessModels.TIMER_EVENT_SUBPROCESS_PROCESS); var targetProcessDefinition = testHelper.DeployAndGetDefinition(EventSubProcessModels.TIMER_EVENT_SUBPROCESS_PROCESS); var migrationPlan = runtimeService.CreateMigrationPlan(sourceProcessDefinition.Id, targetProcessDefinition.Id) .MapActivities("eventSubProcessStart", "eventSubProcessStart") .UpdateEventTrigger() .Build(); MigrationPlanAssert.That(migrationPlan) .HasSourceProcessDefinition(sourceProcessDefinition) .HasTargetProcessDefinition(targetProcessDefinition) .HasInstructions(MigrationPlanAssert.Migrate("eventSubProcessStart") .To("eventSubProcessStart") .UpdateEventTrigger(true)); }
public virtual void testMapSubProcessWithEventSubProcess() { var sourceProcessDefinition = testHelper.DeployAndGetDefinition(EventSubProcessModels.NESTED_EVENT_SUB_PROCESS_PROCESS); var targetProcessDefinition = testHelper.DeployAndGetDefinition(EventSubProcessModels.NESTED_EVENT_SUB_PROCESS_PROCESS); var migrationPlan = runtimeService.CreateMigrationPlan(sourceProcessDefinition.Id, targetProcessDefinition.Id) .MapActivities("subProcess", "subProcess") .MapActivities("userTask", "userTask") .Build(); MigrationPlanAssert.That(migrationPlan) .HasSourceProcessDefinition(sourceProcessDefinition) .HasTargetProcessDefinition(targetProcessDefinition) .HasInstructions(MigrationPlanAssert.Migrate("subProcess") .To("subProcess"), MigrationPlanAssert.Migrate("userTask") .To("userTask")); }