Managing Process Chains
Intershop Commerce Management implements a mechanism for creating and executing process chains. Process chains help to automate the sequential execution of interdependent scheduled jobs or pipelines.
Defining a process chain involves, basically, the following tasks:
-
Specifying the chain elements, i.e., the jobs or pipelines to be processed
-
Creating a scheduled job that triggers the execution
Executing Process Chains
For process chains to be executed, administrators must create and configure a scheduled job that triggers the pipeline ExecuteProcessChain
included with the Intershop Commerce Management core cartridge.
-
Create a new scheduled job.
For details about scheduled job creation, refer to Creating New Scheduled Jobs. Make sure to specify the pipeline
ExecuteProcessChain
and the start nodeStart
. -
Add the
XmlFileName
attribute to the new job.The pipelineExecuteProcessChain
requires the path to the process chain configuration XML file as the input parameterXmlFileName
.Therefore you have to add an attributeXmlFileName
to the job. Its value must be of the data typeString
and must specify the complete path and file name of the configuration file relative to <IS.INSTANCE.SHARE>, e.g., system/config/cluster/processchain.xml. -
Configure the process chain execution.
Define the recurring interval, specific login and password etc. as necessary. For details, see Creating New Scheduled Jobs.
Specifying Process Chain Elements
Administrators can define process chains via XML files.
-
<chain>
The root element of the process chain XML file. Important attributes include
name
(used in the Intershop System Management, module 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 attributename
is used in the Intershop System Management module Monitoring | Locking | Processes. -
<sequence>
Child element of
<chain>
or<concurrent>
. Includes jobs or pipelines to be executed sequentially in the given order. The attributename
is used in the Intershop System Management module 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>
.Table 1. Attributes of the process chain element <job> Attribute Description job
Specifies the name of the job as defined in the Intershop System Management Schedules module (mandatory). name
Specifies a display name for the job to be used in the Monitoring | Locking | Processes module. domain
Can define a specific domain for the job execution (optional). By default, the chain element job is executed in the domain of the process chain. allsites
Can specify whether the job executes in all domains ( true
|false
). By default, it is set tofalse
.concurrent
With allsites=true
, can specify whether the job executes in parallel in all domains (true
|false
). By default, it is set tofalse
. -
<pipeline>
Child element of
<sequence>
or<concurrent>
. Specifies a pipeline to be executed within the chain. The next table lists the attributes for<pipeline>
.Table 2. Attributes of the process chain element <pipeline> Attribute Description pipeline
Specifies the name of the pipeline to be executed. name
Specifies a display name for the pipeline to be used in the Monitoring | Locking | Processes module. domain
Can define a specific domain for the pipeline execution (optional). By default, the chain element pipeline is executed in the domain of the process chain. startnode
Can define a specific pipeline start node (optional). By default, it is set to Start. login
Can define the login name that the pipeline to be executed may require. password
Can 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 module Monitoring | Locking | Processes. -
<ignore>
Optional child element of
<sequence>
,<concurrent>
,<job>
or<pipeline>
. Can specify status codes (SUCCESS|WARNING|FAILURE|ERROR|NOTFOUND|INTERRUPTED
) returned from the corresponding chain element upon execution that should be ignored for the remaining process chain execution. This way, the process chain execution can continue in case of errors in one of its sub tasks.