de.danet.an.workflow.omgcore
Interface WfResource

All Superinterfaces:
WfObject
All Known Subinterfaces:
GroupResource, RoleResource, UserResource
All Known Implementing Classes:
DefaultGroupResource, DefaultResource, DefaultRoleResource, DefaultUserResource

public interface WfResource
extends WfObject

WfResource is an abstraction that represents a person or thing that will potentially accept an assignment to an activity.


Method Summary
 boolean isMemberOfWorkItems(WfAssignment member)
          Checks if a given WfAssignment is associated with this resource.
 void release(WfAssignment fromAssignment, java.lang.String releaseInfo)
          Signals to the resource that it is no longer needed for a specific assignment.
 java.lang.String resourceKey()
          Returns the resource key.
 java.lang.String resourceName()
          Returns a human readable, descriptive name of the resource.
 java.util.Collection workItems()
          This method returns the WfAssignmentss associated with a resource.
 

Method Detail

workItems

public java.util.Collection workItems()
                               throws java.rmi.RemoteException
This method returns the WfAssignmentss associated with a resource.

Returns:
the associated WfAssignmentss.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

isMemberOfWorkItems

public boolean isMemberOfWorkItems(WfAssignment member)
                            throws java.rmi.RemoteException
Checks if a given WfAssignment is associated with this resource.

Parameters:
member - the given WfAssignment.
Returns:
true if the association exists.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

resourceKey

public java.lang.String resourceKey()
                             throws java.rmi.RemoteException
Returns the resource key. The resource key identifies a resource within a given business domain. It is assumed that resources are defined in the same business domain as the workflow process they are associated with.

The key is set when the object is initialized; modification of the key can be done in the context of a resource management facility.

Returns:
the resource key.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

resourceName

public java.lang.String resourceName()
                              throws java.rmi.RemoteException
Returns a human readable, descriptive name of the resource.

Returns:
the name of the resource.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

release

public void release(WfAssignment fromAssignment,
                    java.lang.String releaseInfo)
             throws java.rmi.RemoteException,
                    NotAssignedException
Signals to the resource that it is no longer needed for a specific assignment. It is assumed that this operation is invoked when an assignment is deleted or when an assignment is reassigned to another resource.

(The description from the OMG specification is a bit unclear about the nature of this method. Is it used to signal the release, or does it cause the release, i.e. does it update the storage of assignments. Due to the fact that this method throws NotAssignedException, which is possible only if this method interfaces with the assignment storage, we have opted for the latter.)

Parameters:
fromAssignment - the specific assignment.
releaseInfo - specifies additional information on the reason for realizing the resource as input.
Throws:
NotAssignedException - if the resource is not associated with the given assignment.
java.rmi.RemoteException - if a system-level error occurs.