Java Doc for WorkflowService.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » workflow » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wfmopen 2.1.1 » de.danet.an.workflow.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $




Method Summary
 WfResourceasResource(Principal principal)
     Given a java.security.Principal principal , return the workflow resource associated with this principal.
 Collectionauthorizers(WfResource resource)
     Given a de.danet.an.workflow.omgcore.WfResourceWfResource object , return the collection of resources this resource is authorized for.

This method usually returns all groups the resource is a member of and all roles assigned to the resource.

Calls to this method are typically delegated to de.danet.an.workflow.spis.ras.ResourceAssignmentService.authorizersResourceAssignmentService.authorizers .

public  Principalcaller()
     Returns the currently (i.e.
 Configurationconfiguration()
     Return the workflow engine configuration.
 EventSubscribercreateEventSubscriber()
     Returns an event subscriber.
 EventSubscribercreateEventSubscriber(String processKey, String eventTypes)
     Returns an event subscriber that receives events as specified by the parameters.
 voiddoFinish(WfActivity act, ProcessData result)
     Set a result and complete an activity in a new transaction. This is usually required to implement tools with reasonable behaviour since a failure when calling setResult or complete on an activity may not cause the tool invocation to be repeated (as would be the case when simply calling setResult or complete due to the transaction rollback associated with an exception).
 WfObjecteventReceiver(WfAuditHandler handler)
     Returns an event receiver.
 ObjectexecuteBatch(Batch batch)
     Execute a batch in the context of the workflow service i.e.
 ChannelgetChannel(WfProcess process, String channelName)
     Return a named communication channel to the given process.
 ChannelgetChannel(WfProcess process, String channelName, boolean sendOnly)
     Return a named communication channel to the given process.
 CollectionknownResources()
     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 .
 ProcessDefinitionDirectoryprocessDefinitionDirectory()
     Return the process definition directory of the workflow service.
 ProcessDirectoryprocessDirectory()
     Return the process directory of the workflow service.
 voidregisterRequester(WfRequester requester)
     Register a WfRequester.
 voidrelease(WfObject obj)
     Release an object obtained from the workflow service immediately instead of waiting for it to be automatically released.
 CollectionrequestedBy(WfRequester req)
     Return the processes requested by the given requester.
 WfResourceresourceByKey(String key)
     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 .

 MapserviceProperties()
     Returns the properties that uniquely decribe the workflow service in the current environment.



Method Detail
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




authorizers
Collection authorizers(WfResource resource) throws RemoteException(Code)
Given a de.danet.an.workflow.omgcore.WfResourceWfResource object , return the collection of resources this resource is authorized for.

This method usually returns all groups the resource is a member of and all roles assigned to the resource.

Calls to this method are typically delegated to de.danet.an.workflow.spis.ras.ResourceAssignmentService.authorizersResourceAssignmentService.authorizers . Note that since implementation of this method by the resource assignment service is optional, calling this method may result in an UnsupportedOperationException.
Parameters:
  resource - the resource. a collection of WfResource objects, notincluding resource
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




configuration
Configuration configuration() throws RemoteException(Code)
Return the workflow engine configuration. the configuration.
throws:
  RemoteException - if a system-level error occurs.



createEventSubscriber
EventSubscriber createEventSubscriber() throws IOException(Code)
Returns an event subscriber. Event subscriber should be released using WorkflowService.release release when no longer needed as they may consume considerable resources. the subscriber
throws:
  IOException - if an error occurs.



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.



doFinish
void doFinish(WfActivity act, ProcessData result) throws InvalidDataException, CannotCompleteException, RemoteException(Code)
Set a result and complete an activity in a new transaction. This is usually required to implement tools with reasonable behaviour since a failure when calling setResult or complete on an activity may not cause the tool invocation to be repeated (as would be the case when simply calling setResult or complete due to the transaction rollback associated with an exception).

As an example consider an InvalidDataException. This usually occurs when the result contains an item that is not a declared process data field. Ususally, repeating the tool invocation will not solve this problem.
Parameters:
  act - the Activity.
Parameters:
  result - the tool's result data. If null donot call setResult.
throws:
  InvalidDataException - see de.danet.an.workflow.omgcore.WfActivity.setResultWfActivity.setResult(...)
throws:
  CannotCompleteException - see de.danet.an.workflow.omgcore.WfActivity.completeWfActivity.complete()
throws:
  RemoteException - if a system-level error occurs.
since:
   1.1




eventReceiver
WfObject eventReceiver(WfAuditHandler handler) throws RemoteException(Code)
Returns an event receiver. The events received will be handled by the given handler. Event receivers should be released using WorkflowService.release release when no longer needed as they may consume considerable resources.
Parameters:
  handler - the handler for received events. the receiver.
throws:
  RemoteException - if a system-level error occurs.WorkflowService.createEventSubscriber createEventSubscriber



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



processDefinitionDirectory
ProcessDefinitionDirectory processDefinitionDirectory() throws RemoteException(Code)
Return the process definition directory of the workflow service. the process definition directory.
throws:
  RemoteException - if a system-level error occurs.



processDirectory
ProcessDirectory processDirectory() throws RemoteException(Code)
Return the process directory of the workflow service. the process directory.
throws:
  RemoteException - if a system-level error occurs.



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




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.