Guide - CaaS - Job Triggering and Replication

1 Introduction

In a CaaS project, after the shop goes live, customers and implementation partners (DEV) have limited access to System Management (SMC) and Organization Management on the production environment, see CaaS DevOps - Access and Permissions.

It is not recommended to manually trigger replication tasks in the Organization Management or run jobs in System Management. Instead, these tasks should be scheduled.

This guide describes scheduling based on one of the most important tasks for daily business as an example, replication.

1.1 Glossary

AbbreviationDescription
OPSOperation
DEVDeveloper, implementation partner
Software part
ICMIntershop Commerce Management
SMCIntershop System Management

2 Replication Basics

Data replication is a method of transferring large amounts of data from a source cluster to a target cluster. In a CaaS context, it refers to the transfer of data from an edit cluster to a live cluster in the same environment. Replication between separate clusters is not possible because they have different databases.

The following figure shows a simplified basic architecture, see Concept - Mass Data Replication for details.

To perform the replication, the blueprint of the database (tables) should be the same on edit and live clusters. In other words, the same migration must have been performed on both sides, see Overview - DBMigrate and DBInit.

3 Preliminary Information

Links to Intershop Commerce Management, Organization Management and System Management can be found in the Links section of your Customer System confluence page.

4 Trigger Replication Manually from Organization Management

Once the replication tasks have been defined in Intershop Commerce Management (Mass Data Tasks | Data Replication Tasks), the replication process can be executed manually from Organization Management (Data Replication | Data Replication Tasks).

This requires access to Organization Management, which is always available for INT and UAT environments, but limited for the PRD environment after the go-live. The best practice is described in the next section.

See also the Video Tutorial - Data Replication.

5 Create a Scheduled Replication Process

There are several ways to create a scheduled, i.e. automatic, replication process. The simplest of these is described in more detail below. However, there are other possibilities as well.

The process can be summarized as following:

  1. Define a replication job.
  2. (optional) Add this replication job to a process chain.
  3. Define a recurring interval for the replication job or the process chain,
    OR
    Start the replication or the process chain manually through a REST API call.

5.1 Define a Replication Job

  1. Create a replication.xml  file which defines the replication processes and tasks.
    You may use the following template for replication at channel and organization level:

    In this XML file, a process ID can be freely defined:

    <process id="ReplicationProcessID">

    Afterwards, the replication tasks are listed in this file.
    For specific case and customization of the replication.xml file, refer to Cookbook - Mass Data Replication - Administration and Cookbook - Mass Data Replication - Customization and Adaption .

  2. Deploy this file.
    Ideally, the file should be part of the deployment. If you have access to the file system, which is the case with INT, you can also import it directly.
  3. Open Intershop System Management and go to Schedule | Scheduling:
  4. Select SLDSystem in the Advance Domain Selection:
  5. Select Regular Replication Process, see Job - Regular Replication Process for details:
  6. Switch to the Attributes tab and enter the ID defined in the XML file:
  7. Switch back to the General tab. To define a recurring interval, scroll down to the section with that name and set the desired periodicity.
    You can start this job directly from the System Management  or via REST API call (see next section).
  8. Click on Apply.

This step might be sufficient to fulfill your needs.

5.2 Add the Replication Job to a Process Chain

The job defined in the last section can be started independently or be included in a process chain. In this case, do not define a recurring interval.

To add the replication job to a process chain, perform the following steps:

  1. Define a processchain.xml file which executes the System Management job Regular Replication Process for the provided replication process ID.
    You may use the following template:
     my-processchain.xml

  2. Deploy this file.
    Ideally, the file should be part of the deployment. If you have access to the file system, which is the case with INT, you can also import it directly.
  3. Create a job configuration which uses the pipeline ExecuteProcessChain-Start to be able to execute the chain.

    1. Open the Intershop System Managementr and go to Schedule | Scheduling.
    2. Select SLDSystem in the Advance Domain Selection.
    3. Create a new job by clicking on New
    4. Set Pipeline to 'ExecuteProcessChain' and Startnode to 'Start'.
    5. Switch to the Attributes tab, add a new one with Name 'XmlFileName', Data Type 'String', and enter the path to my-processchain.xml as Value.
    6. Switch back to the General tab.
      To define a recurring interval, scroll down to the section with this name, and define the wished periodicity. You could also start this job directly from the Intershop System Management or via REST API (see next section).

See also Overview - Process Chains, Support Article - Process Chains Playground

5.2.1 Triggering the Replication Job or Process Chain via REST API

The job Regular Replication Process defined previously, or ExecuteProcessChain in the case of a process chain, can be triggered via a manual REST API call. This requires REST privileges in Intershop System Management.

The syntax is described in REST API Jobs - Start a Job. However, only the REST resources are included, for instance:

/domains/{DomainResourceKey}/jobs/{JobResourceKey}

The full syntax in our case is:

https://{hostname}:{port}/INTERSHOP/rest/WFS/SMC/-/domains/{DomainResourceKey}/jobs/{JobResourceKey}

As illustration:

https://www.example.com/INTERSHOP/rest/WFS/SMC/-/domains/SLDSystem/jobs/Regular%20%Replication%20Process

It returns following JSON:


See alsoSupport Article - How to Start U Up ICM Schedule Jobs Using REST Calls (Startup Predefined Replication Processes) and Reference - Jobs API 1.0.0.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Tickets