Class Reference
InterSystems: The power behind what matters   
Documentation  Search
 

persistent class EnsLib.Workflow.TaskResponse extends Ens.Response

Response from a Workflow Task request.
The Workflow Engine creates an instance of TaskResponse object as soon it receives a TaskRequest. This object is used to maintain the status of the task while it is under the control of the Workflow Engine. It also serves as the final response returned by the Workflow Engine when the task is complete.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 14 15 2


Summary

Properties
%Action %Actions %FormFields %FormTemplate %FormValues
%Message %Priority %RoleName %Status %Subject
%TaskStatus %UserName %UserRanking %UserTitle

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %CompareContents
%ComposeOid %ConstructClone %Delete %DeleteExtent
%DeleteId %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%DrawHTMLForm %DrawHTMLTable %Exists %ExistsId
%Extends %GUID %GUIDSet %GetContentType
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%OnTimeout %Open %OpenId %OriginalNamespace
%PackageName %PhysicalAddress %ProcessSubmit %PurgeIndices
%Reload %RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack
%Save %SaveDirect %SaveIndices %SerializeObject
%SetModified %ShowContents %ShowContentsHead %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject AssignTask
CompleteTask FindLeastBusyUser GetStatsDimension OnAction
OnAssign OnCancel OnFormSubmit OnNewTask
OnRelinquish OnRoleChange SendTask SendTaskToAll
SendTaskToTitle SendTaskToTop UnassignTask XMLDTD
XMLExport XMLExportToStream XMLExportToString XMLNew
XMLSchema XMLSchemaNamespace XMLSchemaType


Parameters

• parameter DOMAIN = "Ensemble";
Use our own domain for localization

Properties

• property %Action as %String(MAXLEN=128);
The user action for this task. This value is set when the task is completed.
• property %Actions as %String(MAXLEN=255);
(Optional) Comma-delimited list of Actions defined for this response. This is a copy of the value provided from the initial request for this task.
• property %FormFields as %String(MAXLEN=2000);
(Optional) comma-separated list of fields that should appear in the form associated with this Task.
This is a copy of the value provided from the initial request for this task.
• property %FormTemplate as %String(MAXLEN=255);
(Optional) Name of csp page that provides the form template for this task.
This is a copy of the value provided from the initial request for this task.
• property %FormValues as array of %String(MAXLEN="") [ SqlFieldName = FormValues ];
Collection of values from the form associated with this task (if any).
• property %Message as %String(MAXLEN=2000);
(Optional) Detailed message body for this task This is a copy of the value provided from the initial request for this task.
• property %Priority as %Integer;
Priority of the requested Task: 1 is highest; This is a copy of the value provided from the initial request for this task.
• property %RoleName as %String(MAXLEN=128);
The name of the role that handled this task. This value is set when the task is created.
• property %Status as %String(MAXLEN=50);
The external Status of this task. Used to query the current status of a task.
• property %Subject as %String(MAXLEN=255);
(Optional) Short summary of this task. This is a copy of the value provided from the initial request for this task.
• property %TaskStatus as EnsLib.Workflow.TaskStatus [ SqlFieldName = TaskStatus ];
The internal Status of this task. Used by the Workflow Engine to manage this task. User-code should not modify the contents of this object.
• property %UserName as %String(MAXLEN=128);
The name of the user that (last) handled this task. This value is set when the task is completed.
• property %UserRanking as %Integer;
Ranking associated with User that (last) handled this task (if the user has a role-assigned ranking).
• property %UserTitle as %String(MAXLEN=128);
Title associated with User that (last) handled this task (if the user has a role-assigned title).

Methods

• final method AssignTask(pUser As %String, ByRef pCount As %Integer) as %Status
This Workflow API method assigns a Task to a specific User.
• final method CompleteTask(pAction As %String = "") as %Status
This Workflow API method marks a task as complete and returns a response to the original requestor.
• final method FindLeastBusyUser(Output pUserName As %String, Output pCount As %Integer) as %Status
Find the name of the highest-ranked, active user within the given role that has the least number of tasks (for any role) assigned to them. On return pCount has current number of tasks for this user.
• method OnAction(pAction As %String) as %Status
This method is called when a user takes an action on a Task.
Default implementation completes the task.
• method OnAssign(pUser As %String) as %Status
This method is called by the Workflow Engine when a user wishes to take ownership of the related task.
Default implementation performs the assignment.
• method OnCancel() as %Status
This method is called by the Workflow Engine when a Task is cancelled.
This happens when the original request times out.
This method is called after all the Worklist items for this task have been deleted and before this Task is deleted.
• method OnFormSubmit() as %Status
This callback is invoked when the form associated with this task is submitted.
• method OnNewTask(pRequest As EnsLib.Workflow.TaskRequest) as %Status
This method is called when a new Task is received by the Workflow Engine. Default implementation does the following:
If the request includes a valid, active UserName, assign task to that user. Otherwise, make task available to all members of the current Role.
• method OnRelinquish(pUser As %String) as %Status
This method is called by the Workflow Engine when a user wishes to relinquish ownership of the related task.
Default implementation unassigns the task.
• method OnRoleChange(pName As %String, pReason As %String, pOwned As %Boolean = 0) as %Status
This method is called by the Workflow Engine when a User or Role definition associated with this task is modified.
pName is the User or Role name.
pOwned is true if this user was the owner of this task.
pReason describes the change and is one of the following:
  • $$$WfUserDeleted
  • $$$$$$WfUserInactivated
  • $$$WfRoleDeleted
• final method SendTask(pUser As %String, Output pCount As %Integer) as %Status
This Workflow API method sends (but does not assign) a Task to a specific User. pUser is the name of the user. On return, pCount is number of users task was sent to.
• final method SendTaskToAll(Output pCount As %Integer) as %Status
This Workflow API method sends (but does not assign) a Task to all Users within the current Role. On return, pCount is number of users task was sent to.
• final method SendTaskToTitle(pTitle As %String = "", Output pCount As %Integer) as %Status
This Workflow API method sends (but does not assign) a Task to all Users within the current Role with title pTitle. On return, pCount is number of users task was sent to.
• final method SendTaskToTop(pNum As %Integer = 1, Output pCount As %Integer) as %Status
This Workflow API method sends (but does not assign) a Task to pNum top ranked Users within the current Role. On return, pCount is number of users task was sent to.
• final method UnassignTask(pUser As %String = "") as %Status
This Workflow API method unassign a Task associated with specific User. Tests if pUser owns the task (if provided).

Indices

• index (RequestIdx on %TaskStatus.Request);
• index (RoleIdx on %TaskStatus.Role:Exact) [Type = bitmap];


Copyright © 1997-2017, InterSystems Corporation