bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

BPM Command Line Tool

 Previous Next Contents Index View as PDF  

Command Line Examples

This section shows a number of examples for using the BPM Command Line Administration Tool. It includes the following sections:

 


Before Using the Examples

To use these examples, you must first do the following:

 


Running the Script

Before using these examples, first run the bpmadmin script.

Note: To use the examples, the WebLogic Integration Server must be running.

To run the bpmadmin script, take the following steps:

  1. On a Windows system, open a command window.

  2. In both Windows and UNIX, go to the following directory:
    BEA_HOME\weblogic700\integration\bin

    In the preceding line, BEA_HOME represents the WebLogic Platform home directory.

  3. Execute the bpmadmin script by entering:

    bpmadmin.cmd

    After the bpmadmin script finishes, the window shows the available options, as shown in Figure  2-1.

    Figure 2-1 Command Line Help


     

Note: To display help at anytime, type "bpmadmin help" in the window.

 


Import, Export, and Template Examples

The examples have the following attributes:

Import Examples

From the command line, import is done for the organization level rather than for individual entities. These examples demonstrate how to import package jar files.

Example 1

To import a package jar file into ORG1 and activate the template definitions to a server at the default url (t3://localhost:7001), use the following command line:

bpmadmin IMPORT -user joe -pwd password -url t3://host:port -file test.jar -org ORG1 -activate

Example 2

To import several package jar files in a directory, use the following command line:

bpmadmin IMPORT -user joe -pwd password -url t3://host:port -dir c:\temp -org ORG1

Example 3

To import a package jar file and replace existing entities, use the following command line:

bpmadmin IMPORT -user joe -pwd password -url t3://host:port -file test.jar -org ORG1 -replace

Export Example

From the command line, export is done for the organization level rather than for individual entities. This example demonstrates how to export a package jar file.

Example

To export the entities associated with a particular organization, use the following command line:

bpmadmin EXPORT -user joe -pwd password -url t3://host:port -file org1.jar -org ORG1

Template Examples

These examples demonstrate deleting, activating, deactivating, and listing templates.

Note: Only one template can be specified at a time.

Example 1

To delete a template and all its related data, use the following command line:

bpmadmin TEMPLATE -user joe -pwd password -url t3://host:port -name TestTemplate -delete

Example 2

To activate all template definitions for a template, use the following command line:

bpmadmin TEMPLATE -user joe -pwd password -url t3://host:port -name "Test Template" -activate

Example 3

To deactivate all template definitions for a template, use the following command line:

bpmadmin TEMPLATE -user joe -pwd password -url t3://host:port -name TestTemplate -deactivate

Example 4

To list all template definitions for a template, use the following command line:

bpmadmin TEMPLATE -user joe -pwd password -url t3://host:port -name TestTemplate -list

Example 5

To activate a specific template definition for a template, use the following command line:

bpmadmin TEMPLATE -user joe -pwd password -url t3://host:port -defId 12003 -activate 

 


Instance Data Archiving

The Command Line Administration Tool adds the capability to BEA WebLogic Integration for archiving workflow instance data. This new capability solves the problem of managing the large amount of data that accumulates from completed workflow instances. The Command Line Administration Tool can remove instance data from the database or archive it as a series of XML documents.

 


Archiving Output

The XML documents generated by the archiving process contain all the data associated with each instance. The output XML conforms to the workflow instance schema. For more information, see Workflow Instance XSD.

The XML instance document is titled by a combination of the template name and the instance ID (assigned by the system), as shown in the following example:

PurchaseOrderProcessing-11234.xml

The XML document contains all the information in the InstanceInfo class including basic instance data, task information, and variable values.

For XML variables, the value is contained in a separate file named with the template name, instance ID, and variable name, as shown in the following example:

PurchaseOrderProcessing-11234-PO.xml

Instance Data Archiving also provides the option to export referenced external data, such as users, roles, organizations, and business calendars using the -references parameter. Table  2-1 provides examples of how these documents are titled.

Table 2-1 Archiving Naming Examples

Directory

Sample Title

organization

CDExpress.xml

templatedefinitions

PurchaseOrderProcessing-9.xml

templates

PurchaseOrderProcessing.xml

users

joe.xml

roles

shipping.xml


 

Note: To view an example of an XML instance document, see Sample Output Document.

Database Schema

For information on the WebLogic Integration database schema, see "Database Schema" in Programming BPM Client Applications.

Archiving Examples

These examples demonstrate instance data archiving functionality and syntax.

Example 1

To delete all instances that completed in the past 24 hours, use the following command line:

bpmadmin INSTANCE -user joe -pwd password -url t3://host:port -delete -relFrom 24

Example 2

To delete all completed instances of a particular template for a particular organization, use the following command line:

bpmadmin INSTANCE -user joe -pwd password -url t3://host:port -delete -template TestTemplate -org ORG1

Example 3

To archive all completed instances of a particular template, use the following command line:

bpmadmin INSTANCE -user joe -pwd password -url t3://host:port -archive c:\archivedir -template TestTemplate

Example 4

To archive and delete instances that completed in the last 24 hours excluding those that completed within the last 12 hours and include referenced entities, use the following command line:

bpmadmin INSTANCE -user joe -pwd password -url t3://host:port -delete -archive c:\archivedir -relFrom 24 -relTo 12 -references

Example 5

To archive all instances that completed between October 1 2002 and October 15 2002, use the following command line:

bpmadmin -user joe -pwd password -url t3://host:port -archive c:\archivedir -absFrom 2002-10-01 00:00:00 -absTo 2002-10-15 23:59:59

 

Back to Top Previous Next