The asset purge feature uses a sequence of processor components to select and delete repository items. This processor chain is controlled by the Oracle Commerce Platform pipeline manager. See information about processor chains and pipeline managers in the Core Commerce Programming Guide.

Include the processor components in the pipeline definition for the /atg/purge/pipeline/PipelineManager component. You can view the existing definition for this pipeline in the Dynamo Server Admin user interface for your production server. From the admin menu, choose Component Browser and navigate to the /atg/purge/pipeline/PipelineManager component. Click the link for the definitionFile property of the component to view the combined XML definition file.

To add the processor components of your asset purge function to the asset purge pipeline:

  1. Place an XML pipeline definition file named pipeline.xml in the configuration path of your server. See an example file in Example Asset Purge pipeline.xml File. Place the file at the following location in the configuration path:

    /atg/purge/pipeline/PipelineManager/pipeline.xml

  2. Include a pipelinechain element for your asset purge function. Make sure the name attribute is unique to your asset purge function. Set the headlink attribute to the name you use for the CanPurgeProcessor component in its pipelinelink element.

  3. Include pipelinelink elements for your CanPurgeProcessor and RepositoryItemPurgeProcessor components. Include a processor element and set its jndi attribute to the Nucleus path of each component. Include transition elements with link attribute values as shown in Example Asset Purge pipeline.xml File.

    See information about these processor components in Configuring Basic Purging Components.

  4. Include a pipelinelink element for the /atg/purge/pipeline/processor/NoOpProcessor as shown in Example Asset Purge pipeline.xml File.

Example Asset Purge pipeline.xml File

The following example configures the asset purge pipeline manager with the components of an asset purge function. See detailed information about configuring processor chains and pipeline managers in the Core Commerce Programming Guide.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE pipelinemanager
  PUBLIC "-//Art Technology Group, Inc.//DTD Dynamo Pipeline Manager//EN"
         'http://www.atg.com/dtds/pipelinemanager/pipelinemanager_1.0.dtd'>
<pipelinemanager>

  <!-- Provide a unique name and headlink attribute in the
       pipeline chain element for your asset purge function. -->

  <pipelinechain
    resultclassname="atg.service.pipeline.PipelineResultImpl"
    transaction="TX_REQUIRED"
    classname="atg.service.pipeline.PipelineChain"
    name="organizationPurge" headlink="canOrganizationPurge">

    <!-- Include a pipelinelink element for your CanPurgeProcessor
         component. -->

    <pipelinelink transaction="TX_MANDATORY" name="canOrganizationPurge">
      <processor jndi="/mycompany/purge/pipeline/processor/CanOrganizationPurgeProcessor" />
      <transition returnvalue="1" link="executeOrganizationPurge" />
      <!-- RETCODE_OK -->
      <transition returnvalue="2" link="ignoreOrganizationPurge" />
      <!-- RETCODE_NOT_OK -->
    </pipelinelink>

    <!-- Include a pipelinelink element for your RepositoryItemPurgeProcessor
         component. -->

    <pipelinelink transaction="TX_MANDATORY" name="executeOrganizationPurge">
      <processor jndi="/mycompany/purge/pipeline/processor/OrganizationPurgeProcessor" />
    </pipelinelink>

    <!-- Include a pipelinelink element for the asset purge NoOpProcessor
         component. -->

    <pipelinelink transaction="TX_MANDATORY" name="ignoreOrganizationPurge">
      <processor jndi="/atg/purge/pipeline/processor/NoOpProcessor" />
    </pipelinelink>
  </pipelinechain>
</pipelinemanager>
Inserting an Additional Asset Purge Pipeline Processor

The following example shows elements of the pipeline.xml configuration file that insert an additional processor into the asset purge pipeline. Make sure that the transition elements link the CanPurgeProcessor component to the processor components you add. Make sure that the transition elements for the components you add link to the RepositoryItemPurgeProcessor component.

See detailed information about configuring processor chains and pipeline managers in the Core Commerce Programming Guide.

<pipelinemanager>
  <pipelinechain>

    <!-- elements omitted -->

    <pipelinelink transaction="TX_MANDATORY" name="canOrganizationPurge">

    <!-- elements omitted -->

      <!-- If the processor component for this pipelinelink element
           returns 1, invoke the additional pipeline processor. -->
      <transition returnvalue="1" link="prepareOrganizationPurge" />
      <!-- RETCODE_OK -->
      <transition returnvalue="2" link="ignoreOrganizationPurge" />
      <!-- RETCODE_NOT_OK -->
    </pipelinelink>

    <!-- The following pipelinelink element configures the additional
         processor in the pipeline. -->

    <pipelinelink transaction="TX_MANDATORY" name="prepareOrganizationPurge">
      <processor jndi="/mycompany/purge/pipeline/processor/PrepareOrganizationPurgeProcessor" />

      <!-- If the processor component for this pipelinelink element
           returns 1, invoke the additional pipeline processor. -->
      <transition returnvalue="1" link="executeOrganizationPurge" />
      <!-- RETCODE_OK -->
      <transition returnvalue="2" link="ignoreOrganizationPurge" />
      <!-- RETCODE_NOT_OK -->
    </pipelinelink>
    <pipelinelink transaction="TX_MANDATORY" name="executeOrganizationPurge">

    <!-- elements omitted -->

    </pipelinelink>
  </pipelinechain>
</pipelinemanager>

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices