Oracle® WebCenter Content System Administrator's Guide for Content Server 11g Release 1 (11.1.1) Part Number E10792-04 |
|
|
PDF · Mobi · ePub |
The BPEL Component adds the ability to interact with Business Process Execution Language (BPEL) Process Manager from within Oracle WebCenter Content Server (Content Server) workflows. As an administrator, you can configure Content Server workflows to initiate a deployed process on the BPEL server.
This chapter provides all the information required to install and configure the BPEL component on a computer running the Content Server instance and Oracle BPEL Process Manager. The following sections are included here
The following topics are covered in this section:
At a minimum, the BPEL component has the same hardware requirements as for Content Server and Oracle BPEL Process Manager.
This section specifies requirements for Content Server and BPEL Process Manager.
Oracle Content Server: Content Server release 11g or higher should be properly installed and running on the target computer.
Oracle BPEL Process Manager: SOA Suite release 11g or higher should be properly installed and running on the target computer.
These instructions assume that you have already installed the release version of SOA.
This section covers the following steps:
There are currently two ways to set up a content server to enable integration with SOA:
Scenario One involves installing Oracle WebCenter Content in a domain that has been extended by SOA. This involves installing all parts into one domain in a particular order. The SOA libraries are available to all and the class path is augmented to contain the SOA libraries.
Scenario Two involves manually copying the required libraries used by SOA and augmenting the class path used to launch WebCenter Content inside of WebLogic Server.
The difference between the two scenarios is that the installation of SOA augments the class path for you, while in Scenario Two this is a manual step. In the future, WebCenter Content will ship with the appropriate SOA libraries.
Follow these steps:
Create a new domain for SOA.
Extend the SOA domain by BAM and EM.
Extend the SOA by WebCenter Content.
You may want to check that the setDomainEnv
variable has been populated with SOA-specific libraries. In particular, check that soa-infra-mgmt.jar is mentioned in the class path.
To update a WebCenter Content domain that has not been extended by SOA, follow these steps:
Copy the /soa directory from the Oracle home for SOA to the Oracle home for WebCenter Content.
Locate the 11g SOA home directory for the SOA server you are connecting to via WebCenter Content. There should be a directory called 'soa.' Copy this directory to the WebCenter Content home directory and leave it in the top directory, that is, copy SOA_ORACLE_HOME/soa to WC_CONTENT_ORACLE_HOME/soa.
Augment the class path for the WebCenter Content domain by editing the setDomanEnv.cmd or setDomainEnv.sh file, depending on your OS.
set POST_CLASSPATH=%ORACLE_HOME%\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;%POST_CLASSPATH%
The final step for both scenarios is enabling the BpelIngetration component and starting the servers.
If your SOA instance is running in a separate server than WebCenter Content, you may see the following security error:
vax.xml.ws.WebServiceException: java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[weblogic, Administrators] at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:209) at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:216)
If you encounter this error, you need to enable cross-domain security for both servers. Follow these instructions:
User will need to setup Trusted Domain on both WLS domain. Goto WLS Console->Respected Domainssoainfra or bam ->Security 1. Make sure "Cross Domain Security Enabled" 2. Click on Save 3. Expand Advanced part of setting 4. Make sure you supplement the Credential and Confirm Credential fields. 5. Click on Save Repeat for the same for the other WLS domain. Finally, Restart both WLS Servers.
Follow these steps to enable the Integration component:
Log in to the Content Server as a system administrator.
Choose Administration then Admin Server.
Select the Component Manager for the server on which you want to install the component.
In the paragraph at the top of the page, click the Advanced Component Manager link.
Notice that there are two lists of Enabled and Disabled Components. Select BpelIntegration in the lower Disabled Components list.
Click Enable to move the item from the lower list to the upper.
At the bottom of the page, click Update.
Log in to the Oracle WebLogic Server Administration Console.
On the left-hand side of the console, click Domain Structure then Environment then Servers. The Summary of Servers page is displayed.
From the Control tab, select your server then click Restart SSL.
The following topics are covered in this section:
The Integration uses BPEL client libraries to communicate with Oracle BPEL Process Manager. A process configuration is required to identify connection parameters, a BPEL process, and a BPEL operation. Additionally, a process configuration identifies document metadata fields and literal values assigned to the parameters passed to the BPEL operation.
Process configurations reside within files located in the data/orabpel directory. You may edit these files manually. However, there are some pages provided with the Integration component to make this job easier. The first page is a connection configuration page. From the connection configuration page you can view the defined connection configurations and add or delete connection configurations.As an administrator, you can access the connection configuration page by expanding the Administration menu, and then expanding the Oracle BPEL Administration folder. Click Connection Configurations.
This page contains a Connection Menu at top right that is used to add a new connection. Each connection has an Actions drop-down menu that provides the following choices.
Element | Description |
---|---|
Configuration Information |
Allows you to view a connection configuration in more detail. |
Test Configuration |
Allows you to test the JNDI Properties of the connection configuration. |
Delete Configuration |
Allows you to delete a connection configuration. |
To add a connection configuration, choose Add Connection from the Connection Menu at the top right of the page. The Add Configuration page is displayed.
The fields on this page are defined in the following table.
Element | Description |
---|---|
Configuration ID |
Used to identify the connection configuration. Must be unique. |
Description |
Used to provide a description of the connection configuration. |
Domain |
The BPEL process domain identifier. |
Initial Context Factory |
The initial context factory to use to connect to the BPEL process manager. The value should be the fully qualified class name of the factory class that creates an initial context (for example, "com.evermind.server.ApplicationClientInitialContextFactory" for connecting to an Oracle Application Server running BPEL). |
Provider URL |
The location of the BPEL process manager. The value should contain a URL string (for example, "opmn:ormi://servername:6003:home/orabpel" for connecting to an Oracle Application Server running BPEL). |
Security Prinicipal |
The identity of the principal for authenticating the caller to the BPEL process manager. The value should contain a user identifier for a user registered on the BPEL process manager. |
Security Credentials |
The credentials of the principal for authenticating the caller to the BPEL process manager. The value should contain a password for the user identifier entered as the security principal. |
Confirm Security Credentials |
Used to confirm the security credentials password. |
To view detailed information about a specific connection configuration, you can choose Configuration Information from the Actions popup menu for the specific adapter in the configuration page. The Configuration Information page is displayed.
The following actions are available from the Actions drop-down at the top of the page.
Element | Description |
---|---|
Update Connection |
Allows you to edit the connection configuration. |
Delete Connection |
Allows you to delete the connection configuration. |
Test Connection |
Allows you to test the JNDI Properties of the connection configuration. |
After the connections have been configured, processes may be defined and configured. As an administrator, you can access the Connection Configuration Page by clicking Administration then Oracle BPEL Administration. Click Process Configurations. The Process Configurations page is displayed.
This page shows process configurations and each has an Actions drop-down menu that offers the following choices.
Element | Description |
---|---|
Add Process |
Allows you to add an additional process configuration. |
Configuration Information |
Opens the Configuration Information page for the process configuration. |
Update Process |
Enables you to edit the BPEL process and operation. |
Update Payload |
Enables you to edit the mappings from content item fields to payload properties. |
Delete Configuration |
Enables you to delete the process configuration. |
Test Connection |
Allows you to test the JNDI Properties of the connection configuration. |
After you create a process configuration, you need to define process properties and payload mappings. See Process Properties for information on how to edit process properties. See Payload Mappings for information about how to edit field mappings.
Process properties identify the BPEL process and the BPEL operation used to initiate a new process. To edit process properties, click Update Process… from the Actions menu. The Update BPEL Process page is displayed.
The fields on this page are defined in the following table.
Element | Description |
---|---|
BPEL Process |
The process identifier of a deployed, active BPEL process. Each active process is listed with the Process Name and Process Revision. The default revision for each process is identified with an asterisk (*). |
BPEL Operation |
The name of an operation to initiate a process. |
Payload mappings define how Content Server fields and literal values are mapped to payload properties to initiate a process.
To edit payload mappings, click Update Payload from the Actions menu. The Update BPEL Process: Payload Mapping page is displayed.
This page displays a form with three columns. Each of the columns is defined in the following table.
Element | Description |
---|---|
Field |
The name of the payload element to which values are mapped. |
Type |
The type of payload element. This is used to filter the options displayed in the value option list. Complex types contain other types. If the type is an array of elements, then the value mapping may be a comma-separated list that is parsed by the component. |
Mapping |
Used to identify the name of a Content Server field. These fields are the standard Content Item fields (dID, dDocName, dDocTitle, etc.), custom information fields, and some special system fields. The possible special fields are: |
HttpAbsoluteCgiPath - The absolute CGI path to the Content Server. |
|
HttpAbsoluteWebRoot - The absolute path to the Content Server web root. |
|
idcReference - Creates a string with a value of "socket:<HttpServerAddress>:<HttpServerPort>" |
|
DocUrl - The computed URL to the web viewable file. |
|
ContentViewLink - The computed URL to a content view page, showing a view of the content and links to content information. |
|
@Literal - Allows you to assign a literal value. When this option is chosen, an additional text entry field is displayed to provide the value. You can enter array values using comma-separated notation. |
Figure C-4 shows an example of field mappings.
On this page, the following mapping is established:
The taskId payload field is assigned the value of the content's dID.
The title payload field is assigned the value of the content's Title.
The creator payload field is assigned the literal value of sysadmin.
The WebCenter Content integration with BPEL requires that the BPEL composite has a binding.adf entry in its service. This binding allows WebCenter Content to invoke the BPEL as a service and allows it to set the conversation id to later query SOA for status.
Consequently, when creating a BPEL composite and making it available to WebCenter Content, the following must be done:
Open the composite in jdeveloper.
Open the composite.xml in source mode.
Find the service definition.
Add the following line to the service definition, where the serviceName is something meaningful of your choosing and registryName must be empty.
<binding.adf serviceName="YourUniqueServiceName" registryName=""/>
A possible composite example is as follows:
<service name="receive" ui:wsdlLocation="receive.wsdl"> <interface.wsdl interface="http://oracle.com/sca/soapservice/aug11_app_2/myThirdComposite/receive#wsdl.interface(execute_ptt)"/> <binding.ws port="http://oracle.com/sca/soapservice/aug11_app_2/myThirdComposite/receive#wsdl.endpoint(receive/execute_pt)"/> <binding.adf registryName="" serviceName="my3rdBPELService"/> </service>
This can also be done using jdeveloper widgets, but they require a non-empty registryName. The registryName for a composite without adf is empty and the composite examples given here need the registry name to be empty. If they are not empty, API calls do not work properly after invoking the composite via the standard SOA.
The following topics are covered in this section:
To integrate with BPEL process manager, you must first configure a Content Server workflow. There are many possible ways to configure a workflow. The following tasks configure the most basic type of workflow that integrates with BPEL process manager.
Start the Workflow Administration applet.
Add a new Criteria Workflow. For this example, the workflow name is orabpeltest.
Add a step to the workflow. For this example, use initiateprocess as the step name.
Add step users.
Select the Exit Conditions tab and select at least one reviewer. (This is an arbitrary setting, but in this instance, it leaves the content item in this workflow step after a BPEL process is initiated.)
Add an exit condition by selecting the Use Additional Exit Condition checkbox and then clicking Edit…
In the Edit Additional Exit Condition dialog, check the Custom Condition Expression and add the following script:
wfGet("conversationId") and obIsInstanceClosed("process_3", wfGet("conversationId"))
Note:
Note that the Idoc Script function obIsInstanceClosed
tests if the BPEL instance with the specified conversation ID is still open. The conversation ID is stored in the workflow companion data when the process is invoked.
On the Events tab, click Edit… for the Entry event.
In the Edit Script dialog, click the Custom tab.
Click on the Custom Script Expression checkbox to enable the script window.
Type the following lines into the script window:
<$if not conversationId$> <$obConfigID="process_3"$> <$obInvokeProcess(obConfigID)$> <$endif$>
Note:
The component defines Idoc Script functions that can be used to start and determine the state of an invoked process. The obInvokeProcess
Idoc function takes the name of the process configuration ID as its one argument. Alternatively, you can use the ORABPEL_INVOKE_BPEL
service. This service requires the obConfigID
variable to be set to the name of a process configuration. The service reads the process configuration and uses it to determine how to connect to BPEL process manager.
Click OK to finish editing the script.
Click OK to finish editing the workflow step.
Enable the workflow.
When a content item enters the workflow and initiates a BPEL process, an identifier is created and stored in the companion data file to identify the related BPEL process. This identifier is stored with the key "conversationId" and can be obtained from the companion data with custom Idoc Script in a workflow step event.
Idoc Script Functions
obInvokeProcess[obConfigID]: This function invokes the process as defined in the process configuration.
obIsInstanceClosed[obConfigID, conversationId]: This function returns true if the process as specified by the specified configuration with the given conversation ID has been closed. Closed includes completed and cancelled.
obIsInstanceOpen[obConfigID, conversationId]: This function returns true if the process as specified in the specified configuration and the given conversation ID is open.
obRetrieveStatus[obConfigID, conversationId]: This function returns true if it successfully retrieves information about the process. The data binder has information about the instance title, audit trail, trace and metadata as well as the process instance id and revision tag.