Saturday, May 24, 2008

BPM Value Objects - Weblogic

Three BPM packages like com.bea.wlpi.common, com.bea.wlpi.common.security, and com.bea.eci.repository.helper—provide classes, or value objects, for obtaining object data at both definition and run time. For more information about each of these packages, see BPM API.

Each value object shares the following characteristics:
Maintains various BPM server-side objects, including session EJBs (for example, templates, template definitions, and business calendars) and entity EJBs that are used internally. Also allows you to obtain data values from these objects.

Is represented by an individual Java class, the members of which are collectively referred to as values

Is serializable: can be exchanged between client and server overrides the equals() method for testing two objects of the same type for equality, as follows: public boolean equals(Object obj)

Implements the java.lang.comparable interface for comparing two objects of the same type, as follows: public int compareTo(Object obj)

When part of a homogeneous list, a class can be searched and sorted using the following methods:

java.util.Collection.contains(Object o)

java.util.List.indexOf(Object o)

java.util.Collections.sort(List list)

java.util.Collections.sort(List list, Comparator c)


If the natural ordering of an object (as implemented by the boolean compareTo(Object o) method) is based on the same field used by the boolean equals(Object o) method, the following method

int java.util.Collections.binarySearch(List list, Object o)

can be used for rapidly searching a list that was sorted earlier, using the java.util.Collections.sort(List list) method.

Implement the com.bea.wlpi.common.Publishable interface, if the import and export of the object data is supported.

Note: If the importing and exporting of data is supported, the object also implements the com.bea.wlpi.common.Publishable interface. For more information, see Publishing Workflow Objects.

The following table lists the value objects that can be used to access object data.


Value Object To access

com.bea.wlpi.common.BusinessCalendarInfo Business calendar data

com.bea.wlpi.common.EventKeyInfo Event key data

com.bea.wlpi.common.InstanceInfo Workflow instance data

com.bea.wlpi.common.OrganizationInfo Organization data

com.bea.wlpi.common.security.PermissionInfo Permission data

com.bea.wlpi.common.RepositoryFolderHelperInfo XML repository folder data

com.bea.eci.repository.helper.RepositoryFolderInfo XML repository folder data

com.bea.wlpi.common.RerouteInfo Task rerouting data

com.bea.wlpi.common.RoleInfo Role data

com.bea.wlpi.common.RolePermissionInfo Role permission data

com.bea.wlpi.common.TaskInfo Workflow task data

com.bea.wlpi.common.TemplateDefinitionInfo Template definition data

com.bea.wlpi.common.TemplateInfo Template data

com.bea.wlpi.common.UserInfo User data

com.bea.wlpi.common.security.UserPermissionInfo User permission data

com.bea.wlpi.common.VariableInfo Variable data

com.bea.wlpi.common.VersionInfo Version number data

com.bea.wlpi.common.XMLEntityHelperInfo XML repository entity data

com.bea.eci.repository.helper.XMLEntityInfo XML repository entity data


How Creating Value Objects :

To create a value object, use the associated constructor. Each of the BPM value objects described in the table Value Objects, provides one or more constructors for creating object data. The constructors for creating value objects are described in Value Object Summary.

For example, the following code creates an OrganizationInfo object, sets the organization ID to ORG1, and assigns the resulting object to organization.

OrganizationInfo organization = new OrganizationInfo("ORG1");

Tuesday, May 20, 2008

log4j in weblogic 9.2

WebLogic 9.2 and the application's need for log4j-1.2.8.jar file to implement the logger option.The following procedures are give the step by step guidelines to implement the Log4J logger in weblogic 9.2 portal server.

1. Go to folder.
2. Copy the log4j Configuration in to domain folder.
3. In the startWebLogic.cmd that is run when starting the WebLogic Server, the following lines are in the file:

set JAVA_OPTIONS=%JAVA_OPTIONS% -Dlog4j.ignoreTCL=true
-Dlog4j.configuratorClass=com.foo.core.log.ReloadingDOMConfigurator
-Dlog4j.configuration=file://%DOMAIN_HOME%/log4jConfig.xml
set SAVE_JAVA_OPTIONS=

set CLASSPATH=%SAVE_CLASSPATH%;%DOMAIN_HOME%\lib\mylog4j.jar

The mylog4j.jar and the log4j-1.2.8.jar are located in the \lib. WebLogic puts log4j.jar in the classpath before my jars when the server starts.

Open the setDomainEnv.cmd script,located in the BIN directory of your created domain directory. Find the following line in the setDomainEnv.cmd script:
if NOT "%LOG4J_CONFIG_FILE%"=="" (
Add the following two lines immediately before the line specified in the preceding step:
set LOG4J_CONFIG_FILE=%DOMAIN_HOME%\log4jConfig.xmlfor %%i in ("%LOG4J_CONFIG_FILE%") do set LOG4J_CONFIG_FILE=%%~fsiSave the file and exit your text editor. Finally run the setDomainEnv.cmd and startWebLogic.cmd ,the logger will work effectivly....