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");

No comments: