| |
|
| de.danet.an.workflow.api.WorkflowService
All known Subclasses: de.danet.an.workflow.ejbs.client.StandardWorkflowService,
WorkflowService | public interface WorkflowService extends WfObject(Code) | | This interface defines the methods provided by the workflow engine.
author: version: $Revision: 1.7 $ |
asResource | WfResource asResource(Principal principal) throws RemoteException, InvalidKeyException(Code) | | Given a
java.security.Principal principal , return the
workflow resource associated with this principal. This method
is usually used to get a WfResource object
corresponding to the current user. The WfResource
object can subsequently be used to e.g. determine the current
user's worklist.
Calls to this method are typically delegated to
de.danet.an.workflow.spis.ras.ResourceAssignmentService.asResourceResourceAssignmentService.asResource . Note that
since implementation of this method by the resource assignment
service is optional, calling this method may result in an
UnsupportedOperationException .
Parameters: principal - the principal. a WfResource object corresponding to thegiven principal. throws: InvalidKeyException - if a resource with the given principalcan't be found. throws: RemoteException - if a system-level error occurs. since: 1.2 |
caller | public Principal caller() throws RemoteException(Code) | | Returns the currently (i.e. for this call) authenticated user
as a Principal .
In an environment where authentication is performed by the container,
it may not be easy to discover this information. Although most
container environments provide a possibility to access the current
principal, there may be a mapping between the client's representation
of the currently authenticated user and the workflow engine's
(i.e. server's) representation.
the caller principal. See Also: WorkflowService.asResource |
createEventSubscriber | EventSubscriber createEventSubscriber(String processKey, String eventTypes) throws IOException(Code) | | Returns an event subscriber that receives events as specified
by the parameters. Event subscriber should be released using
WorkflowService.release release when no longer needed as
they may consume considerable resources.
Parameters: processKey - if not null , receive events forthe given process only Parameters: eventTypes - if not null , receive events ofthe given types only. Types are specified as a whitespace,comma or semicolon separated list of event names. See de.danet.an.workflow.omgcore.WfAuditEventWfAuditEvent for a list of valid event names. the subscriber throws: IOException - if an error occurs. |
executeBatch | Object executeBatch(Batch batch) throws RemoteException, InvocationTargetException(Code) | | Execute a batch in the context of the workflow service i.e. on
the server.
We do not want to define a specific mechanism for implementing
the remote invocation mechanism used with the workflow API. Yet
it is obvious that any implementation can profit from the
possibility to execute several actions as one call to the
server.
Parameters: batch - the batch to be executed. the result returned by Batch.executeBatch.execute . throws: RemoteException - if a system-level error occurs. throws: InvocationTargetException - if thrown by Batch.execute Batch.execute |
getChannel | Channel getChannel(WfProcess process, String channelName) throws RemoteException(Code) | | Return a named communication channel to the given process. The
channel may be used to send messages to the receiver tool and
receive messages from the sender tool.
Channels should be
WorkflowService.release released when no longer
needed to free resources.
Parameters: process - the process to communicate with Parameters: channelName - the channel name the channel throws: RemoteException - if a system-level error occurs. |
getChannel | Channel getChannel(WfProcess process, String channelName, boolean sendOnly) throws RemoteException(Code) | | Return a named communication channel to the given process. The
channel may be used to send messages to the receiver tool and
optionally receive messages from the sender tool.
Channels should be
WorkflowService.release released when no longer
needed to free resources.
Parameters: process - the process to communicate with Parameters: channelName - the channel name Parameters: sendOnly - if set, returns a channel that may only be usedfor sending messages. This may save some resources. the channel throws: RemoteException - if a system-level error occurs. |
knownResources | Collection knownResources() throws RemoteException(Code) | | Returns at least the collection of all the workflow resources
that have been assigned work items, but optionally it can
return the additional workflow resources that are known to the
resource assignment service.
Calls to this method are typically delegated to
de.danet.an.workflow.spis.ras.ResourceAssignmentService.knownResourcesResourceAssignmentService.knownResources . Note
that since implementation of this method by the resource
assignment service is optional, calling this method may result
in an UnsupportedOperationException .
the collection of the known resources to the ras (instances ofde.danet.an.workflow.omgcore.WfResourceWfResource ). throws: RemoteException - if a system-level error occurs. since: 1.2 See Also: ResourceAssignmentService.knownResources |
registerRequester | void registerRequester(WfRequester requester) throws RemoteException(Code) | | Register a WfRequester . Registered requesters'
receiveEvent methods will be called for their
performers. Note that a requester must be registered before
it is used for process creation. Else events may be lost.
Parameters: requester - the requester to be registered. throws: RemoteException - if a system-level error occurs. |
release | void release(WfObject obj)(Code) | | Release an object obtained from the workflow service
immediately instead of waiting for it to be automatically
released. This may be called to optimize resource
utilization.
We do not want to define a specific mechanism for implementing
the remote invocation mechanism used with the workflow
API. Therefore, we cannot demand that each object defines a
method to release resources (like e.g. CORBA's release). This
method knows about the implementation specifics and acts
appropriately.
Parameters: obj - the object which is no longer used. |
requestedBy | Collection requestedBy(WfRequester req) throws RemoteException(Code) | | Return the processes requested by the given requester. This is
a helper method intended to be used when implementing a
WfRequester . Applications should use
WfRequester.performers WfRequester.performers() instead.
Parameters: req - the requester. the processes created with the given requester. throws: RemoteException - if a system-level error occurs. |
resourceByKey | WfResource resourceByKey(String key) throws InvalidKeyException, RemoteException(Code) | | Given the key of a WfResource
(obtained with
WfResource.resourceKeyresourceKey() ), return the workflow resource
associated with this key.
Calls to this method are typically delegated to
de.danet.an.workflow.spis.ras.ResourceAssignmentService.resourceByKeyResourceAssignmentService.resourceByKey . Note
that since implementation of this method by the resource
assignment service is optional, calling this method may result
in an UnsupportedOperationException .
Parameters: key - the key. a WfResource object corresponding to thegiven key. throws: InvalidKeyException - if the resource with the givenkey can't be found. As the environment is a concurrent multiuser environment, WfResource objects (and keys obtainedfrom WfResource objects) may become invalid. throws: RemoteException - if a system-level error occurs. since: 1.2 See Also: ResourceAssignmentService.resourceByKey |
serviceProperties | Map serviceProperties() throws RemoteException(Code) | | Returns the properties that uniquely decribe the workflow
service in the current environment.
WorkflowService does not implement
Serializable because implementations of this class
may have attributes that e.g. include network connections to
the server and may thus not be serializable. Nevertheless it
should be possible to obtain some unique reference to a
workflow service and to restore this service without having to
"manually" collect the (implementation dependant!) properties
set for WorkflowServiceFactory before the call to
newInstance .
This methods therefore returns a set of relevant properties
that will restore this workflow service when set as properties
of WorkflowServiceFactory in the same or an
equivalent environment before newInstance is
called. The properties returned by this method are, of course,
based on the properties in effect when the
WorkflowService was initially created.
Note the restriction "same or equivalent environment" in the
previous paragraph. One of the explicitly mentioned properties
of the WorkflowServiceFactory (in a J2EE based
implementation) is the InitialContext used. If not
set explicitly, the default initial context may be specified by
something like "localhost:1099 ". While the
properties returned by serviceProperties will
include this property of the connection to the JNDI provider,
using the properties in a different JVM on a different machine
may result in a different workflow service (or no workflow
service at all) because a different JNDI server is accessed.
The impossibility to transfer all relevant information between
JVM's under all circumstances (InitialContext is
not serializable as may be some other crucial information in an
implementation based on some other technology than J2EE) has
prevented us from demanding serializability for
WorkflowService . The requirement to obtain the
service information explicitly and to create a new instance
should result in some awareness of the problems.
the service properties throws: RemoteException - if a system-level error occurs |
|
|
|