Configuring retry for committing approved task group changes

You can configure the task group approval process to automatically retry committing task group changes to the database. By configuring this setting, you can avoid having the commit of approved task group changes fail when a database timeout error occurs.

When a database timeout error occurs, the initial commit of task group changes fails. The task group approval process then repeatedly tries to commit the changes based on your configured commit retry settings or until the commit process is successful. When the commit succeeds, the changes are committed to the production-ready data and the workspace is cleaned to remove the task group data. The changes are also committed for publishing according to the commit option selected for the task group. For more information about how changes in a task group can be committed for publishing, see Committing workspace data to production-ready data.

Procedure

  1. If the commit retry is not enabled, update your workspace configuration to enable reattempting the commit of changes during task group approval. By default, this configuration is enabled.
    1. Go to the workspace_dir/WC/xml/config directory.
    2. Copy the wc-workspace.xml file to a temporary location. Do not directly modify this file.
    3. Open the temporary copy of the wc-workspace.xml file for editing.
    4. Locate the <WorkspaceConfiguration> section in the file:
      
      <WorkspaceConfiguration isWorkspaceEnabled="true" >
        <ActivateTaskEmail isEmailEnabled="false" from="" cc="" bcc="" language="en_US" />
        <RejectTaskEmail isEmailEnabled="false" from="" cc="" bcc="" language="en_US" />
        <ApproveTaskGroupEmail isEmailEnabled="false" from="" cc="" bcc="" language="en_US" />
        <ContentContributorRole id=""  />
        <ApproverRole id=""  />
        <RetryCommit enabled="true" />
        <DeferredCommit enabled="false" />
        <UserGroupCache timeout="0" />
      </WorkspaceConfiguration>
    5. If the RetryCommit configurable element is set to "false", change the value of the element to "true".
      For example, <RetryCommit enabled="true" />.
    6. Save and close the file.
  2. Configure the time interval that the approval process waits between attempts to commit changes and configure the maximum number of times that the process attempts to commit changes. Update the resource container configuration file to set a value for these attributes or to change the current values.
    1. Go to the workspace_dir/WC/xml/config directory.
    2. Go to the workspace_dir/WC/xml/content-management directory.
    3. Copy the wc-resource-containers.xml file to a temporary location. Do not directly modify this file.
    4. Open the temporary copy of the wc-resource-containers.xml file for editing.
    5. Locate the <wc:DefaultConfiguration> section in the file:
      
      <wc:DefaultConfiguration
        lockingPolicy="com.ibm.commerce.context.content.locking.TaskGroupLockingPolicy"
        enableDynamicWorkspaceCreation="false"
        readPrefixName="WCR"
        writePrefixName="WCW"
      />
    6. Set or change the value for the configurable attributes waitTime=nS and retry=n within this element. If the attributes are not included within this element, add the attributes.
      Where
      • waitTime=nS is the time (in Seconds) that the approval process is to wait before it tries to approve a task group and commit the changes within the task group. The default value is 3 seconds.
      • retry=n is the maximum number of times that the task group commit is tried. The default value is 5 attempts.
      For example, The following configurations set a waitTime value of 20 seconds retry value of 20. This configuration ensures that the commit of task group changes is tried every 20 seconds up to a maximum of 20 attempts.
      
      <wc:DefaultConfiguration
        lockingPolicy="com.ibm.commerce.context.content.locking.TaskGroupLockingPolicy"
        enableDynamicWorkspaceCreation="false"
        readPrefixName="WCR"
        writePrefixName="WCW"
        waitTime="20"
        retry="20"
      />
    7. Save and close the file.
  3. Update your deployment package to include your updated files. For more information, see Building a custom Docker image from a deployable package.