EnsLib.Workflow.RoleDefinition
persistent class EnsLib.Workflow.RoleDefinition extends %Library.Persistent, %XML.Adaptor, %CSP.Util.AutoForm
SQL Table Name: EnsLib_Workflow.RoleDefinition
Defines a workflow role and its members.Property Inventory
Method Inventory
- %OnDelete()
- AddUserToRole()
- CreateRole()
- DrawHTMLFormFields()
- GetUserSet()
- OnSubmit()
- RemoveUserFromRole()
Parameters
parameter DOMAIN = Ensemble;
Use our own domain for localization
Properties
property Capacity as %Integer (CAPTION = "@EnsColumns:Capacity@Capacity", MINVAL = 1) [ InitialExpression = 100 ];
Defines the capacity of this Role.
This value is used to report the number of active tasks assigned to a Role as a percentage value.
This value is used to report the number of active tasks assigned to a Role as a percentage value.
Property methods: CapacityDisplayToLogical(), CapacityGet(), CapacityGetStored(), CapacityIsValid(), CapacityLogicalToDisplay(), CapacityNormalize(), CapacitySet(), CapacityXSDToLogical()
property Description as %String (CAPTION = "@EnsColumns:Description@Description", MAXLEN = 2000, XMLNAME = "description", XMLPROJECTION = "element");
(Optional) Description for this role.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property Name as %String (CAPTION = "@Ensemble:Name@Name", MAXLEN = 128, XMLNAME = "name", XMLPROJECTION = "attribute") [ Required ];
The (unique) name of this role.
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
Methods
classmethod %OnDelete(oid As %ObjectIdentity) as %Status
This callback method is invoked by the %Delete() method to
provide notification that the object specified by oid is being deleted.
If this method returns an error then the object will not be deleted.
classmethod AddUserToRole(pRoleName As %String, pUserName As %String, pRanking As %Integer = 3, pTitle As %String = "") as %Status
Add an additional user to the specified workflow role.
pRoleName is the name of the role.
pUserName is the name of the user.
pRanking is the optional rank of this user within the role.
pTitle is the optional title of this user within the role.
pUserName is the name of the user.
pRanking is the optional rank of this user within the role.
pTitle is the optional title of this user within the role.
Create a Workflow role
classmethod DrawHTMLFormFields(pObj As %RegisteredObject) as %Status
method GetUserSet(pTitle As %String = "") as %ResultSet
Returns a %ResultSet of all active users for this role.
The returned result set is executed and ready to be read from.
If pTitle is provided, filter results by Title.
This callback is called when this form is submitted.
pID is the ID value associated with the form.
The default implementation will perform a Save if the AutoForm is a persistent object.
pSubmit is the name of the submit button (i.e., $AUTOFORM_SAVE).
pSubmit is the name of the submit button (i.e., $AUTOFORM_SAVE).
Remove an existing user from the specified workflow role.
pRoleName is the name of the role.
pUserName is the name of the user.
pUserName is the name of the user.
Queries
query ActiveUsersForRole(pRoleName As %String = "")
SQL Query:
SELECT UserName, Ranking, Title FROM RoleMembership WHERE RoleName = :pRoleName AND UserName->IsActive = 1 ORDER BY Ranking
SELECT UserName, Ranking, Title FROM RoleMembership WHERE RoleName = :pRoleName AND UserName->IsActive = 1 ORDER BY Ranking
Returns set of active Users for a given Role ordered by ranking
SQL Query:
SELECT UserName, Ranking, Title FROM RoleMembership WHERE RoleName = :pRoleName AND Title = :pTitle AND UserName->IsActive = 1 ORDER BY Ranking
SELECT UserName, Ranking, Title FROM RoleMembership WHERE RoleName = :pRoleName AND Title = :pTitle AND UserName->IsActive = 1 ORDER BY Ranking
Returns set of active Users for a given Role
with a given title ordered by ranking.
query Roles()
SQL Query:
SELECT R.Name As Name, R.Description, R.Capacity, (SELECT COUNT(*) FROM RoleMembership WHERE RoleName = R.Name) As Users FROM RoleDefinition R ORDER BY R.Name
SELECT R.Name As Name, R.Description, R.Capacity, (SELECT COUNT(*) FROM RoleMembership WHERE RoleName = R.Name) As Users FROM RoleDefinition R ORDER BY R.Name
Returns set of all available Roles.
query UsersForRole(pRoleName As %String = "")
SQL Query:
SELECT UserName, Ranking, Title, UserName->IsActive As IsActive, User As CurrUser FROM RoleMembership WHERE RoleName = :pRoleName ORDER BY Ranking
SELECT UserName, Ranking, Title, UserName->IsActive As IsActive, User As CurrUser FROM RoleMembership WHERE RoleName = :pRoleName ORDER BY Ranking
Returns set of all Users for a given Role ordered by Ranking.
Indexes
index (ID on Name) [IdKey, Type = key];
Index methods: IDCheck(), IDDelete(), IDExists(), IDOpen(), IDSQLCheckUnique(), IDSQLExists(), IDSQLFindPKeyByConstraint(), IDSQLFindRowIDByConstraint()
Triggers
trigger SQLDelete (BEFORE event DELETE);
SQL Delete Trigger
Inherited Members
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- CreateInstance()
- DispatchSubmit()
- DoSubmit()
- DrawFormButtons()
- DrawHTMLForm()
- DrawHTMLTable()
- GetComboBoxHTML()
- GetFormError()
- OnDefineButtons()
- ProcessSubmit()
- SetFormError()
- Submit()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Storage
Storage Model: Storage (EnsLib.Workflow.RoleDefinition)
^EnsLib.W.RoleDefinitionD(ID) |
= | %%CLASSNAME
Description
Capacity
|