Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle Business Process Management
11g Release 1 (11.1.1.7)

Part Number E15175-15
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

A Creating Custom ADF Applications with Oracle Business Process Management Workspace Task Flows

Different features available in Process Workspace are exposed as standalone reusable components, called task flows. This appendix provides basic information about the features in each task flow.

You can embed task flows in any Oracle Application Development Framework (ADF) application. These standalone task flows provide many parameters that enable you to build customized applications.

All the task flows are bundled in an ADF library that you can include in the application in which you are embedding.

Later, in Section A.5, "Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows," a sample task flow using TaskListTaskFlow shows detailed steps for embedding the task flow in the application as well as customizing, deploying, and running it.

For descriptions of the various task flows, see Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management.

This appendix covers the following topics:

Note:

This appendix assumes that you are familiar with both Oracle Application Development Framework and security.

A.1 User-Related Task Flows

This section contains these topics:

A.1.1 Task List Task Flow

The task flow takes in the parameters to control how the embedded region displays. This section discusses the following parameters:

For the full list of parameters, see Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management.

Figure A-1 Process Workspace Tasks Page

Description of this graphic follows.
Description of "Figure A-1 Process Workspace Tasks Page"

A.1.1.1 federatedMode

If you set this parameter to true, then the task list is shown in the federated mode. For the task flow to run in federated mode, you must pass the list of federated servers to the task flow. For instructions about how to pass a list of federated servers to the task flow, see Section A.1.1.2, "federatedServers".

A.1.1.2 federatedServers

To pass the federated servers list to the task flow, do one of the following:

  • Provide the client configuration file, wf_client_config.xml, in the class path The class path is either APP-INF\classes\wf_client_config.xml at the ear level or the WEB-INF\classes of the web application. The client configuration file contains all federated server details.

    For a sample .wf_client_config.xml file, see Section A.6, "Sample: Wf_client_config.xml File".

  • Construct a JAXB object that contains the federated servers list. This JAXB object can be passed to the task flow through the federatedServers parameter. The object should be returned by a backing bean method.

    For a sample bean with the method returning the WorkflowServicesClientConfigurationType object, see Section A.7, "Sample: Bean with the Method Returning the WorkflowServicesClientConfigurationType Object"

If you provide both the client configuration file wf_client_config.xml and the JAXB object to the task flow, the JAXB object takes precedence.

A.1.1.3 showServerColumn

If the task flow is run in federated mode, the server column in the task list is not shown by default. To show the server column in the task list, this parameter must be passed as "true".

A.1.1.4 wfCtxID

This is a workflow context token string. It is used to create workflow context inside the task flow.

Note:

If the application is SSO-enabled or is secured using ADF security, this parameter is not required. Otherwise, this parameter is required.

To get the workflow context identifier:

Run the following:

IWorkflowContext wfCtx = wfSvcClient.getTaskQueryService().authenticate(username,

password,

realm,

null);

wfCtxID = wfCtx.getToken();

A.1.2 Certificates Task Flow

A digital certificate contains the digital signature of the certificate authority so that anyone can verify that the certificate is real. A digital certificate establishes the participant's credentials. It is issued by a certification authority. It contains your name, a serial number, expiration dates, a copy of the certificate holder's public key (used for encrypting messages and digital signatures), and the digital signature of the certificate-issuing authority so that a recipient can verify that the certificate is real

As Figure A-2 shows, when you want to sign a decision, you can upload your digital certificate. When signing a task outcome by using your certificate, you must upload not only the one certificate issued to you by the certification authority but the entire chain of certificates. Upload the chain as a .P7B (PKCS7 format) file.

Figure A-2 Uploading a Certificate

Description of this graphic follows.
Description of "Figure A-2 Uploading a Certificate"

To create an application and embed the Certificates task flow in the application, follow all the steps of Section A.5, "Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows" except Step 9. This is because certificates have no parameters.

A.1.3 Reports Task Flow

For information about the Reports task flow, see Section 7.6, "Using Reports to Manage Workflows in Process Workspace."

To create an application and embed the Reports task flow in the application, follow all the steps of Section A.5, "Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows" except Step 9. This is because Reports have no parameters.

A.1.4 Application Preferences Task Flow

For information about the Application Preferences task flow, see Section 9.2, "Setting the Display of the Work Items Panel in Process Workspace".

To create an application and embed the Application Preferences task flow in it, follow all the steps of Section A.5, "Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows" except Step 9. This is because application preferences have no parameters.

A.1.5 Flex Fields Task Flow

For information about the Flex Fields task flow, see Section 9.4, "Managing Mapped Attributes (Flex Fields) in Process Workspace".

To create an application and embed the Flex Fields task flow in it, follow all the steps of Section A.5, "Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows" except Step 9. This is because flex fields have no parameters.

A.1.6 Rules Task Flow

For information about the Rules task flow, see Section 2.6.1, "How to Create User Rules in Process Workspace".

The showOtherUsersRules parameter takes a Boolean value. When it is passed as True, other users rules are displayed; when it is passed as False, other user rules are not shown. In addition, this user must have the required permission to view other user rules.

To create an application and embed the Rules task flow in it, follow all the steps of Section A.5, "Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows" except Step 9. This is because rules fields have no parameters.

A.2 Process Task Flows

This section contains these topics:

A.2.1 Process Application Task Flow

The applications available in Process Workspace depend on the process design and the roles assigned to the user currently logged in. The list of applications available also depends on the BPM processes that are deployed and running. The applications panel will be empty if no processes are running, or if the user is not able to execute an application in any of the processes currently running. Figure A-3 shows the location of the Applications panel in Process Workspace.

Figure A-3 Applications Panel

Description of this graphic follows.
Description of "Figure A-3 Applications Panel"

Table A-1 Process Applications Task Flow

Field Description

Task Flow definition file:

processApplicationsTaskflow.xml

Description:

Renders the list of applications available to the user, that is, the list of tasks that, when executed, will create instances in the different deployed processes.

Arguments:

None


A.2.2 Process Instances Task Flow

Table A-2 Process Instances Task Flow

Field Description

Task Flow definition file:

processInstancesTaskflow.xmll

Description:

Renders the list of instances corresponding to a certain view (by default, Inbox view) in a table format. The columns that this table will show are defined by the presentation associated to the selected view, which can be edited from here. It also provides search capabilities.

Arguments:

viewId: specifies the view that will be rendered initially. By default, Inbox is assumed.


A.2.3 Process Instance Details Task Flow

Table A-3 Process Instances Task Flow

Field Description

Task Flow definition file:

processInstanceDetailTaskflow.xmll

Description:

Renders the instance details, including open activities, audit trail (both tabular and graphical), comments and attachments.

Arguments:

instanceId: Task Flow will render the details associated to this instance ID.


Figure A-4 Work Items Details Panel

Description of this graphic follows.
Description of "Figure A-4 Work Items Details Panel"

A.3 Process Analytics Task Flows

This section contains these topics:

A.3.1 Dashboard Widget Task Flow

Table A-4 Dashboard Widget Task Flow

Field Description

Task Flow definition file:

widgetTaskflow.xml

Description:

Renders a widget, that is, a graph displaying information stored in Cubes. This widget could be one of the out of the box ones (like Workload per Participant, Performance per Process, etc.) or a custom one.

Arguments:

widgetId: The ID of the widget that will be rendered.

showSelector: A Boolean value (true/false) stating whether the task flow will render a drop down listing all available widgets, so that the user can select and change from one widget to other.


Figure A-5 Process Performance Dashboard

This illustration is described in the text.

A.3.2 Application Roles Task Flow

Application Roles task flow displays the list of application roles defined in the system for application context OracleBPMProcessRolesApp. The user can search for application roles, select a role and add members (users, groups or other roles) to it or even define business calendar-organization unit mappings for the role.

Figure A-6 Role Details Panel

Description of this graphic follows.
Description of "Figure A-6 Role Details Panel"

A.3.3 Organization Units Task Flow

This task flow enables users to create new organization units or edit existing ones.

For information about the Organization Units task flow, see Chapter 10, "Managing Your Organization in Process Workspace".

Figure A-7 shows an Organization Units details panel.

Figure A-7 Organization Units Details Panel

Description of this graphic follows.
Description of "Figure A-7 Organization Units Details Panel"

A.3.4 Parametric Roles Task Flow

For information about the Parametric Roles task flow, see Section 10.6, "Managing Parametric Roles in Process Workspace".

A.3.5 Business Calendar and Holiday Lists Task Flow

For information about the Business Calendar and Holiday List task flow, see Section 10.3, "Managing Calendar Rules in Process Workspace" and Section 10.2, "Managing Holiday Rules in Process Workspace".

A.3.6 Extended User Properties Task Flow

For information about the Extended User Properties task flow, see Section 10.7, "Managing Extended User Properties in Process Workspace".

A.4 .JAR files for the Task Flows

Table A-5 JAR Files for Task Flows

JAR File Location

adflibTaskListTaskFlow.jar

$FMW_HOME/Oracle_WC1/soa/modules/oracle.bpm.spaces_11.1.1

oracle.bpm.workspace-adflib.jar

This .jar file is packaged only with a Process Spaces installation. It includes the following libraries that you must specify in your custom ADF application:

  • adf.oracle.domain

  • oracle.bpm.runtime

  • oracle.bpm.client

  • oracle.soa.workflow.wc

  • oracle.bpm.webapp.common

  • oracle.bpm.workspace

  • oracle.bpm.projectlib

adflibWorkspaceTaskFlows.jar

$FMW_HOME/AS11gR1SOA/soa/modules/oracle.soa.worklist_11.1.1


A.5 Samples: Customizing ADF Applications with Oracle Business Process Management Workspace Task Flows

This section contains these topics:

A.5.1 Sample 1: Creating an Application with an Embedded Tasklist Task Flow

The sample explains how to create an application and embed the TaskList task flow in it.

The Tasklist ADF library jar file adflibTaskListTaskFlow.jar needs to be in the class path. This jar is available in Oracle JDeveloper in the BPM Worklist Components library.

What follows are the steps to embed the task flow in your application. You can use these same steps to create a new sample.

To embed the Tasklist task flow in your application:

  1. Create a new Fusion Web Application in Oracle JDeveloper and name it TaskListTaskFlowSample.

    Figure A-8 Creating New Oracle Fusion Middleware Application

    Description of this graphic follows.
    Description of "Figure A-8 Creating New Oracle Fusion Middleware Application"

  2. Add the task flow jar adflibTaskListTaskFlow.jar in the project's class path. Include the BPM Worklist Components library from the Libraries and Classpath section of the JDeveloper and add the library. This library also contains the adflibWorklistComponents.jar that must also be in the classpath.

    Figure A-9 Adding BPM Worklist Component Library

    Description of this graphic follows.
    Description of "Figure A-9 Adding BPM Worklist Component Library"

  3. Add the BPM Services library in the class path.

    Figure A-10 Adding BPM Services Library

    Description of this graphic follows.
    Description of "Figure A-10 Adding BPM Services Library"

  4. Add the WSRP Container library in the classpath.

    Figure A-11 Adding the WSRP Container Library

    Description of this graphic follows.
    Description of "Figure A-11 Adding the WSRP Container Library"

  5. In case you are running your application on non-soa server, you need to perform two additional steps that are documented in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

    1. Install the oracle.soa.workflow shared library. If your server already has oracle.soa.workflow.wc installed, then you do not need to install oracle.soa.workflow.

      For information about installing the oracle.soa.workflow shared library, see Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

    2. Configure foreign JNDI on the non-SOA server.

      For information about configuring a foreign JNDI on the non-soa server, see Oracle Fusion Middleware Programming JNDI for Oracle WebLogic Server.

      Note:

      If you are running the Task List task flow in federated mode, then you do not need to do this step. See the parameter "federatedMode" on how to use task flow in federated mode.

  6. Create a JSPX file testSample.jspx.

    Figure A-12 Creating a a JSPX File

    Description of this graphic follows.
    Description of "Figure A-12 Creating a a JSPX File"

  7. Choose adflibTaskListTaskFlow.jar from the component palette. It contains the list of all the Task Flows.

    Figure A-13 Choosing adflibTaskListTaskFlow.jar

    Description of this graphic follows.
    Description of "Figure A-13 Choosing adflibTaskListTaskFlow.jar"

  8. Drag and drop one of the Task Flow onto the JSPX page as a region. Figure A-14 shows, by way of example, the TaskListTaskFlow being dropped onto the JSPX page as a region.

    Figure A-14 Oracle JDeveloper with TaskList Task Flow on the JSPX Test Page

    Description of this graphic follows.
    Description of "Figure A-14 Oracle JDeveloper with TaskList Task Flow on the JSPX Test Page"

    When you drag a task flow onto a JSPX page, a popup shows a list of the available parameters. For a description of these parameters, see Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management.

    The Edit Task Flow Binding dialog box appears.

  9. In the Edit Task Flow Binding dialog box, pass the task flow parameters.

    Figure A-15 Passing Task Flow Parameters

    Description of this graphic follows.
    Description of "Figure A-15 Passing Task Flow Parameters"

    The following entry is created in the testSamplePagedef.xml.

    <taskFlow id="taskListtaskflowdefinition1"
    taskFlowId="/WEB-INF/taskList-task-flow-definition.xml#taskList-task-flow-definition"
    xmlns="http://xmlns.oracle.com/adf/controller/binding">
    <parameters><parameter id="federatedMode" value="true"xmlns="http://xmlns.oracle.com
    /adfm/uimodel"/>
    <parameter id="showServerColumn" value="true"
    xmlns="http://xmlns.oracle.com/adfm/uimodel"/>
    </parameters>
    </taskFlow>
    
  10. Add the following shared libraries in weblogic-application.xml. If you have oracle.soa.workflow.wc installed on your server, add that library by specifying the following.

    <library-ref>
    <library-name>oracle.soa.workflow</library-name>
    </library-ref>
    
  11. Open and edit the WAR deployment profile for editing. To do this:

    1. Right Click ViewController.

    2. Select Deployment.

    3. Select WAR File.

    4. Click Edit.

    5. Check adflibTaskListTaskFlow.jar, adflibWorklistComponents.jar and wsrp-container.jar.

    Figure A-16 Editing the WAR Deployment Profile

    Description of this graphic follows.
    Description of "Figure A-16 Editing the WAR Deployment Profile"

  12. Secure the application using ADF Security by navigating Secure then Configure ADF Security… from the application-level menu as Figure A-17 shows.

    Figure A-17 Navigating to Secure the Application

    Description of this graphic follows.
    Description of "Figure A-17 Navigating to Secure the Application"

    The Enable ADF Security dialog box appears.

  13. Select ADF Authentication as shown in Figure A-18.

    Figure A-18 Selecting ADF Authentication

    Description of this graphic follows.
    Description of "Figure A-18 Selecting ADF Authentication"

    Click Next. The Select Authentication Type dialog box appears.

    Note:

    If you choose ADF Authentication and Authorization, do the following:

    1. In the Application Resources - Descriptors - META-INFO folder, open jazn-data.xml.

    2. Select Resource Grants.

    3. Select Task Flow type.

    4. Select Show task flows imported from ADF libraries.

      The taskflows are listed in the Resources listing.

    5. Select the appropriate taskflow that you have consumed in the application—for example, taskList-task-flow-definition (For the task drill functionality to work, taskList-task-flow-definition also requires permission for /taskDetail-task-flow-definition).

    6. Add Granted to selected role for the "view" permission.

  14. Select HTTP Basic Authentication as shown in Figure A-19.

    Figure A-19 Selecting HTTP Basic Authentication

    Description of this graphic follows.
    Description of "Figure A-19 Selecting HTTP Basic Authentication"

    For information about enabling ADF security in a Fusion web application see Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

    Click Finish.

    Note:

    If you are using the task flow in federated mode, do the following:

    • Pass the list of federated servers to the task flow. For more information, see Section A.1.1.2, "federatedServers."

    • Enable global trust between the federated servers. This is done so that the already ted user token is passed to all the federated servers. Do the following:

      1. Login to the Oracle WebLogic Server console.

      2. Under Domain Structures, select the domain name base_domain. The domain name may be different if a non-soa server is used. You can rename the domain name during configuration.

      3. Select the Security tab.

      4. Click the Advanced link (near the bottom Save button.)

      5. Give some password in the "Credential:" field. (The same password needs to be given for all the federated servers).

      6. Click Save.

      7. Restart the server.

  15. Create an EAR deployment profile, build the EAR, and deploy it. To deploy the EAR, do the following:

    1. From the application-level menu, navigate to Deploy then TaskListTaskFlowSample_Appl....

      Figure A-20 Deploying the Application

      Description of this graphic follows.
      Description of "Figure A-20 Deploying the Application"

      The Deployment Action dialog box appears.

    2. Select Deploy to Application Server as shown in Figure A-21.

      Figure A-21 Deploying to Application Server

      Description of this graphic follows.
      Description of "Figure A-21 Deploying to Application Server"

      Click Next. The Select Server dialog box appears.

  16. Select the server. Deselect Deploy to all Server instances in the domain. Click Next.

    The Server Instances dialog box appears.

  17. Select the server instance and click Finish.

  18. Access the following link, specifying the proper values for server and port. http://server:port/TaskListTaskFlowSample-ViewController-context-root/faces/testSample.jspx.

    A login popup appears. Log in as any user. The task list appears for the logged-in user as shown in Figure A-22.

    If the task flow is used in federated mode, then the list of servers appear in the Show list. Selecting any combination of servers from the list refreshes the task list to show all the tasks belonging to the selected servers. If you passed the parameter showServerColumn as true, then the server column appears in the task list and indicates the server to which the task belongs.

    Figure A-22 Process Workspace Task List

    Description of this graphic follows.
    Description of "Figure A-22 Process Workspace Task List"

    Click on any of the tasks title links to see the task details in a new browser window.

A.5.2 Sample 2: Creating an ADF Page with Task Flows

This sample shows how to create an ADF page and add three task flows to the page.

The page will be divided into two parts. If the user selects TaskFlow from left side, the corresponding task flow appears on the right side.

To create the ADF page with task flows:

  1. Follow Steps 1 to 6 of Section A.5.1, "Sample 1: Creating an Application with an Embedded Tasklist Task Flow.".

  2. Configure the JSPX page as follows:

    1. In Component Palette, select ADF Faces.

    2. Drag and drop the Panel Stretch Layout on to the JSPX page.

    3. Delete Top, Start, Bottom, and End from the JSPX page. The JSPX page will look like Figure A-23.

    Figure A-23 Configuring the JSPX Page

    Description of this graphic follows.
    Description of "Figure A-23 Configuring the JSPX Page"

  3. Drag and drop the Panel Splitter from the Component Palette into the JSPX page. The JSPX page now appears as shown in Figure A-24.

    Figure A-24 Split Panel in the JSPX Page

    Description of this graphic follows.
    Description of "Figure A-24 Split Panel in the JSPX Page"

  4. In the navigator, right-click the View Controller and create a new Java Class. Name it SampleController.java.

    Add private transient UIComponent rightPanel = null; with getters and setters as shown in Figure A-25.

    Figure A-25 Creating SampleController.java

    Description of this graphic follows.
    Description of "Figure A-25 Creating SampleController.java"

  5. In the navigator, select the Faces-config.xml file. Specify the Managed Bean, naming it as sampleControllerBean as shown in Figure A-26.

    Figure A-26 Specifying the Managed Bean

    Description of this graphic follows.
    Description of "Figure A-26 Specifying the Managed Bean"

  6. Drag and Drop Panel Stretch Layout on to the Second Facet. Delete Top, Start, Bottom, End from it. And Specify a binding for PanelStrechLayout from the Property Inspector as #{sampleControllerBean.rightPanel}.

  7. Drag and drop a link from the Component Palette into the JSPX page. In the Property Inspector specify the text as Rules. In SampleController Java file, add the following code:

    private String selectedLink = "RULES"; with getter and setters

    public void displayRules(ActionEvent event){

    setSelectedLink("RULES");

    if(getRightPanel() != null){

    RequestContext.getCurrentInstance().addPartialTarget(getRightPanel());

    } }

    Add the Action Listener property for the rules as follows:

    #{sampleControllerBean.displayRules}

  8. Drag and drop a link from the Component Palette into the JSPX page. In the Property Inspector, specify the text as Certificates. In the SampleController Java file, add following code:

    public void displayCertificates(ActionEvent event){

    setSelectedLink("CERTIFICATES");

    if(getRightPanel() != null){

    RequestContext.getCurrentInstance().addPartialTarget(getRightPanel());

    } }

    Add the Action Listener property for the certificates as follows:

    #{sampleControllerBean. displayCertificates }

  9. Drag and drop a link from the Component Palette into the JSPX page. In the Property Inspector, specify the text as Reports. In the SampleController Java file, add following code:

    public void displayReports(ActionEvent event){

    setSelectedLink("REPORTS");

    if(getRightPanel() != null){

    RequestContext.getCurrentInstance().addPartialTarget(getRightPanel());

    } }

    Add the Action Listener property for the reports as follows:

    #{sampleControllerBean. displayReports}

  10. Drag and drop a switcher from the Component Palette into the center facet of the second facet.

    In the Property Inspector, specify:

    • the facet name as #{sessionScope.sampleControllerBean.selectedLink}"

    • the default faces as RULES

    Figure A-27 Adding and Specifying a Switcher

    Description of this graphic follows.
    Description of "Figure A-27 Adding and Specifying a Switcher"

  11. Inside af:switcher define a facet and name it f:facet name="RULES". Inside this facet, drag and drop Rules-Task-Flow-Definition from the Component Palette (inside adflibTaskListTaskFlow.jar).

  12. Inside af:switcher define another facet and name it f:facet name="CERTIFICATES". Inside this facet, drag and drop Certificates-Task-Flow-Definition from the Component Palette (inside adflibTaskListTaskFlow.jar)

  13. Inside af:switcher define another facet and name it f:facet name="REPORTS". Inside this facet drag and drop Reports-Task-Flow-Definition from the Component Palette (inside adflibTaskListTaskFlow.jar)

  14. Save your work.

  15. Follow Steps 10 to 11 of Section A.5.1, "Sample 1: Creating an Application with an Embedded Tasklist Task Flow."

A.6 Sample: Wf_client_config.xml File

This section provides a sample of the client configuration file, Wf_client_config.xml.

If you don't want to include the server in the federated servers list, put excludeFromFederatedList="true" in the <server> element.

The client type needs to be specified explicitly on the <server> element in the XML.

In Example A-1, REMOTE client type is used.

Example A-1 Wf_client_config.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workflowServicesClientConfiguration
xmlns="http://xmlns.oracle.com/bpel/services/client">
<server name="default" default="true" excludeFromFederatedList="true" clientType="REMOTE">
      <localClient>
<participateInClientTransaction>false</participateInClientTransaction>
      </localClient>
      <remoteClient>
         <serverURL>t3://sta00048.ex.example.com:7001</serverURL>
<initialContextFactory>weblogic.jndi.WLInitialContextFactory</initialContextFactory>
<participateInClientTransaction>false</participateInClientTransaction>
      </remoteClient>
      <soapClient>
         <rootEndPointURL>http://sta00048.ex.example.com:7001</rootEndPointURL>
         <identityPropagation mode="dynamic" type="saml">
            <policy-references>
               <policy-reference enabled="true" category="security"
                                 uri="oracle/wss10_saml_token_client_policy"/>
            </policy-references>
         </identityPropagation>
      </soapClient>
   </server>
   <server name="ERP" clientType="REMOTE">
      <soapClient>
         <rootEndPointURL>http://sta00147.ex.example.com:7001</rootEndPointURL>
         <identityPropagation mode="dynamic" type="saml">
            <policy-references>
               <policy-reference enabled="true" category="security"
                                 uri="oracle/wss10_saml_token_client_policy"/>
            </policy-references>
         </identityPropagation>
      </soapClient>
      <remoteClient>
         <serverURL>t3://sta00147.ex.example.com:7001</serverURL>
<initialContextFactory>weblogic.jndi.WLInitialContextFactory</initialContextFactory>
         <participateInClientTransaction>false</participateInClientTransaction>
      </remoteClient>
   </server>
   <server name="CRM" clientType="REMOTE">
      <soapClient>
         <rootEndPointURL>http://sta00048.ex.example.com:7001</rootEndPointURL>
         <identityPropagation mode="dynamic" type="saml">
            <policy-references>
               <policy-reference enabled="true" category="security"
                                 uri="oracle/wss10_saml_token_client_policy"/>
            </policy-references>
         </identityPropagation>
      </soapClient>
      <remoteClient>
         <serverURL>t3://sta00048.ex.example.com:7001</serverURL>
<initialContextFactory>weblogic.jndi.WLInitialContextFactory</initialContextFactory>
         <participateInClientTransaction>false</participateInClientTransaction>
      </remoteClient>
   </server>
</workflowServicesClientConfiguration>

A.7 Sample: Bean with the Method Returning the WorkflowServicesClientConfigurationType Object

This section provides a sample: bean with the method returning the WorkflowServicesClientConfigurationType object.

Note:

You must set the client type explicitly while building the JAXB object. For example:

ServerType server1 = new ServerType();

server1.setClientType("REMOTE"); // If REMOTE client is to be used.

Or:

server1.setClientType("SOAP"); // If SOAP client is to be used.

If you do not specify anything for the client type, the default is SOAP.

package view;

import java.util.List;

import oracle.bpel.services.workflow.client.config.IdentityPropagationType;
import oracle.bpel.services.workflow.client.config.PolicyReferenceType;
import oracle.bpel.services.workflow.client.config.PolicyReferencesType;
import oracle.bpel.services.workflow.client.config.RemoteClientType;
import oracle.bpel.services.workflow.client.config.ServerType;
import oracle.bpel.services.workflow.client.config.SoapClientType;
import oracle.bpel.services.workflow.client.config.WorkflowServicesClientConfigurationType;
import weblogic.nodemanager.common.ServerType;

public class WorklistBackingBean {
  WorkflowServicesClientConfigurationType wscct = null;

  public WorklistBackingBean() {
    super();
  }

  public WorkflowServicesClientConfigurationType getWSCC() {
    if (wscct == null) {      
      wscct = new WorkflowServicesClientConfigurationType();
      List<ServerType> servers = wscct.getServer();
      /**** Setting default server in the list ****/
      ServerType defaultServer = new ServerType();
      defaultServer.setClientType("SOAP");
      servers.add(defaultServer);
      defaultServer.setDefault(true);
      //If this is true, the server is excluded from federated server list
      //By defalut it is false
      //defalutServer.setExcludeFromFederatedList(true);
      defaultServer.setName("default");
      RemoteClientType rct = new RemoteClientType();
      rct.setServerURL("t3://defaultHost:port");
      rct.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
      rct.setParticipateInClientTransaction(false);
      defaultServer.setRemoteClient(rct);
      SoapClientType sct = new SoapClientType();
      PolicyReferencesType prts = new PolicyReferencesType();
      PolicyReferenceType prt = new PolicyReferenceType();
      prt.setEnabled(true);
      prt.setCategory("security");
      prt.setUri("oracle/wss10_saml_token_client_policy");
      prts.getPolicyReference().add(prt);
      IdentityPropagationType ipt = new IdentityPropagationType();
      ipt.setMode("dynamic");
      ipt.setType("saml");
      ipt.setPolicyReferences(prts);
      sct.setRootEndPointURL("http://defaultHost:port");
      sct.setIdentityPropagation(ipt);
      defaultServer.setSoapClient(sct);
      /****** Setting Federated Server 1 to the list ****/
      ServerType server1 = new ServerType();
      server1.setClientType("SOAP");
      servers.add(server1);
      server1.setName("Human Resource");
      RemoteClientType rct1 = new RemoteClientType();
      rct1.setServerURL("t3://HumanResourcesHost:port");
      rct1.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
      rct1.setParticipateInClientTransaction(false);
      server1.setRemoteClient(rct1);
      SoapClientType sct1 = new SoapClientType();
      PolicyReferencesType prts1 = new PolicyReferencesType();
      PolicyReferenceType prt1 = new PolicyReferenceType();
      prt1.setEnabled(true);
      prt1.setCategory("security");
      prt1.setUri("oracle/wss10_saml_token_client_policy");
      prts1.getPolicyReference().add(prt1);
      IdentityPropagationType ipt1 = new IdentityPropagationType();
      ipt1.setMode("dynamic");
      ipt1.setType("saml");
      ipt1.setPolicyReferences(prts1);
      sct1.setRootEndPointURL("http://HumanResourcesHost:port");
      sct1.setIdentityPropagation(ipt1);
      server1.setSoapClient(sct1);

    }
    return wscct;
  }
}