BPEL Classes

This chapter discusses the BPEL classes, as well as describes:

See Also

Integrating with BPEL Process-Based Services

Click to jump to parent topicUnderstanding the BPEL Classes

Use the Business Process Execution Language (BPEL) classes for launching, as well as controlling, a BPEL process instance. A BPEL process instance is associated with a service operation, that is, a message transaction, such as an outbound asynchronous message. You must have first created the service operation using PeopleSoft Pure Internet Architecture pages. When you define the service operation you specify the node used for connecting to the third-party system, as well as the routings used by the messages, and so on.

See Also

Integrating with BPEL Process-Based Services

Click to jump to parent topicScope of the BPEL Classes

The BPEL classes can be instantiated only from PeopleCode.

The BPEL classes can be called from a component, an internet script, Integration Broker, or an Application Engine program.

BPEL classes can be of Local, Global, or Component scope.

Click to jump to parent topicData Types of the BPEL Classes

Every BPEL class is its own data type. That is, the class of BPELUtil is declared as type BPELUtil, and so on.

The following are the data types of the BPEL classes:

Click to jump to parent topicHow to Import the BPEL Classes

The BPEL classes are not built-in classes, like rowset, field, record, and so on. They are application classes. Before you can use these classes in your PeopleCode program, you must import them to your program.

An import statement names either all the classes in a package or one particular application class. For importing the BPEL classes, PeopleSoft recommends that you import all the classes in the application package.

The application package PT_BPEL contains the BPEL classes that you will use:

The import statement you should use is as follows:

import PT_BPEL:*;

Using the asterisks after the package name makes all the application classes directly contained in the named package available. Application classes contained in subpackages of the named package are not made available.

See Also

Application Classes

Click to jump to parent topicHow to Create a BPEL Object

 

After you've imported the BPEL classes, you instantiate an object of one of those classes using the constructor for the class and the Create function.

The following example creates a new instance of the BPELUtil class, as the variable &MyBU, with local scope:

import PT_BPEL:*; Local BPELUtil &MyBU = Create BPELUtil();

See Also

BPEL Classes Constructors

Click to jump to parent topicBPEL Classes Constructors

You must use the constructor for each class to instantiate an instance of that class. The following are the constructors for the BPEL classes.

Click to jump to top of pageClick to jump to parent topicAsyncFFSend

Syntax

AsyncFFSend()

Description

Use the AsyncFFSend constructor to instantiate an AsyncFFSend object.

Parameters

None.

Returns

A reference to an AsyncFFSend object.

See Also

AsyncFFSend Class.

Click to jump to top of pageClick to jump to parent topicBPELUtil

Syntax

BPELUtil()

Description

Use the BPELUtil constructor to instantiate a BPELUtil object.

Parameters

None.

Returns

A reference to a BPELUtil object.

See Also

BPELUtil Class.

Click to jump to top of pageClick to jump to parent topicIBUtil

Syntax

IBUtil()

Description

Use the IBUtil constructor to instantiate an IBUtil object.

Parameters

None.

Returns

A reference to an IBUtil object.

See Also

IBUtil Class.

Click to jump to parent topicAsyncFFSend Class

This class provides the application handler used when an asynchronous one way operation is called from the local system. This class extends the integration broker ISend class OnRequestSend method.

See Also

Sending and Receiving Messages

Click to jump to parent topicAsyncFFSend Class Method

This section describes the AsyncFFSend class method OnRequestSend.

Click to jump to top of pageClick to jump to parent topicOnRequestSend

Syntax

OnRequestSend(&Msg)

Description

Use the OnRequestSend method to implement the integration broker ISend class OnRequestSend method.

This method is generally used to associate the WSA_MessageID when making an asynchronous one way request to the BPEL process so that it can be tracked.

Parameters

&Msg

Specify an already populated and instantiated message object.

Returns

A message object.

See Also

Understanding Sending and Receiving Messages

Click to jump to parent topicBPELUtil Class

This class provides the utility methods to interact with BPEL processes.

Click to jump to parent topicBPELUtil Class Methods

This section discusses the BPELUtil class methods, in alphabetical order.

Click to jump to top of pageClick to jump to parent topicGetASyncBPELProcessInstanceUrl

Syntax

GetASyncBPELProcessInstanceUrl(TransactionID)

Description

Use the GetASyncBPELProcessInstanceUrl method to return the complete URL that can be used to monitor an asynchronous BPEL process instance. The URL can be used to access the BPEL monitor for this particular BPEL process instance.

Parameters

TransactionID

Specify the transaction ID for the asynchronous BPEL process instance that you want to monitor.

Returns

A string containing a complete URL if successful, a Null or invalid string otherwise.

See Also

GetSyncBPELProcessInstanceUrl

Click to jump to top of pageClick to jump to parent topicGetBPELProcessBrowserUrl

Syntax

GetBPELProcessBrowserUrl(NodeName)

Description

Use the GetBPELProcessBrowserUrl to return a complete URL of the WSIL process browser. It can be used to discover all the web services that are being hosted by the given BPEL domain.

Parameters

NodeName

Specify the name of the node associated with the BPEL process that you want to access, as a string.

Returns

A string containing the complete URL if successful, an invalid URL string otherwise.

Click to jump to top of pageClick to jump to parent topicGetOperationType

Syntax

GetOperationType(OperationName)

Description

Use the GetOperationType method to return the type of the specified operation.

Parameters

OperationName

Specify the name of the operation for which you want to determine the type, as a string.

Returns

A string containing the operation type. Valid values are:

Value

Description

S

The operation type is synchronous.

A

The operation type is asynchronous.

Null

There is an error in the method execution.

Click to jump to top of pageClick to jump to parent topicGetSyncBPELProcessInstanceUrl

Syntax

GetSyncBPELProcessInstanceUrl(NodeName, MessageID)

Description

Use the GetSyncBPELProcessInstanceUrl method to return the complete URL that can be used to monitor the specified synchronous BPEL process instance.

Parameters

NodeName

Specify the node name associated with the synchronous BPEL process instance, as a string.

MessageID

Specify the message ID associated with the external system for this BPEL process instance, as a string.

Returns

A string containing a complete URL if successful, an invalid URL otherwise.

See Also

GetASyncBPELProcessInstanceUrl

Click to jump to top of pageClick to jump to parent topicLaunchASyncBPELProcess

Syntax

LaunchASyncBPELProcess(operationName, &Msg, Username, Password)

Description

Use the LaunchASyncBPELProcess method to invoke an asynchronous BPEL process.

Parameters

OperationName

Specify the name of the operation associated with the asynchronous BPEL process that you want to start, as a string.

&Msg

Specify an already instantiated and populated message object that is created from the message definition that is associated with the asynchronous BPEL process.

Username

Username and Password are used to override the security credentials that are sent by default by Integration Broker when invoking a secure BPEL process (a web service.) If you specify an empty string, the Integration Broker credentials are used. If you specify a value, it's sent as part of the security credentials of the BPEL process.

Password

Username and Password are used to override the security credentials that are sent by default by Integration Broker when invoking a secure BPEL process (a web service.) If you specify an empty string, the Integration Broker credentials are used. If you specify a value, it's sent as part of the security credentials of the BPEL process.

Returns

A string that contains the transaction ID of the published message if successful, a Null string otherwise.

See Also

LaunchSyncBPELProcess

Click to jump to top of pageClick to jump to parent topicLaunchSyncBPELProcess

Syntax

LaunchSyncBPELProcess(operationName, &Msg, Username, Password)

Description

Use the LaunchSyncBPELProcess method to invoke a synchronous BPEL process.

Parameters

OperationName

Specify the name of the operation associated with the synchronous BPEL process that you want to start, as a string.

&Msg

Specify an already instantiated and populated message object that is created from the message definition that is associated with the synchronous BPEL process.

Username

Username and Password are used to override the security credentials that are sent by default by Integration Broker when invoking a secure BPEL process (a web service.) If you specify an empty string, the Integration Broker credentials are used. If you specify a value, it's sent as part of the security credentials of the BPEL process.

Password

Username and Password are used to override the security credentials that are sent by default by Integration Broker when invoking a secure BPEL process (a web service.) If you specify an empty string, the Integration Broker credentials are used. If you specify a value, it's sent as part of the security credentials of the BPEL process.

Returns

A message object populated with the reply message if successful, a Null object otherwise.

See Also

LaunchASyncBPELProcess

Click to jump to top of pageClick to jump to parent topicUpdateConnectorResponseProperties

Syntax

UpdateConnectorResponseProperties(&Msg)

Description

Prior to sending the response message, use this method to update the connector properties for an asynchronous PeopleSoft request/response web service that is consumed by a BPEL process. Among several connector property changes that it makes, this method adds a “content-type” connector property of “text/xml.”

Note. The UpdateConnectorResponseProperties method is not required with Oracle BPEL Process Manager 10.1.2 or earlier supported versions of Oracle BPEL Process Manager; however, it can be used with those versions.

Parameters

&Msg

The message object to be sent to the BPEL process as the response of an asynchronous PeopleSoft request/response web service.

Returns

None

Example

The following sample handler PeopleCode program processes requests for an asynchronous PeopleSoft request/response web service. A call is made to UpdateConnectorResponseProperties just before sending the response.

import PS_PT:Integration:INotificationHandler; import PT_BPEL:BPELUtil; class InboundASyncResponseHandler implements PS_PT:Integration:INotificationHandler method OnNotify(&MSG As Message); end-class; method OnNotify /+ &MSG as Message +/ /+ Extends/implements PS_PT:Integration:INotificationHandler.OnNotify +/ Local PT_BPEL:BPELUtil &bpel; Local Message &response; Local string &payload; Local XmlDoc &xml; Local File &MYFILE; &bpel = create PT_BPEL:BPELUtil(); &payload = "<?xml version='1.0'?><PSFTCalcResponseMessage xmlns='http:⇒ //xmlns.oracle.com/Enterprise/Tools/schemas/PSFTCALCRESPONSEMESSAGE.V1'><result⇒ xmlns=''>9</result></PSFTCalcResponseMessage>"; &xml = CreateXmlDoc(&payload); &response = CreateMessage(Operation.PSFTASYNCCALCULATE, %IntBroker_Response); &response.SetXmlDoc(&xml); &response.IBInfo.WSA_MessageID = &MSG.IBInfo.WSA_MessageID; &response.IBInfo.WSA_ReplyTo = &MSG.IBInfo.WSA_ReplyTo; &bpel.UpdateConnectorResponseProperties(&response); %IntBroker.Publish(&response); end-method;

Click to jump to parent topicIBUtil Class

The IBUtil class provides the utility methods to access integration broker metadata.

Click to jump to parent topicIBUtil Class Methods

 

This section discusses the BPELUtil class methods, in alphabetical order.

Click to jump to top of pageClick to jump to parent topicGetBPELConsoleUrl

Syntax

GetBPELConsoleUrl(NodeName)

Description

Use the GetBPELConsoleUrl method to return the BPEL console URL.

A transaction ID is an internal identifier for the message that is published. A message ID is the external ID that is used by the external system for identifying the transaction. The transaction ID is appended to the URL generated by this method. This concatenated URL is used to monitor the BPEL process instance.

Use the GetMessageId method to return the message ID.

Parameters

NodeName

Specify the name of the node associated with the BPEL process that you want to monitor.

Returns

A string containing a complete URL if successful, Null otherwise.

See Also

GetMessageId

Click to jump to top of pageClick to jump to parent topicGetBPELDomain

Syntax

GetBPELDomain(Nodename)

Description

Use the GetBPELDomain method to determine the name of the domain of the specified node. This is used to construct the URL for accessing a BPEL process instance.

Parameters

Nodename

Specify the name of the node that you want to determine the domain for, as a string.

Returns

A string containing the domain if successful, Null otherwise.

Click to jump to top of pageClick to jump to parent topicGetMessageId

Syntax

GetMessageId(TransactionId)

Description

Use the GetmessageId method to return the message ID used to monitor a BPEL process instance.

A transaction ID is an internal identifier for the message that is published. A message ID is the external ID that is used by the external system for identifying the transaction.

Parameters

TransactionId

Specify the transaction ID associated with the BPEL process instance that you want to monitor, as a string.

Returns

A string containing the message ID, Null otherwise.

See Also

IBUtil Class class: GetBPELConsoleUrl method.

Click to jump to top of pageClick to jump to parent topicGetNode

Syntax

GetNode(MessageId)

Description

Use the GetNode method to return the node name of the node involved in processing of the message.

Parameters

MessageId

Specify the message ID associated with the BPEL process instance that you want to get the node for, as a string.

Returns

A string containing the node name if successful, Null otherwise.

Click to jump to top of pageClick to jump to parent topicGetNumberOfRoutings

Syntax

GetNumberOfRoutings(ServiceOperationName)

Description

Use the GetNumberOfRoutings method to return the number of routings for the specified service operation.

Parameters

ServiceOperationName

Specify the name of the service operation that you want to discover the number of routings for, as a string.

Returns

A number.

Click to jump to top of pageClick to jump to parent topicGetStatus

Syntax

GetStatus(TransactionId)

Description

Use the GetStatus method to return the status of the Integration Broker process specified by the transaction Id.

Parameters

TransactionId

Specify the transaction ID for the BPEL process instance that you want to check the status of, as a string.

Returns

A string containing the status, Null otherwise.

Click to jump to top of pageClick to jump to parent topicGetTransactionId

Syntax

GetTransactionId(MessageID)

Description

Use the GetTransactionId method to return the transaction ID from the message. You must use the Publish or SyncRequest method on the message before you use this method.

Parameters

MessageID

Specify the message ID associated with the BPEL process instance, as a string.

Returns

A string containing the transaction ID associated with the published message, Null otherwise.