Java Doc for ResourceAssignmentService.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » workflow » spis » ras » 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.spis.ras 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.danet.an.workflow.spis.ras.ResourceAssignmentService

All known Subclasses:   de.danet.an.workflow.assignment.StandardResourceAssignmentService,
ResourceAssignmentService
public interface ResourceAssignmentService (Code)
This interface defines the resource assignment facility used by the workflow component. A central design issue for this interface is the identification of activites.

The de.danet.an.workflow.omgcore.WfActivity.key"key" method of WfActivity is by definition only unique within the scope of the containing process and can thus not easily be used to identify a single activity in a workflow engine. Even worse, a resource assignment service might be used by more than one workflow engine.

At this interface, an activity is therefore identified using an ActivityFinder and an identifier that is unique with respect to the ActivityFinder. The ActivityFinder provides both a namespace to allow different consumers to request resources and a means for the assignment facility to map the identifier back to an actual WfActivity object. See the description of ActivityFinder ActivityFinder for more details.

From the workflow engine's point of view, the resource assignment service is the only source of objects of type WfResource and WfAssignment. Implementations of resource assignment services may be (but need not be) based on a resource management service as defined in package de.danet.an.workflow.spis.rmsde.danet.an.workflow.spis.rms .





Method Summary
 WfResourceasResource(Principal principal)
     Given a java.security.Principal principal , return the workflow resource associated with this principal.

As the workflow core does not have a defined access to a resource management facility, this mapping functionality must be brought to the workflow core by the resource assignment service.

 Collectionassignments(ActivityFinder finder, String actId, WfActivity activity)
     Return the assignments to an activity.
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity.
 Collectionauthorizers(WfResource resource)
     Given a de.danet.an.workflow.omgcore.WfResourceWfResource object , return the collection of resources this resource is authorized for.

The resource assignment service usually uses its underlying resource management facility to implement this method, returning all groups the resource is a member of and all roles assigned to the resource.

 CollectionautoAssignResources(ActivityFinder finder, String actId, WfActivity activity, Principal principal, Participant participant)
     Triggers the automatic assignment of resources to an activity that is about to become ready.

Usually, criteria for the resource selection must be determined within the resource assignment, e.g.

 voidchangeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource oldResource, WfResource newResource)
     Change an assignment for enacting an activity.
 WfResourcegetResource(WfAssignment asnmnt)
     Get the resource associated with an Assignment.
 booleanisMemberOfWorkItems(WfResource resource, WfAssignment assignment)
     Find out if a given assignment belongs to the work items assigned to a particular resource.
Parameters:
  resource - the resource.
Parameters:
  assignment - the assignment in question.
 CollectionknownResources()
     Returns at least the collection of all the workflow resources being assigned to activities, but should also return the additional workflow resources that are known to the resource assignment service.

If the resource assignment service is based on a resource management service as defined in package de.danet.an.workflow.spis.rmsde.danet.an.workflow.spis.rms , it can simply delegate this call to de.danet.an.workflow.spis.rms.ResourceManagementService.listResourcesResourceManagementService.listResources . The workflow engine does not need this method for its operation; however, it provides a method for accessing this information as part of the client interface to ease the implementation of clients.

 voidremoveAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource resource)
     Remove the assignment of a resource to an activity.
 WfResourceresourceByKey(String key)
     Given the key of a WfResource (obtained with WfResource.resourceKeyresourceKey() ), return the workflow resource associated with this key.

For the workflow core, the resource assignment interface is the only source of WfResource objects.

 CollectionworkItems(WfResource resource)
     Return the assignments of a given resource.
Parameters:
  resource - the resource.



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.

As the workflow core does not have a defined access to a resource management facility, this mapping functionality must be brought to the workflow core by the resource assignment service. If the resource assignment service is based on a resource management service as defined in package de.danet.an.workflow.spis.rmsde.danet.an.workflow.spis.rms , it can simply delegate this call to de.danet.an.workflow.spis.rms.ResourceManagementService.asResourceResourceManagementService.asResource . The workflow engine does not need this method for its operation; however, it provides a method for accessing this information as part of the client interface to ease the implementation of clients that e.g. want to generate a list of assignments for the current user. The implementation of this method by a resource assignment service is therefore optional. If not implemented, a call to this method must result in a java.lang.UnsupportedOperationExceptionUnsupportedOperationException .


Parameters:
  principal - the principal. a WfResource object corresponding to thegiven principal.
throws:
  InvalidKeyException - if the resource with the given keycan't be found.
throws:
  RemoteException - if a system-level error occurs.
since:
   1.2




assignments
Collection assignments(ActivityFinder finder, String actId, WfActivity activity) throws RemoteException(Code)
Return the assignments to an activity.
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  finder - the finder used to lookup activities by their finderIds.
Parameters:
  activity - the activity. the collection of assignments (instances ofde.danet.an.workflow.omgcore.WfAssignmentWfAssignment).
throws:
  RemoteException - if a system-level error occurs.



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.

The resource assignment service usually uses its underlying resource management facility to implement this method, returning all groups the resource is a member of and all roles assigned to the resource. Resource assigments facilities may, however, modify this information e.g. according to configured delegation rules.

If the resource assignment service is based on a resource management service as defined in package de.danet.an.workflow.spis.rmsde.danet.an.workflow.spis.rms , it can simply delegate this call to de.danet.an.workflow.spis.rms.ResourceManagementService.authorizersResourceManagementService.authorizers . The workflow engine does not need this method for its operation; however, it provides a method for accessing this information as part of the client interface to ease the implementation of clients. The implementation of this method by a resource assignment service is therefore optional. If not implemented, a call to this method must result in a java.lang.UnsupportedOperationExceptionUnsupportedOperationException .


Parameters:
  resource - the resource. a collection of WfResource objects, notincluding resource
throws:
  RemoteException - if a system-level error occurs.
since:
   1.2




autoAssignResources
Collection autoAssignResources(ActivityFinder finder, String actId, WfActivity activity, Principal principal, Participant participant) throws RemoteException(Code)
Triggers the automatic assignment of resources to an activity that is about to become ready.

Usually, criteria for the resource selection must be determined within the resource assignment, e.g. based on the name of the activity, the process it belongs to etc. In some cases, however, the worflow component may have some resource selection information available. The workflow component may have obtained such information e.g. as part of the process description. If such information is available, it may optionally be passed to the automatic assignment. The type and valid values of such information depends totally on the resource assignment service used and remains undefined in the scope of this interface.


Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  finder - the finder used to lookup activities by their finderIds.
Parameters:
  activity - the activity that is about to become ready.
Parameters:
  principal - the creator of the process, may benull.
Parameters:
  participant - the Participant that describes resource selection criteria.The paramter may be null the assigned resources (instances of de.danet.an.workflow.omgcore.WfResourceWfResource).
throws:
  RemoteException - if a system-level error occurs.
See Also:   ActivityFinder




changeAssignment
void changeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource oldResource, WfResource newResource) throws RemoteException, InvalidResourceException, AlreadyAssignedException, NotAssignedException(Code)
Change an assignment for enacting an activity. This method is called by the workflow engine in de.danet.an.workflow.api.Activity.changeAssignmentActivity.changeAssignment which should be used by resource assignment services to implement WfAssignment.setAssignee.
Parameters:
  finder - the finder used to lookup activities by their finderIds
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64
Parameters:
  activity - the activity being enacted
Parameters:
  oldResource - the resource that has its assignment removed
Parameters:
  newResource - the resource to be assigned
throws:
  RemoteException - if a system-level error occurs
throws:
  InvalidResourceException - if the resource is invalid.As the environment is a concurrent multi user environment, WfResource objects may become invalid
throws:
  AlreadyAssignedException - if the assignment alreadyexists
throws:
  NotAssignedException - if there is no assignment to theold resource
See Also:   ActivityFinder



getResource
WfResource getResource(WfAssignment asnmnt) throws RemoteException(Code)
Get the resource associated with an Assignment.
Parameters:
  asnmnt - the assignment the resource
throws:
  RemoteException - if a system-level error occurs.
since:
   1.3.4



isMemberOfWorkItems
boolean isMemberOfWorkItems(WfResource resource, WfAssignment assignment) throws RemoteException, NoSuchResourceException(Code)
Find out if a given assignment belongs to the work items assigned to a particular resource.
Parameters:
  resource - the resource.
Parameters:
  assignment - the assignment in question. true if the assignment belongs to the work items of the resource.
throws:
  RemoteException - if a system-level error occurs.
throws:
  NoSuchResourceException - if the resource is invalid.As the environment is a concurrent multi user environment, WfResource objects may become invalid.



knownResources
Collection knownResources() throws RemoteException(Code)
Returns at least the collection of all the workflow resources being assigned to activities, but should also return the additional workflow resources that are known to the resource assignment service.

If the resource assignment service is based on a resource management service as defined in package de.danet.an.workflow.spis.rmsde.danet.an.workflow.spis.rms , it can simply delegate this call to de.danet.an.workflow.spis.rms.ResourceManagementService.listResourcesResourceManagementService.listResources . The workflow engine does not need this method for its operation; however, it provides a method for accessing this information as part of the client interface to ease the implementation of clients. The implementation of this method by a resource assignment service is therefore optional. If not implemented, a call to this method must result in a java.lang.UnsupportedOperationExceptionUnsupportedOperationException .

the collection of resources known to the resourceassignment service (instances of de.danet.an.workflow.omgcore.WfResourceWfResource).
throws:
  RemoteException - if a system-level error occurs.




removeAssignment
void removeAssignment(ActivityFinder finder, String actId, WfActivity activity, WfResource resource) throws RemoteException, InvalidResourceException, NotAssignedException(Code)
Remove the assignment of a resource to an activity. This method is called by the workflow engine in de.danet.an.workflow.api.Activity.removeAssignmentActivity.removeAssignment which, in turn, should be used by resource management services to implement WfResource.release.
Parameters:
  finder - the finder used to lookup activities by their finderIds
Parameters:
  actId - a unique (with respect to an ActivityFinder)identifier for the Activity. The length of actId is guaranteed not to exceed 64.
Parameters:
  activity - the activity that is about to become ready
Parameters:
  resource - the resource to be assigned
throws:
  RemoteException - if a system-level error occurs
throws:
  InvalidResourceException - if the resource is invalid.As the environment is a concurrent multi user environment, WfResource objects may become invalid.
throws:
  NotAssignedException - if the resource is not assigned tothe given activity
See Also:   ActivityFinder



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.

For the workflow core, the resource assignment interface is the only source of WfResource objects. While WfResource.resourceKey resourceKey() provides an easy mapping of those objects to unique keys, the reverse mapping can only be provided by the resource management facility that has created the WfResource objects.

As the workflow core does not have a defined access to a resource management facility, this reverse mapping functionality must be brought to the workflow core by the resource assignment service. (Which is quite reasonable, as it has delivered the WfResource objects in the first place.) If the resource assignment service is based on a resource management service as defined in package de.danet.an.workflow.spis.rmsde.danet.an.workflow.spis.rms , it can simply delegate this call to de.danet.an.workflow.spis.rms.ResourceManagementService.resourceByKeyResourceManagementService.resourceByKey . The workflow engine does not need this method for its operation; however, it provides a method for accessing this information as part of the client interface to ease the implementation of clients. The implementation of this method by a resource assignment service is therefore optional. If not implemented, a call to this method must result in a java.lang.UnsupportedOperationExceptionUnsupportedOperationException .


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




workItems
Collection workItems(WfResource resource) throws RemoteException, NoSuchResourceException(Code)
Return the assignments of a given resource.
Parameters:
  resource - the resource. the collection of assigned work items (instances ofde.danet.an.workflow.omgcore.WfAssignmentWfAssignment).
throws:
  RemoteException - if a system-level error occurs.
throws:
  NoSuchResourceException - if the resource is invalid.As the environment is a concurrent multi user environment, WfResource objects may become invalid.



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