|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskPlanRegistry
A registry of task plans known to the worklist system. All task plans have a globally unique identifier (within any given WLI server). Note that we assume that TaskPlan, and TaskPlanRegistry may be available on the server system classpath, and thus shared between all applications in the server. We also assume this may not be the case, and all applications may load their own version of these classes.
For any given WLS server instance, any number of Worklist system instances may be active at any given time. Each instance of the Worklist system refers to a single instance of TaskPlanRegistry. There may be one or more actual instances of a task plan registry in a server, depending on the implementation. Thus, all that can be said for certain is that each instance of Worklist system sees only one instance of TaskPlanRegistry, and that all clients of that Worklist system instance will see the same task plans.
All task plans are deployed as part of a host application. Task plans are visible to any client using the same instance of the Worklist system being used by the host application.
Note that host applications themselves can be versioned and multiple versions of a host app may be deployed in a single server at the same time. Task plan developers/deployers should ensure that any new version of a host application contains task plans with appropriate versions. If the task plans within the new version of an application have not changed, there is no need to change the version of the task plans within the application. However, if the task plans have changed in the new version of the application, the version numbers of the task plans must change to reflect this.
At runtime, task plan references given by name and version are resolved to server-wide unique identifiers that include the name and version of the host application. Thus, if two versions of an application contain the same version of a task plan, at runtime, the resolved unique id for the task plan will contain the id of either one of the host application versions. If the resolved-to version of the application is undeployed, the registry will automatically begin resolving task plans from the undeployed app using the latest remaining version of the application (if any).
Method Summary | |
---|---|
void |
deregisterTaskPlan(TaskPlanId taskPlanId)
|
String[] |
getHostApplicationNames()
Get a list of names representing all the applications that are known to host one or more task plans. |
float |
getLatestTaskPlanVersion(TaskPlanPath path,
float minVersion)
Get the latest version of the task plan that is equal to or greater than the given minimum version. |
com.bea.wli.path.FolderPath[] |
getRootFolders()
Return an array of FolderPaths representing the top-level folders in the correlation hierarchy formed from the paths of all registered task plans. |
com.bea.wli.path.FolderPath[] |
getSubFolders(com.bea.wli.path.FolderPath folder)
Get the folders contained in the folder given by folder. |
TaskPlan |
getTaskPlan(TaskPlanId id)
Get a task plan given its id. |
TaskPlan |
getTaskPlan(TaskPlanPath path)
Get the latest version of the task plan with the given path. |
TaskPlanId[] |
getTaskPlanIds(String appName)
Get all the task plans that were deployed within/from the given host application. |
TaskPlanId[] |
getTaskPlanIds(String appName,
String version)
Get all the task plan that were deployed within the given host application and version. |
TaskPlan[] |
getTaskPlansInFolder(com.bea.wli.path.FolderPath folder)
Get all registered task plans that exist in the given folder. |
void |
registerTaskPlan(TaskPlan taskPlan)
|
Method Detail |
---|
TaskPlanId[] getTaskPlanIds(String appName) throws RemoteException
appName
- The name of the application to search for task plans.
If this name contains version information for the application,
the specific version indicated will be searched. Otherwise, the
most recent version of the application deployed to the server is
searched. To retrieve all task plans from all applications
visible to this registry, pass appName as null. Note, the
visible applications are the ones that have deployed a task plan
into this registry (and this is not necessarily all apps in the
server).
RemoteException
TaskPlanId[] getTaskPlanIds(String appName, String version) throws RemoteException
appName
- The name of the application to search for task plans.
If this name contains version information for the application,
the specific version indicated will be searched. Otherwise, the
most recent version of the application deployed to the server is
searched. To retrieve all task plans for all applications
call getTaskPlanIds(String appName) instead, and pass appName
as null. In this case, the version parameter is ignored and
assumed to be null.version
- The specific version of the application to search for
task plans. If appName is null, version is ignored and
assumed to be null.
RemoteException
TaskPlan getTaskPlan(TaskPlanId id) throws UnknownObjectException, RemoteException
If the id contains a hostApplicationId, and this id is not the same as the current host application id, this method passes through to the task type registry for the indicated host application.
You can retrieve a task plan given the name of the task plan.
TaskPlanPath taskPlanPath = new TaskPlanPath("/MyTaskPlans/MyFirstTaskPlan"); InitialContext jndiContext = new InitialContext(); TaskPlanRegistry registry = WorklistContextFactory.getRemoteWorklistContext(jndiContext); TaskPlan myTaskPlan = registry.getTaskPlan(taskPlanPath);
You can retrieve a task plan of a specific version by doing this:
TaskPlanPath taskPlanPath = new TaskPlanPath("/MyTaskPlans/MyFirstTaskPlan"); InitialContext jndiContext = new InitialContext(); TaskPlanRegistry registry = WorklistContextFactory.getRemoteWorklistContext(jndiContext); // We'll find the latest version. If you know the version you want, // you can skip this step float taskPlanVersion = registry. getLatestTaskPlanVersion(taskPlanPath, 0f); // Construct a fully qualified ID by which to fetch the task plan ID id = new TaskPlan.ID(taskPlanPath, taskPlanVersion); // Get it by ID TaskPlan myTaskPlan = registry.getTaskPlan(id);
id
- The id (contains path and version information) of the task plan
to retrieve.
UnknownObjectException
- If no task plan with the given id or
name could be found.
RemoteException
float getLatestTaskPlanVersion(TaskPlanPath path, float minVersion) throws UnknownObjectException, RemoteException
path
- The TaskPlanPath of the task plan for which this method will
search.minVersion
- The minimum version to consider in the search. Pass
as 0 to bypass any minimum version checking and retrieve the
latest known version.
UnknownObjectException
- If a task plan with the given path
meeting the minVersion criteria could not be found.
RemoteException
TaskPlan getTaskPlan(TaskPlanPath path) throws UnknownObjectException, RemoteException
InitialContext jndiContext = new InitialContext(); TaskPlanRegistry registry = WorklistContextFactory.getRemoteWorklistContext(jndiContext); TaskPlanPath taskPlanPath = "/MyTaskPlans/MyFirstTaskPlan"); float version = registry.getLatestTaskPlanVersion(taskPlanPath, 0f); TaskPlan.ID id = new TaskPlan.ID(taskPlanPath, version); TaskPlan myTaskPlan = registry.getTaskPlan(id);
path
- The TaskPlanPath of the task plan.
UnknownObjectException
- If no task plan with the given path
could be found.
RemoteException
String[] getHostApplicationNames() throws RemoteException
RemoteException
- If any communication error occurs.TaskPlan[] getTaskPlansInFolder(com.bea.wli.path.FolderPath folder) throws RemoteException
folder
- The FolderPath of the folder from which to search for task
types.
RemoteException
- If any communication error occurs.com.bea.wli.path.FolderPath[] getRootFolders() throws RemoteException
RemoteException
com.bea.wli.path.FolderPath[] getSubFolders(com.bea.wli.path.FolderPath folder) throws RemoteException
folder
- The FolderPath for the folder to search for subfolders.
RemoteException
- If any communication error occurs.void registerTaskPlan(TaskPlan taskPlan) throws RemoteException
RemoteException
void deregisterTaskPlan(TaskPlanId taskPlanId) throws RemoteException
RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |