Java CAPS Tip : Integration JavaCAPS Work List Manager with Sun DSEE 6.x and Glassfish

Although the currently available JavaCAPS documentation describes the integration of the WorkList Manager(WLM) with Sun Directory Server it does not provide a practical example. One of the key features of the WLM is the API which will allow the advanced developer to build GUI based applications using interfaces other than the standard eVision. To do this the WLM API EJB needs to be configured to integrate with the chosen DSEE instance. I will assume that the reader has and configured DSEE instance and will only discuss the functionality / configuration I require.

DSEE Configuration

This article assumes that we have the following structure within the DSSE:

  • Directory Suffix dc=wlm,dc=sun,dc=com
  • Suffix populated with sample data, ldif available here, matching the image below
data=Suffix Structure
  • The entries in the Groups ou are defined as groupOfUniqueNames
  • The entries in the People ou are defined as inetOrgPerson
  • DSEE resides on a host called wlmhost  

If you are creating the suffix using DSCC then simply populating it with example data will produce the same structure.

JavaCAPS Environment Configuration

Although some of the configuration information defaults to the correct value I prefer to specify the information explicitly, as can be seen in the image below, with the following being the key configuration parameters:

  • Users ParentDN : ou=People,dc=wlm,dc=sun,dc=com
  • Roles ParentDN : dc=wlm,dc=sun,dc=com
  • Group ParentDN : ou=Groups,dc=wlm,dc=sun,dc=com
  • The value for the Subordinate entry is changed from the default "directReports" because this is not available within the Sun DSEE as a default attribute for inetOrgPerson.

JavaCAPS Environment

WLM DB Configuration

Once created your JavaCAPS environment is configured to interface with you DSEE instance. When adding WLM API components within you eInsight process the Directory can be accessed using the parameters specified above.

WLM WorkflowService.jar Configuration

To allow you to access the WLM functionality from an externally developed web application you will need to configure the connection properties of the WorkflowServices.jar, which can be downloaded from you repository, and then install this in you Glassfish instance. When you have downloaded the Workflow Service API from the repository you will need to extract the zip which will create a number of directories. The directory we are interested in is the WLM-API-JDK14 which contains the WorkflowService.jar file. You will need to expand the WorkflowService.jar and edit the connection.properties contained in the package com.stc.bpms.wlm. Given the information and DSEE structure we have your connection.properties should contain the following:

# -------------------
# JDBC DB Connection:
# -------------------
# false - allow DAO XA, true(default) - allow db auto commit

#---------------------------------------------------------
# Connection to DB: Recommened way: Create Connection pool
# in the applicatin server and provide that JNDI name here
#---------------------------------------------------------
dbConnectionPoolRefName=jdbc/WLMOraclePool
dbType=oracle

#---------------------------------------------------------
# Connection to DB: Alternate way
#---------------------------------------------------------
#daoAutoCommit=false
#dbType=oracle
#dbDriverName=oracle.jdbc.driver.OracleDriver
#dbUrl=jdbc:oracle:thin:@wlmhost:1521:AndrewHo
#userId=wlm51
#password=wlm51

#---------------------------------------------------
# Connection to EMail Server
#---------------------------------------------------
emailServer=mailserver
emailUser=wlm
emailPassword=wlm

# -------------------------------------------------
# Connection to Security Manager.
# -------------------------------------------------
# securityManager=com.stc.bpms.wlm.security.OpenLdapSecurityManager
# securityManager=com.stc.bpms.wlm.security.EnvUserSecurityManager
securityManager=com.stc.bpms.wlm.security.SunOneSecurityManager
# securityManager=com.stc.bpms.wlm.security.ActiveDirectorySecurityManager

# ------------------------------------------------------------
# Sun Java System Directpry Server / ADS Connection Properties
# ------------------------------------------------------------

java.naming.provider.url=ldap://dseehost:1389
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
java.naming.security.authentication=simple
java.naming.security.principal=cn=Directory Manager
java.naming.security.credentials=adminadmin

UsersParentDN=ou=People,dc=wlm,dc=sun,dc=com
UserDNAttributeNameInUser=entrydn
UserIDAttributeNameInUser=uid

RolesParentDN=dc=wlm,dc=sun,dc=com
RoleNameAttributeNameInUser=nsroledn
RoleNameFieldInRoleDN=cn

GroupsParentDN=ou=Groups,dc=wlm,dc=sun,dc=com
GroupDNAttributeNameInGroup=entrydn
GroupNameFieldInGroupDN=cn
GroupsOfUserFilterUnderGroupsParentDN=uniquemember={0}

ldap.attribute.manager=manager
ldap.attribute.directReports=entrydn
ldap.attribute.email=mail
ldap.attribute.givenName=givenName
ldap.attribute.group=o

# -------------------------------------------------
# WLM Internal: Don't alter this property
# -------------------------------------------------
wlmApi=true

 

 An example connection.properties can be downloaded from here.

Once the connection.properties has been modified to match the DSEE information the WorkflowService.jar needs to be recreated and then deployed to Glassfish; as follows (this is different to the method documented for Sun 8.1 in the user guides):

  1. JAR Modified contents of the previously extracted WorkflowService.jar into a new version.
  2. Deploy to Glassfish using : <GF Install Dir>/bin/asadmin deploy --user admin --generatermistubs=true WorkflowService.jar
  3. Get Client Stubs using : <GF Install Dir>/bin/asadmin get-client-stubs --user admin --appname WorkflowService <Destination Dir>
  4. The previous line will generate the file WorkflowServiceClient.jar that can be imported into your IDE; say NB 6 and used with Visual Web Pack (a future blog)

 In addition to allow the WLM API to access the WLM database you will need to add the following JDBC Resources:

 <jdbc-resource enabled="true" jndi-name="jdbc/WLMOraclePool" object-type="user" pool-name="WLMOraclePool"/>

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="oracle.jdbc.pool.OracleDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="WLMOraclePool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
  <property name="URL" value="jdbc:oracle:thin:@wlmhost:1521:WLM"/>
  <property name="PortNumber" value="1521"/>
  <property name="Password" value="wlm51"/>
  <property name="ServerName" value="wlmhost"/>
  <property name="DatabaseName" value="WLM"/>
  <property name="User" value="wlm51"/>
  <property name="DataSourceName" value="OracleDataSource"/>
</jdbc-connection-pool>
 


Comments:

I have not tried these yet.
but it looks wonderfully technical.
I am reading the CAPS 5.1.3 docs, and
they are such a disappointment.
How can intelligent people
write such poor docs as CAPS docs, who knows.

Posted by guest on December 06, 2007 at 07:39 PM GMT #

Post a Comment:
Comments are closed for this entry.
About

As a member of the Oracle A-Team we specialise in enabling and supporting the Oracle Fusion Middleware communities.

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
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