public class SpecialRole
extends java.lang.Object
implements java.io.Serializable
The special role is used to define the role with particular purpose. In Agentflow System, there are three kinds of data object of Role. The other two are Role and ProjectRole.
Condiser a workflow of 'leave'. At first, Some user fills the 'leave request application'. After the manager agree the leave, the application will be back to inform the user. In the simple example, the leave request application has to pass to the 'Manager of the executor in the first step', and return back to the 'Member of the first step'.
The two roles described in the previous example are represented by SpecialRole. It is composed of SpecialRoleFunc and SpecialRoleTarget. The type include 'MemberOf', 'ManagerOf', 'RoleOf', and 'DepartmentOf', and the target could be a executor of previous step or a value of one component in the operatino artifact. For the former target, the ProcessID is stored in the SpecialRoleTarget, and for the last one, the ArtifactID and the ArtFormItemID are stored in the SpecialRoleTarget and SpecialRoleParam.
In addition, The SpecialRoleID is the identifier of the Special Role.
Role
,
Project
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
EMPTY_ATTRIBUTE |
static java.lang.String |
ROLE_FUNCTION_DEPARTMENTOF |
static java.lang.String |
ROLE_FUNCTION_MANAGEROF |
static java.lang.String |
ROLE_FUNCTION_MEMBEROF |
static java.lang.String |
ROLE_FUNCTION_ROLEOF |
static java.lang.String |
SCRIPT_DEFINED_PREFIX |
Constructor and Description |
---|
SpecialRole() |
SpecialRole(java.lang.String id)
Constructor.
|
SpecialRole(java.lang.String id,
java.lang.String roleFunc,
java.lang.String target,
java.lang.String param) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getID()
Get the id of special role
|
java.lang.String |
getParamString()
Get the parameter of special role while the target is an artifact
|
java.lang.String |
getRoleFunction()
Get the type of special role
|
java.lang.String |
getTarget()
Get the target of special role
|
void |
setParamString(java.lang.String s)
Set the parameter of special role while the target is an artifact
|
void |
setRoleFunction(java.lang.String fun)
Set the type of special role
|
void |
setTarget(java.lang.String t)
Set the target of special role
|
java.lang.String |
toString() |
public static final java.lang.String ROLE_FUNCTION_MEMBEROF
public static final java.lang.String ROLE_FUNCTION_MANAGEROF
public static final java.lang.String ROLE_FUNCTION_ROLEOF
public static final java.lang.String ROLE_FUNCTION_DEPARTMENTOF
public static final java.lang.String SCRIPT_DEFINED_PREFIX
public static final java.lang.String EMPTY_ATTRIBUTE
public SpecialRole()
public SpecialRole(java.lang.String id)
SpecialRole
with the specified role idid
- the special role idpublic SpecialRole(java.lang.String id, java.lang.String roleFunc, java.lang.String target, java.lang.String param)
public java.lang.String getID()
public java.lang.String getRoleFunction()
public void setRoleFunction(java.lang.String fun)
fun
- the given special role functionpublic java.lang.String getTarget()
public void setTarget(java.lang.String t)
t
- the given special role targetpublic java.lang.String getParamString()
public void setParamString(java.lang.String s)
s
- the given special role parameterpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright ? 2022. All Rights Reserved.