Skip Headers
Oracle® Beehive Application Developer's Guide
Release 1 (1.4)

Part Number E13800-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

2 Oracle Beehive Custom Workflows

Oracle Beehive's integration with Oracle BPEL Process Manager allows you to create your own BPEL workflow processes and deploy them in your environment. A BPEL process can leverage Oracle Beehive task integration, and it can be invoked either from Oracle Beehive or from external sources.

Refer to "Oracle Beehive Custom Workflow" found in the Oracle Beehive Web site on Oracle Technology Network for a tutorial that demonstrates how to define a BPEL process that is invoked from Oracle Beehive and leverages BPEL task integration.

In this tutorial, you define an Oracle Beehive policy that will determine when the BPEL process will be invoked. This policy definition also determines which XML data is sent to the workflow process, which is defined with JXPaths. The following section describes how to construct JXPaths.

Constructing JXPaths

Each JXPath has the following structure:

<method>#<method>#...@<XML element name>

For example, the following is the first JXPath in this policy, which retrieves the identifier of the newly added document, then maps this value to the <entityId> element in the generated XML:


To get the list of available attributes for a particular event, use the command beectl list_events --name <event name>. For <event name>, use the value in the <eventTypeName> element in the policy.

For example, this policy invokes the HelloWorldWFAction when a document is created. The event name for this is DOCUMENT_CREATED. The following is a description of this event and its attributes:

beectl list_events --name DOCUMENT_CREATED
Event Description: Raised when a new document is created in a heterogeneous folder. This event is also raised when an existing document is copied to a new heterogeneous folder.
Is Synchronous: N
Event Subscriptions:                
Name: HelloWorldDocCreated
Event Subscription Id: 26C9:2946:evts:37275AA4FF80934DE040578C201A154B0000000493F5
Event Action Function:
Is PLSQL Action: N
Event Attributes:                   
  Name: ENTITY_ID                      Type: OCS_CODE.OCS_COLLAB_ID_T
  Name: CONTAINER                      Type: OCS_CODE.OCS_COLLAB_ID_T
  Name: ACTOR_ID                       Type: OCS_CODE.OCS_COLLAB_ID_T
  Name: OPERATION                      Type: STRING
  Name: STATUS                         Type: STRING
  Name: MESSAGE                        Type: STRING
  Name: EVENT_NAME                     Type: STRING
  Name: LOGON_RECORD_ID                Type: INTEGER
  Name: EVENT_ID                       Type: INTEGER
    Name: SIZE_CHANGE                    Type: INTEGER
    Name: NEW_CONTAINER                  Type: OCS_CODE.OCS_COLLAB_ID_T

To retrieve the value of an attribute, perform the following steps to the attribute's name:

  1. Convert the attribute name to lower case

  2. Capitalize the first letter of the attribute name. and the letter after each underscore

  3. Remove all underscores

  4. Append get to the beginning of the name

Attributes are stored in a tree structure. For example, to retrieve the value of ENTITY_ID, you will have to retrieve COMMON_ATTRIBUTES first.

You may use the following methods in your JXPath: