Home > Class Reference > ENSLIB namespace > EnsLib.Workflow.TaskResponse

EnsLib.Workflow.TaskResponse

persistent class EnsLib.Workflow.TaskResponse extends Ens.Response

SQL Table Name: EnsLib_Workflow.TaskResponse

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.

Property Inventory

Method Inventory

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 methods: %ActionDisplayToLogical(), %ActionGet(), %ActionGetStored(), %ActionIsValid(), %ActionLogicalToDisplay(), %ActionLogicalToOdbc(), %ActionNormalize(), %ActionSet(), %ActionsDisplayToLogical(), %ActionsGet(), %ActionsGetStored(), %ActionsIsValid(), %ActionsLogicalToDisplay(), %ActionsLogicalToOdbc(), %ActionsNormalize(), %ActionsSet()
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 methods: %ActionsDisplayToLogical(), %ActionsGet(), %ActionsGetStored(), %ActionsIsValid(), %ActionsLogicalToDisplay(), %ActionsLogicalToOdbc(), %ActionsNormalize(), %ActionsSet()
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 methods: %FormFieldsDisplayToLogical(), %FormFieldsGet(), %FormFieldsGetStored(), %FormFieldsIsValid(), %FormFieldsLogicalToDisplay(), %FormFieldsLogicalToOdbc(), %FormFieldsNormalize(), %FormFieldsSet()
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 methods: %FormTemplateDisplayToLogical(), %FormTemplateGet(), %FormTemplateGetStored(), %FormTemplateIsValid(), %FormTemplateLogicalToDisplay(), %FormTemplateLogicalToOdbc(), %FormTemplateNormalize(), %FormTemplateSet()
property %FormValues as array of %String) [ SqlFieldName = FormValues ];
Collection of values from the form associated with this task (if any).
Property methods: %FormValuesBuildValueArray(), %FormValuesCollectionToDisplay(), %FormValuesCollectionToOdbc(), %FormValuesDisplayToCollection(), %FormValuesDisplayToLogical(), %FormValuesGet(), %FormValuesGetObject(), %FormValuesGetObjectId(), %FormValuesGetStored(), %FormValuesGetSwizzled(), %FormValuesIsValid(), %FormValuesLogicalToDisplay(), %FormValuesLogicalToOdbc(), %FormValuesNormalize(), %FormValuesOdbcToCollection(), %FormValuesSet(), %FormValuesSetObject(), %FormValuesSetObjectId()
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 methods: %MessageDisplayToLogical(), %MessageGet(), %MessageGetStored(), %MessageIsValid(), %MessageLogicalToDisplay(), %MessageLogicalToOdbc(), %MessageNormalize(), %MessageSet()
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 methods: %PriorityDisplayToLogical(), %PriorityGet(), %PriorityGetStored(), %PriorityIsValid(), %PriorityLogicalToDisplay(), %PriorityNormalize(), %PrioritySet(), %PriorityXSDToLogical()
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 methods: %RoleNameDisplayToLogical(), %RoleNameGet(), %RoleNameGetStored(), %RoleNameIsValid(), %RoleNameLogicalToDisplay(), %RoleNameLogicalToOdbc(), %RoleNameNormalize(), %RoleNameSet()
property %Status as %String (MAXLEN = 50);
The external Status of this task. Used to query the current status of a task.
Property methods: %StatusDisplayToLogical(), %StatusGet(), %StatusGetStored(), %StatusIsValid(), %StatusLogicalToDisplay(), %StatusLogicalToOdbc(), %StatusNormalize(), %StatusSet()
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 methods: %SubjectDisplayToLogical(), %SubjectGet(), %SubjectGetStored(), %SubjectIsValid(), %SubjectLogicalToDisplay(), %SubjectLogicalToOdbc(), %SubjectNormalize(), %SubjectSet()
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 methods: %TaskStatusGet(), %TaskStatusGetObject(), %TaskStatusGetObjectId(), %TaskStatusGetStored(), %TaskStatusGetSwizzled(), %TaskStatusIsEmpty(), %TaskStatusIsValid(), %TaskStatusNewObject(), %TaskStatusSet(), %TaskStatusSetObject(), %TaskStatusSetObjectId(), %TaskStatusUnSwizzle()
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 methods: %UserNameDisplayToLogical(), %UserNameGet(), %UserNameGetStored(), %UserNameIsValid(), %UserNameLogicalToDisplay(), %UserNameLogicalToOdbc(), %UserNameNormalize(), %UserNameSet()
property %UserRanking as %Integer;
Ranking associated with User that (last) handled this task (if the user has a role-assigned ranking).
Property methods: %UserRankingDisplayToLogical(), %UserRankingGet(), %UserRankingGetStored(), %UserRankingIsValid(), %UserRankingLogicalToDisplay(), %UserRankingNormalize(), %UserRankingSet(), %UserRankingXSDToLogical()
property %UserTitle as %String (MAXLEN = 128);
Title associated with User that (last) handled this task (if the user has a role-assigned title).
Property methods: %UserTitleDisplayToLogical(), %UserTitleGet(), %UserTitleGetStored(), %UserTitleIsValid(), %UserTitleLogicalToDisplay(), %UserTitleLogicalToOdbc(), %UserTitleNormalize(), %UserTitleSet()

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