示例#1
0
        public static MigrationInstructionValidationReportDto from(MigrationInstructionValidationReport instructionReport)
        {
            MigrationInstructionValidationReportDto dto = new MigrationInstructionValidationReportDto();

            dto.Instruction = MigrationInstructionDto.from(instructionReport.MigrationInstruction);
            dto.Failures    = instructionReport.Failures;
            return(dto);
        }
示例#2
0
        public static MigratingActivityInstanceValidationReportDto from(MigratingActivityInstanceValidationReport report)
        {
            MigratingActivityInstanceValidationReportDto dto = new MigratingActivityInstanceValidationReportDto();

            dto.MigrationInstruction = MigrationInstructionDto.from(report.MigrationInstruction);
            dto.ActivityInstanceId   = report.ActivityInstanceId;
            dto.Failures             = report.Failures;
            dto.SourceScopeId        = report.SourceScopeId;
            return(dto);
        }
示例#3
0
        public static MigrationInstructionDto from(MigrationInstruction migrationInstruction)
        {
            if (migrationInstruction != null)
            {
                MigrationInstructionDto dto = new MigrationInstructionDto();

                dto.SourceActivityIds  = Collections.singletonList(migrationInstruction.SourceActivityId);
                dto.TargetActivityIds  = Collections.singletonList(migrationInstruction.TargetActivityId);
                dto.UpdateEventTrigger = migrationInstruction.UpdateEventTrigger;

                return(dto);
            }
            else
            {
                return(null);
            }
        }
示例#4
0
        public static MigrationPlanDto from(MigrationPlan migrationPlan)
        {
            MigrationPlanDto dto = new MigrationPlanDto();

            dto.SourceProcessDefinitionId = migrationPlan.SourceProcessDefinitionId;
            dto.TargetProcessDefinitionId = migrationPlan.TargetProcessDefinitionId;

            List <MigrationInstructionDto> instructionDtos = new List <MigrationInstructionDto>();

            if (migrationPlan.Instructions != null)
            {
                foreach (MigrationInstruction migrationInstruction in migrationPlan.Instructions)
                {
                    MigrationInstructionDto migrationInstructionDto = MigrationInstructionDto.from(migrationInstruction);
                    instructionDtos.Add(migrationInstructionDto);
                }
            }
            dto.Instructions = instructionDtos;

            return(dto);
        }