Jump to: navigation, search

MRO Replication Jobs


Revision as of 07:21, 22 September 2026 by LMA (Talk | contribs) (→‎MRO Replication Jobs)

MRO replication jobs generate work packages from configured maintenance plans. The processing is divided into two steps: the Maintenance Planning Orchestrator schedules jobs for eligible maintenance plans, and a separate EnterpriseService executes the scheduled jobs.

This page describes the available MRO replication jobs, the required BasicClient App and EnterpriseService configuration, and a basic setup for testing or demonstrating MRO replication.

For the configuration and behaviour of maintenance plans, see MROMaintenancePlans.


Replication process

MRO replication uses the following process:

  1. The Maintenance Planning Orchestrator searches for maintenance plans that are ready for automatic work package generation.
  2. Each eligible maintenance plan provides the replication job required for its plan type.
  3. The orchestrator schedules the job in MRO_JOB_DISPATCHING.
  4. A separate EnterpriseService processes the scheduled job.
  5. The replication job uses the template work package and the linked INSTANCE_REPLICATION object to generate the work package.

Scheduling a job does not execute the replication immediately. It creates a dispatching job containing the information required for later execution.

For a basic test or demonstration, the scheduling and execution processes can be configured in two separate UBIK.Studio folders.


Available MRO replication jobs

MRO provides two replication jobs.

Job Inheritance Purpose
ReplicateWorkpackageJob Derives from DispatchingJob for WorkPackage Generates a work package from the template and replication configuration of a maintenance plan.
ReplicateRoundWorkpackageJob Derives from ReplicateWorkpackageJob Generates the main work package of a maintenance round and the additional work packages configured by its child maintenance plans.

Both jobs use the same scheduling, dispatching, and execution infrastructure. The maintenance plan implementation returns the appropriate job when the Maintenance Planning Orchestrator requests its replication job.

Work package replication

A standard maintenance plan uses ReplicateWorkpackageJob.

The maintenance plan provides:

  • a template work package through LK_WP_TMPL
  • an INSTANCE_REPLICATION object through LK_REPLICATION_CONFIG
  • the maintenance plan settings required for automatic work package generation

The linked INSTANCE_REPLICATION object defines how the template work package is copied. The generated work package is not marked as a template.

For the complete maintenance plan prerequisites and the properties set on generated work packages, see MROMaintenancePlans.

Round work package replication

A RoundMaintenancePlan uses ReplicateRoundWorkpackageJob.

The job creates the main work package from the Round Maintenance Plan. It then processes the child maintenance plans linked through SYSREL_ROUND_RELATION and creates their additional work packages. The additional work packages are assigned to the main round work package through TASK_OWNER.

Round work package replication uses the same BasicClient App, EnterpriseService, and dispatching setup as standard work package replication. The maintenance plan implementation determines which job is scheduled.

For the configuration and behaviour of Round Maintenance Plans, see MROMaintenancePlans.

Scheduling and execution

Maintenance Planning Orchestrator

The scheduling process executes the following method:

Setting Value
Class UBIK.MRO.MaintenancePlanningOrchestrator
Method Apply

The Maintenance Planning Orchestrator searches for eligible maintenance plans, requests the appropriate replication job from each plan, and schedules the job in MRO_JOB_DISPATCHING.

Scheduled Orchestrator

The execution process executes the following method:

Setting Value
Class UBIK.ServiceTask.Orchestration.ScheduledOrchestrator
Method Apply

The Scheduled Orchestrator searches MRO_JOB_DISPATCHING for scheduled jobs and executes them.

MRO job dispatching

MRO_JOB_DISPATCHING is the specialised DISPATCHING Interface Administration MetaClass used for MRO replication jobs.

The orchestration process creates the required job objects automatically. Project teams do not need to create these objects manually.

The execution EnterpriseService identifies MRO_JOB_DISPATCHING through the InterfaceAdmin value in MRO.PARAM.json.

For general information about Interface Administration objects, see InterfaceAdministration.

Job statuses

The execution status indicates the current state or result of a dispatching job.

Value Status Meaning
0 Undefined The execution state is undefined.
1 Success The execution completed successfully.
2 Terminated The execution was terminated.
3 Conflict An export conflict occurred.
4 Started Execution has started but has not yet completed.
5 Scheduled The job is scheduled but has not yet been executed.
10 Error An error occurred during execution.

In a basic replication test, a newly scheduled job first has the status Scheduled. After successful execution, its status changes to Success.

Application setup

A basic test or demonstration uses two separate UBIK.Studio folders.

Studio folder Purpose Required applications
Scheduling folder Provides the EnterpriseService web interface and starts the Maintenance Planning Orchestrator through the BasicClient App. UBIK.EnterpriseService.exe and UBIK.EnterpriseService.BasicClient.App.exe
Execution folder Runs the Scheduled Orchestrator and executes jobs from MRO_JOB_DISPATCHING. UBIK.EnterpriseService.exe

The folder names and paths in the examples can be changed. Every configured path must point to the corresponding file in the local deployment.

Scheduling folder setup

The scheduling folder requires the following files:

  • UBIK.EnterpriseService.exe
  • UBIK.EnterpriseService.exe.config
  • UBIK.EnterpriseService.BasicClient.App.exe
  • UBIK.EnterpriseService.BasicClient.App.exe.config
  • JSON\ReplicateWorkpackageJob.json

Configure the scheduling EnterpriseService

In UBIK.EnterpriseService.exe.config, configure the following application settings:

Setting Default value Required value Purpose
ExecuteWebInterface 0 1 Enables the web interface used by the BasicClient App.
ExecuteTaskByJsonFile 0 0 The scheduling EnterpriseService does not execute the recurring task configuration used by the execution EnterpriseService.
WebInterfacePort 9000 9000 Defines the port used by the web interface in this example.
WebInterfaceHost http://localhost http://localhost Defines the host used by the web interface in this example.

Configure the BasicClient App

In UBIK.EnterpriseService.BasicClient.App.exe.config, configure the following application settings:

Setting Example value Purpose
BaseAddress http://localhost:9000 Identifies the web interface exposed by the scheduling EnterpriseService.
PathToBasicEnterpriseServiceRequestJsonFile Full path to ReplicateWorkpackageJob.json Identifies the request file that starts the Maintenance Planning Orchestrator.
PathToBasicEnterpriseServiceRequestJsonFileList Empty No request file list is used in this setup.

BaseAddress must match WebInterfaceHost and WebInterfacePort in the scheduling EnterpriseService configuration. Replace the example path with the actual path to ReplicateWorkpackageJob.json.

Configure ReplicateWorkpackageJob.json

Create ReplicateWorkpackageJob.json in the JSON folder and configure the target database, orchestrator class, and method:

{
  "SSPI": true,
  "SQLUser": "",
  "SQLPassword": "",
  "SQLServer": "(localdb)\\MSSQLLocalDB",
  "SQLInitialCatalog": "JOB.TEST",
  "ClassFullname": "UBIK.MRO.MaintenancePlanningOrchestrator",
  "MethodName": "Apply"
}

Adapt the database settings to the target database. Keep ClassFullname and MethodName as shown so that the request executes UBIK.MRO.MaintenancePlanningOrchestrator.Apply.

Execution folder setup

The execution folder requires the following files:

  • UBIK.EnterpriseService.exe
  • UBIK.EnterpriseService.exe.config
  • JSON\MRO.json
  • JSON\MRO.PARAM.json

Configure the execution EnterpriseService

In UBIK.EnterpriseService.exe.config, configure the following application settings:

Setting Default value Required value Purpose
PluginExecutionConfigPath Empty Full path to MRO.json Identifies the recurring task configuration.
ExecuteWebInterface 0 0 The execution EnterpriseService does not require the web interface in this setup.
ExecuteTaskByJsonFile 0 1 Enables execution of the tasks configured in MRO.json.

Configure MRO.json

Create MRO.json and configure the database connection, execution interval, Scheduled Orchestrator, and path to MRO.PARAM.json:

{
  "RepeateEveryMinutes": 0.2,
  "SqlConnectionDefinition": {
    "SSPI": true,
    "SQLUser": "",
    "SQLPassword": "",
    "SQLServer": "(localdb)\\MSSQLLocalDB",
    "SQLInitialCatalog": "JOB.TEST"
  },
  "Tasks": [
    {
      "ClassFullname": "UBIK.ServiceTask.Orchestration.ScheduledOrchestrator",
      "MethodName": "Apply",
      "MethodParameterPathFullName": "<full path to MRO.PARAM.json>"
    }
  ]
}

Adapt the database settings and MethodParameterPathFullName to the target deployment. Keep ClassFullname and MethodName as shown so that the task executes UBIK.ServiceTask.Orchestration.ScheduledOrchestrator.Apply.

RepeateEveryMinutes defines how often the execution EnterpriseService checks for scheduled jobs. A value of 0 causes continuous checking. The value 0.2 can be used for a demonstration where continuous checking is not required.

Configure MRO.PARAM.json

Create MRO.PARAM.json and configure the UID of MRO_JOB_DISPATCHING:

{
  "InterfaceAdmin": "BBAF1C9E-8F3B-4C9A-9E2D-5F7A1C3E4B6D"
}

The InterfaceAdmin value identifies MRO_JOB_DISPATCHING for the Scheduled Orchestrator.

Maintenance plan prerequisites

For a basic work package replication scenario, configure:

  • a concrete maintenance plan type such as CyclicMaintenancePlan
  • an asset through LK_ASSET
  • a template work package through LK_WP_TMPL
  • an INSTANCE_REPLICATION object through LK_REPLICATION_CONFIG
  • PLAN_STATUS as Active
  • AUTO_CREATE as enabled
  • planning dates that make the plan eligible for generation
  • a template work package with ISTEMPLATE set

The maintenance plan must not already have an open generated work package. Detailed generation conditions are documented in MROMaintenancePlans.

Basic test or demonstration

Prepare the maintenance plan

  1. Open the database in UBIK.Studio.
  2. Create or select a valid maintenance plan.
  3. Assign the required asset through LK_ASSET.
  4. Assign a template work package through LK_WP_TMPL.
  5. Verify that ISTEMPLATE is set on the template work package.
  6. Assign an INSTANCE_REPLICATION object through LK_REPLICATION_CONFIG.
  7. Set PLAN_STATUS to Active.
  8. Enable AUTO_CREATE.
  9. Configure the planning dates so that EARLIEST_GENERATION_DATE has been reached.
  10. Verify that the maintenance plan has no open generated work package.

Schedule the job

  1. Start UBIK.EnterpriseService.exe in the scheduling folder.
  2. Start UBIK.EnterpriseService.BasicClient.App.exe manually, or start it through a configured Windows Task Scheduler task.
  3. The BasicClient App sends the request defined in ReplicateWorkpackageJob.json to the scheduling EnterpriseService.
  4. UBIK.MRO.MaintenancePlanningOrchestrator.Apply searches for eligible maintenance plans and schedules their replication jobs.

Verify the scheduled job

  1. Open MRO_JOB_DISPATCHING in UBIK.Studio.
  2. Verify that a job object was created for the eligible maintenance plan.
  3. Verify that INTERFACE_EXECUTION_STATUS is Scheduled.
  4. If the execution EnterpriseService has not been started, verify that no generated work package exists yet.

Execute the job

  1. Start UBIK.EnterpriseService.exe in the execution folder.
  2. The EnterpriseService executes UBIK.ServiceTask.Orchestration.ScheduledOrchestrator.Apply according to MRO.json.
  3. The Scheduled Orchestrator reads the scheduled job from MRO_JOB_DISPATCHING.
  4. The configured replication job generates the work package.

Verify the result

  1. Refresh MRO_JOB_DISPATCHING.
  2. Verify that the job status is Success.
  3. Refresh the Work Package MetaClass.
  4. Verify that a new work package was created.
  5. Verify that ISTEMPLATE is not set on the generated work package.
  6. Verify the links and planning values described in MROMaintenancePlans.

For a Round Maintenance Plan, also verify that:

  • the main round work package was created
  • the child maintenance plans produced the configured additional work packages
  • the additional work packages are assigned to the main round work package through TASK_OWNER

Triggering the scheduling process

For a manual test or demonstration, start UBIK.EnterpriseService.BasicClient.App.exe manually.

For recurring execution, a Windows Task Scheduler task can start UBIK.EnterpriseService.BasicClient.App.exe. The executable path is configured in the task. The request and target orchestrator are configured in UBIK.EnterpriseService.BasicClient.App.exe.config and ReplicateWorkpackageJob.json.

Running the Maintenance Planning Orchestrator processes all eligible maintenance plans.

Configuration summary

Component Configuration Purpose
Scheduling EnterpriseService ExecuteWebInterface = 1 Exposes the web interface used by the BasicClient App.
BasicClient App PathToBasicEnterpriseServiceRequestJsonFile Points to ReplicateWorkpackageJob.json.
Scheduling request UBIK.MRO.MaintenancePlanningOrchestrator.Apply Searches for eligible maintenance plans and schedules their jobs.
Execution EnterpriseService ExecuteTaskByJsonFile = 1 Enables execution using MRO.json.
Execution task UBIK.ServiceTask.Orchestration.ScheduledOrchestrator.Apply Processes scheduled dispatching jobs.
Execution parameter InterfaceAdmin Identifies MRO_JOB_DISPATCHING.
Maintenance plan LK_REPLICATION_CONFIG Links directly to the INSTANCE_REPLICATION object used to copy the template work package.

See also