Document Properties
Kbid
311R00
Last Modified
18-Dec-2023
Added to KB
18-Dec-2023
Public Access
Everyone
Status
Online
Doc Type
Concepts
Product
ICM 11
Concept - Process Chains (valid to 11.x)

Introduction

This concept is aimed at developers and describes the organization of tasks in process chains. In Intershop Commerce Management, process chains help to automate the sequential execution of interdependent scheduled jobs or pipelines.

As a developer or administrator, you can easily configure process chains using XML files.

By using process chains, you can:

  • Avoid conflicts with overlapping jobs
  • Shorten waiting periods between jobs
  • Minimize the scheduling effort
  • Restart a set of schedules if a task or schedule fails
  • Send notifications when a schedule or a set of schedules fails or finishes successfully

References

Technical Overview

  • XSD can be found as processchain.xsd in our XML schema definition GitHub repository.
  • processchain.xml.example shows all important elements and attributes
  • Build medium sized process chains – incl. dependencies, to restart a group
  • Build chains in chains to reduce schedule effort – call a process chain schedule

Types of Elements

An umbrella element defines how the tasks inside the element will be executed. An umbrella element is logged as a process. This allows the administrator to easily see the impact of the group.

  • Task List: For executing multiple tasks
    • Sequence - Executes all tasks one after another
    • Concurrent - Executes all tasks in parallel
  • Task Types:
    • Job - Executes a configuration, concurrent=true declares if the execution is sequential or parallel.
    • Pipeline - Executes a pipeline
  • Error: All tasks are executed in sequence if an error occurs in the outer task list.

Example of a Process Chain

The error sequence is executed if "Step 2.2.1 Job" or "Step 2.2.2 Pipeline" fails. For more details on fine-tuning error handling, refer to the description of the <ignore> element in the next section.

Process Chain Elements

Administrators can define process chains using XML files to be located in$IS_SITES.

Info

The default installation includes an example file, processchain.xml.example.

The main configurable elements include:

  • <chain>
    The root element of the process chain XML file. Important attributes includename(used in Intershop System Management | Monitoring | Locking | Processes) andkeepAliveTime, which defines the time that threads exceeding the core pool size may remain idle before being terminated.

  • <concurrent>
    Child element of <chain> or <sequence>. Includes jobs or pipelines to be executed in parallel. The attributenameis used in Intershop System Management | Monitoring | Locking | Processes.

  • <sequence>
    Child element of <chain> or <concurrent>. Includes jobs or pipelines to be executed sequentially in the given order. The attributenameis used in Intershop System Management | Monitoring | Locking | Processes.

  • <job>
    Child element of <sequence> or <concurrent>. Specifies a job to be executed within the chain. The next table lists the attributes for<job>.

    The following attributes can be assigned to the <job> element:

    AttributeDescription
    jobSpecifies the name of the job as defined in the System Management Schedules module (mandatory).
    nameSpecifies a display name for this job to be used in the Intershop System Management | Monitoring | Locking | Processes module.
    domainCan define a specific domain for the job execution (optional). By default, the chain element job is executed in the domain of the process chain.
    allsitesCan specify whether the job executes in all domains (true|false), default is false.
    concurrentWith allsites=true, can specify whether the job executes in parallel in all domains (true|false), default is false.
  • <pipeline>
    Child element of<sequence>or<concurrent>. Specifies a pipeline to be executed within the chain. The next table lists the attributes for<pipeline>.

    The following attributes can be assigned to the <pipeline> element:

    AttributeDescription
    pipelineSpecifies the name of the pipeline to be executed.
    nameSpecifies a display name for this pipeline to be used in the Monitoring | Locking | Processes module.
    domainCan define a specific domain for the pipeline execution (optional). By default, the chain element pipeline is executed in the domain of the process chain.
    startnodeCan define a specific pipeline start node (optional), default is Start.
    loginCan define the login name that the pipeline to be executed may require.
    passwordCan define the password if the pipeline to be executed requires a specific login.
  • <error>
    Optional child element of <sequence>. Specifies a dedicated <job> or <pipeline> that is to be executed in case the preceding jobs or pipelines within the <sequence> have failed.

    Note

    Make sure that <error> is the last element within the corresponding<sequence>.
  • <parameter>
    Optional child element of <pipeline>. Can specify the parameter that the pipeline to be executed may require.

  • <description>
    Optional child element of <sequence><concurrent><job>, or <pipeline>. Specifies a description to be displayed in  the Intershop System Management Monitoring | Locking | Processes module.

  • <ignore>
    Optional child element of <sequence><concurrent><job>, or <pipeline>. Can specify status codes (SUCCESS | WARNING | FAILURE | ERROR | NOTFOUND | INTERRUPTED | STUCK) returned by the corresponding chain element on execution that should be ignored for the rest of the process chain execution. This allows the process chain execution to continue even if an error occurs in one of its sub-tasks.

XML Example

Execution Plan Example
<?xml version="1.0" encoding="UTF-8"?>
<p:chain name="Chain Example">
    <p:sequence name="Chain is a sequence">
        <p:job job="CheckOrders" name="Step 1 - Job" />
        <p:concurrent name="Step 2 - Concurrent">
            <p:pipeline pipeline="ExecuteProcessChain" name="Step 2.1 - Pipeline">
                <p:parameter name="XmlFileName">*.xml</p:parameter>
            </p:pipeline>
            <p:sequence name="Step 2.2 - Sequence">
                <p:job allsites="true" concurrent="true" job="ArchiveOrders" name="Step 2.2.1 - Job" />
                <p:pipeline pipeline="..." name="Step 2.2.2 - Pipeline" />
                <p:error name="Step 2.2 Error Sequence">
                    <p:pipeline pipeline="SendNotification" name="Error - Pipeline" />
                </p:error>
            </p:sequence>
        </p:concurrent>
    </p:sequence>
</p:chain>

Ignore - Sub Element of Each Task

<p:concurrent name="Step 2 - Concurrent">
    <p:sequence name="Step 2.2 - Sequence">
        <p:ignore>NOTFOUND</p:ignore>
        <p:job allsites="true" concurrent="true" job="ArchiveOrders" 
                   name="Step 2.2.1 - Job" />
        <p:pipeline pipeline="..." name="Step 2.2.2 - Pipeline" />
        <p:error name="Step 2.2 Error Sequence">
            <p:pipeline pipeline="SendNotification" name="Error - Pipeline" />
        </p:error>
    </p:sequence>
</p:concurrent>

Status Mapping

Each task execution has a result that is indicated by a status. This status is represented by a "bit"-status by a enum (ProcessChainStatus) value for each status. Parent processes can do a bitwise or to combine the status of their children.

StatusBitDescription
STATUS_SUCCESS0No issues.
STATUS_WARNING1The process collected some warnings (e.g. imports are partly incorrect), but it continues.
STATUS_FAILURE2The process collected irreparable warnings (e.g. imports failed completely), so it is canceled
STATUS_ERROR4The process had some internal processing errors/exceptions.
STATUS_NOTFOUND8The process could not be found (e.g. for missing pipelines - could happen if the application does not support the process).
STATUS_INTERRUPTED16The process was interrupted by the OS or JVM, the process observer had time to store the interrupted state.
STATUS_STUCK32

The process has been identified as stuck by another application server. The application server running the process periodically updates an attribute of the process to indicate that the working process is alive.

Process Chain View

To get an overview of the execution of a process chain:

In Intershop System Management, switch to Monitoring | Locking | Processes | <your subprocess>.
Here you can find information on acquired resources, the chain elements, the execution time, the status of your process chain, a GANT diagram showing the execution sequence and more.

You may access an alternative view via Scheduling | Schedules | Last Run date of your process chain.

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.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.