Tuesday Sep 01, 2009

HWF in 11g

I recognize that there are few changes made from 10g Worklist API to 11g. I've tried figuring out how I can use it in 11g just like old days, and finally got my sample code working successfully. here I'll describe the basic things to use HWF in 11g.

in 10g, we have to have wf_client_config.xml in classpath to set the soap endpoints and ejb lookup properties which is used by worklist client. in 11g, you have two choices. just like old days, you can have wf_client_config.xml, or you can hand properties to Factory which precede the configuration file.

Speaking about Properties, we're using oracle.bpel.services.workflow.client.IWorkflowServiceClientConstants to set the connection properties. look at the simple example below:


Map
properties = new
HashMap();

properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.MODE, IWorkflowServiceClientConstants.MODE_DYNAMIC);

properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, "t3://localhost:8001");

properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, "welcome1");

properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, "weblogic");

IWorkflowServiceClient wfSvcClient =
WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT,
properties, null);

IWorkflowContext ctx = null;
ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();


and configuration file, u can use the sample as below:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<workflowServicesClientConfiguration xmlns="http://xmlns.oracle.com/bpel/services/client">

  <server name="default" default="true">

    <localClient>

        <participateInClientTransaction>false</participateInClientTransaction>

    </localClient>

    <remoteClient>

         <serverURL>t3://localhost:7001</serverURL>

    <userName>weblogic</userName>

         <password>weblogic</password>

         <initialContextFactory>weblogic.jndi.WLInitialContextFactory</initialContextFactory>

         <participateInClientTransaction>false</participateInClientTransaction>

    </remoteClient>

    <soapClient>

        <rootEndPointURL>http://localhost: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>  

</workflowServicesClientConfiguration>

store it as wf_client_config.xml and put it under the classpath.

I've tried SOAP_CLIENT with no success yet. once I find the answer, I'll share this,too.

[Read More]
About

Solution & Technology Architect, Asia Pacific

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today