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.


Comments:

Where do i need to keep the wf_client_config.xml and in which directory ??Any pointers to it is appreciated..

Posted by Sumit on July 07, 2011 at 01:33 AM PDT #

Sumit,

just put it in CLASSPATH. simply put it under WEB-INF\classes will work.

Thanks

Posted by Jay Lee on July 08, 2011 at 02:39 AM PDT #

Hi,

I have custom worklist code in a web app which invokes soa human task app. Both apps sits in different weblogic server domains.I would like to pass user credentials from worklist app to soa human task app and I will validate the user at soa human task app using owsm policies.

So I beleive I need to construct the username token and use SOAP client in worklist app to call soa human task app. Does this support using soap client in worklist app? Please provide some inputs.

Thanks

Posted by guest on June 12, 2012 at 10:46 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Solution & Technology Architect, Asia Pacific

Search

Archives
« April 2015
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