IBM BPM, V8.0.1, All platforms > Install IBM BPM > Plan for IBM BPM > Plan to configure Business Process Choreographer > About Business Process Choreographer

BPEL process archiving overview

If you configure the Business Process Archive Manager, you use a script to move completed process instances and human tasks from the Business Process Choreographer database to an archive database. By regularly performing archiving, you can prevent the runtime database from filling up with old objects, which over time, can degrade the database performance. You can use a Business Process Archive Explorer or the Business Process Archive Manager API to access processes and tasks that were moved to the archive database. Because it is not possible to move data from an archive database back to a runtime database, using this archiving facility does not provide any backup protection.


Architecture

The business process archiving facility consists of the following elements:

Business Process Archive Manager

The Business Process Archive Manager must be configured before you can use it. The following conditions apply:

  • Business Process Archive Manager must be configured in a ND environment and requires Service Component Architecture (SCA) and messaging services.

  • A Business Process Choreographer configuration can only use Business Process Archive Manager configurations that are in the same cell.

  • A Business Process Archive Manager configuration can only be used to archive data from one Business Process Choreographer configuration.
  • Each Business Process Archive Manager configuration must have its own Business Process Archive database.

  • A deployment target can only have one configuration of either Business Process Archive Manager or Business Process Choreographer.

  • Applications that contain BPEL processes or human tasks cannot be deployed to a deployment target that is configured with the Business Process Archive Manager.

  • For each Business Process Choreographer configuration, you can have one or more Business Process Archive Manager configurations.

    Minimum configuration

    The following figure illustrates using one Business Process Archive Manager configuration for a Business Process Choreographer configuration. This setup is sufficient to prevent database performance problems caused by the runtime database filling up with completed instances. Both configurations must be in the same cell.

    Figure 1. Business Process Choreographer using one Business Process Archive

    Multiple configurations

    It is also possible to use multiple Business Process Archives to archive the instances from a Business Process Choreographer configuration.

    Figure 2. Business Process Choreographer using two Business Process Archives

    For example, if different departments work with different BPEL processes, it might make sense to have an archive per department, and move completed instances of each departments' business processes to their own archive, so that the members of one department cannot access the archived process instances of another department.

    Using more than one Business Process Archive will not improve the performance of archiving operations.

Business Process Archive database

Each Business Process Archive Manager requires its own database. The database must be of the same type and structure as is used for the Business Process Choreographer database. The default name for the archive database is BPARCDB.

The archive.py administrative script

A WebSphere system administrator can run this script to archive data from the runtime database of one Business Process Choreographer configuration to the archive database of a Business Process Archive Manager configuration. Various parameters can be specified to control which instances will be archived, how many to archive in total, and how many to archive in each database transaction. The source and destination are specified by their deployment servers or clusters. For more information about this script, see Archiving completed BPEL process and task instances.

The following restrictions apply:

  • You cannot transfer objects from an archive database back to a Business Process Choreographer database, nor to another archive.

  • The first time that you archive instances to a new archive database, the identity of the Business Process Choreographer configuration is written to the database, and in future, only instances from that configuration can be archived to that archive database.

  • When instances are successfully moved to the archive, they are deleted from the Business Process Choreographer database, which generates a deletion event for the common event infrastructure (CEI) and the audit log. But it is not possible to identify that the deletion event was caused by an archiving action rather than by some other delete action, for example, cleanup service, user initiated delete action, delete script, or automatic deletion after successful completion.

  • You cannot archive to different archives at the same time. Parallel invocations of the archive.py script are serialized.

  • You cannot archive a process instance that has the same process name as any other process instance in the archiving database.

  • You cannot archive a process instance that has the same values for its correlation set as another process instance in the archiving database.

  • If you archive instances of a process template, then undeploy and redeploy the identical process template with the valid from date unchanged, you cannot archive any new instances of that process template to the same archive database. This is not an issue for normal process template versioning, where a different valid from date is used.

However, even if one of the restriction prevents you from archiving certain process instances to one archive database, you can archive those process instances to a different archive database, for which the restriction conditions are not true.

Business Process Archive Manager EJB API support

Only a subset of the actions that are available using the Business Flow Manager and Human Task Manager EJB APIs can also be used against a Business Process Archive Manager configuration to perform read and delete operations on process instances and human tasks that are in the associated archive database. The other APIs are not supported by the Business Process Archive Manager.

A new method, OperationMode getOperationMode() is provided, which indicates whether the client is connected to a Business Process Choreographer configuration or a Business Process Archive Manager configuration. This can be used to write custom clients that can connect to and operate appropriately on runtime configurations and archive configurations.

For more information about the Business Process Archive Manager API refer to the JavaDoc for the packages com.ibm.bpe.api and com.ibm.task.api.

Business Process Archive Explorer

The Business Process Archive Explorer is very similar to the Business Process Choreographer Explorer except that it connects to an archive database associated with a Business Process Archive Manager configuration. Like the Process Choreographer Explorer, the Business Process Archive Explorer must be configured before it can be used.

There are two ways to configure a Business Process Archive Explorer:

  • If you run the bpeconfig.jacl script to create a Business Process Archive Manager configuration, there is an option to also configure a Business Process Archive Explorer instance on the same deployment target.

  • If you only want to configure a Business Process Archive Explorer instance, you can run the clientconfig.jacl script interactively, or in batch mode using the -operationMode ARCHIVE option.

Depending on your authorization, you can use the Business Process Archive Explorer to browse instances and possibly delete instances too. You cannot update instances or create new instances.

Authorization

The actions that can be performed using the Business Process Archive Manager EJB API or the Business Process Archive Explorer depends on the following Java™ Platform, Enterprise Edition (Java EE) roles:

  • Users who are in the Business Process Archive Manager system monitor role can read and view all process instances and all task instances in the archive database.

  • Users who are in the Business Process Archive Manager system administrator role can also delete any top-level process instances and top-level task instances in the archive database.

  • Users who are neither in the system monitor nor the system administrator roles can only see instances that they created or started themselves, but they cannot view any details about the instances.
  • No one (not even users in the system administrator roles) can modify any of the data associated with any instances in the archive database.

  • Instance-based authorization information, such as the potential owner or reader information, is not archived. Therefore, this data is not available in the archive. The only exception to this is the information about the starter and creator of processes and tasks.

  • Users must be in the WebClientUser role to use the Business Process Archive Explorer.


Which data is archived

Only top-level process instances and top-level standalone human task instances that have reached one of the end states ( Finished, Terminated, Failed, or Expired) can be moved to the archive database. When a top-level instance is archived, certain data is also moved with it to the archive, and other data is deleted.

For completed top-level process instances, including business state machine instances:

  • Instance data such as activities, variables, inline human tasks, input messages, and output messages are moved.
  • Child processes and related data are moved recursively.

  • If any related metadata such as process templates and task templates are not already in the archive database, a copy of them is created.
  • Query tables and stored queries are neither moved nor copied to the archive database.
  • Work items associated with an archived instance are deleted without being archived.

For completed top-level standalone human tasks:

  • Instance data such as input messages and output messages are moved.
  • Escalation instances are moved.
  • Child tasks including follow-on tasks are moved.

  • If related metadata such as task templates are not already in the archive database, a copy of them is created.
  • Work items associated with an archived instance are deleted without being archived.

Metadata

Additional metadata, such as process and task template information, is copied to the archive when necessary, to allow the archived data to be interpreted and displayed correctly. The metadata in the archive database is deleted when it is no longer required, that is, when the last process instance or human task that references the metadata is deleted.

What is not archived

Other Business Process Choreographer data, such as configuration data, XSD and WSDL artefacts, SCA modules, applications, work baskets, business categories, business rules, messages, and audit trail data, cannot be moved to the archive.


Overview of configuring a business process archive

If you want to configure a business process archive, you must plan to perform the following steps:

  1. Perform Plan for the Business Process Archive.
  2. Ensure that all the prerequisites are met:

    • The Business Process Choreographer configuration that the archive will be connected to must already be working.

    • The deployment target for the business process archive must already exist, and not have a Business Process Choreographer or Business Process Archive Manager configuration on it.

      The Service Component Architecture on this deployment target must be configured to use the identical values for Bus Member Location, Database Instance, and Schema as the SCA configuration on the deployment target of the associated Business Process Choreographer configuration. This allows it to share the existing messaging infrastructure.

  3. Run the bpeconfig.jacl script.

    You can only create a Business Process Archive Manager configuration using the bpeconfig.jacl script. The script can also create the first Business Process Archive Explorer configuration on the same deployment target. If you want further Business Process Archive Explorer configurations (on the same or different deployment target) use the clientconfig.jacl script.

  4. If the Business Process Archive database does not already exist, it must be created before the Business Process Archive Manager is started.
  5. Restart the server or cluster where the Business Process Archive Manager is configured.
  6. Verify that the archiving facility works:

    • If you have configured the Business Process Choreographer Explorer, use it to identify some BPEL process instances or human task instances that are in an end state that you want to move to the archive database.

    • Run the archive.py script to move some completed BPEL process instances or human task instances to the archive.
    • Direct a browser to the URL for the Business Process Archive Explorer to verify that the instances are in the archive.