Package org.kuali.rice.kew.rule
Interface RoleAttribute
- All Superinterfaces:
Serializable,WorkflowRuleAttribute
- All Known Implementing Classes:
AbstractRoleAttribute,ChannelReviewerRoleAttribute,GenericRoleAttribute,RoutedByUserRoleAttribute,UnqualifiedRoleAttribute
A special type of attribute that is used exclusively for resolving abstract roles
to concrete responsibilities (users and groups). A RoleAttribute provides resolution
for a set of abstract "role" names. These are published via the
getRoleNames()
method, which returns a list of RoleName, which is a combination of class name (attribute implementation class),
abstract role name, and optional label and return url (DOCME: what is return url used for?).
RoleAttribute lifecycle:
- A RoleAttribute is defined on a Rule, via the
roleelement, with the syntax: fully qualified class name!abstract role name. E.g.:
<role>edu.whatever.attribute.SomeAttribute!RoleName</role> - When the
<role>element is parsed, the Rule's "responsibility" is set to the role element value and the responsibility is marked to indicate that it is a role ("R",KewApiConstants.RULE_RESPONSIBILITY_ROLE_ID) - When a Rule that is configured with a Role responsibility is fired,
getQualifiedRoleNames(String, DocumentContent)is called to return a list of "qualified" role names. Qualified role names are role names which have been qualified with some relevant contextual information (e.g. from the document) that is useful for subsequent responsibility resolution. resolveQualifiedRole(RouteContext, String, String)is immediately called for each of the qualified role names returned in the previous step, and it returns aResolvedQualifiedRolecontaining the list of concrete recipients (Ids).- (
UnqualifiedRoleAttributebase class can be used to simplify this two-step process)
Relationship to WorkflowAttribute: all RoleAttribute implementations are also WorkflowAttribute implementations (is this true? should RoleAttribute extend WorkflowAttribute in that case?)
Methods of WorkflowAttribute interface fulfilled by RoleAttribute:
- ??
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetQualifiedRoleNames(String roleName, DocumentContent documentContent) Returns a String which represent the qualified role name of this role for the given roleName and docContent.List ofRoleNames this RoleAttribute supportsresolveQualifiedRole(RouteContext routeContext, String roleName, String qualifiedRole) Returns a List of Workflow Users which are members of the given qualified role.Methods inherited from interface org.kuali.rice.kew.rule.WorkflowRuleAttribute
getDocContent, getRoutingDataRows, getRuleExtensionValues, getRuleRows, isMatch, isRequired, setRequired, validateRoutingData, validateRuleData
-
Method Details
-
getRoleNames
List ofRoleNames this RoleAttribute supports- Returns:
- list of
RoleNames this RoleAttribute supports
-
getQualifiedRoleNames
Returns a String which represent the qualified role name of this role for the given roleName and docContent.- Parameters:
roleName- the role name (without class prefix)documentContent- the document content
-
resolveQualifiedRole
ResolvedQualifiedRole resolveQualifiedRole(RouteContext routeContext, String roleName, String qualifiedRole) Returns a List of Workflow Users which are members of the given qualified role.- Parameters:
routeContext- the RouteContextroleName- the roleName (without class prefix)qualifiedRole- one of the the qualified role names returned from thegetQualifiedRoleNames(String, DocumentContent)method- Returns:
- ResolvedQualifiedRole containing recipients, role label (most likely the roleName), and an annotation
-