This data type, that it is provided by the Workflow API, represents a user of the organization.
Property |
Type |
Access |
Description |
Id |
WorkflowUserId |
Read |
Identifier (Login) |
Name |
WorkflowName |
Read/ Write |
Name |
Email |
WorkflowEmail |
Read/ Write |
E-mail address |
Password |
WorkflowPassword |
Write |
Password |
Workload |
Numeric |
Read |
Number of pending tasks |
isConnected |
Boolean |
Read |
Indicates if the user is connected |
isBlocked |
Boolean |
Read |
Indicates if the user is blocked |
isOutOfOffice |
Boolean |
Read |
Indicates if the user is out of office |
isRebuildRequired |
Boolean |
Read |
Indicates if the user worklist needs a rebuild |
Roles |
Collection (WorkflowRole) |
Read |
Associated functional roles |
OrganizationalUnits |
Collection (WorkflowOrganizationalUnits) |
Read |
Associated User Organizational Units |
Error |
WorkflowError |
Read |
Error |
Access Level |
WorkflowAccessLevel |
Read |
User Access Level |
Restrictions (Deprecated) |
Collection (WorkflowRestriction) |
Read |
Associated restrictions |
Substitute |
WorkflowUser |
Read |
Substitute User |
LastGetWorklistCount |
Numeric |
Read |
Returns the total number of records in the last call to the GetWorklist* method ignoring paging filters if any (available since GeneXus 16 upgrade 6). |
This method allows recovering the user Worklist matching the specified filter and in the specified order.
The LastGetWorklistCount property is updated after executing the GetWorklist method with the total number of records, ignoring paging filters if any.
GetWorklist (filter): Collection (WorkflowWorkitem)
Name |
Type |
Movement |
Description |
filter |
WorkflowFilter Valid Filters: Start, Limit, CreatedFrom, CreatedTo, State, ProcessInstance, Subject, ProcessDefinition, Activity, Role, Priority, WithWarning, Search, OrganizationalUnit, SetOrganizationalUnit, ApplicationDataName, ApplicationDataValue, SetApplicationData |
Input |
Filter |
Note: (*) (**)
This method allows recovering the user Worklist matching the specified filter and in the specified order.
The LastGetWorklistCount property is updated with the total number of records, ignoring paging filters if any.
GetWorklistOrderBy (filter, order): Collection (WorkflowWorkitem)
Name |
Type |
Movement |
Description |
filter |
WorkflowFilter Valid Filters: Start, Limit, CreatedFrom, CreatedTo, State, ProcessInstance, Subject, ProcessDefinition, Activity, User, Role, Priority, WithWarning, Search, OrganizationalUnit, SetOrganizationalUnit, ApplicationDataName, ApplicationDataValue, SetApplicationData |
Input |
Filter |
order |
Numeric (WorkflowOrder.ID_ASC, WorkflowOrder.ID_DESC, WorkflowOrder.CREATED_ASC, WorkflowOrder.CREATED_DESC, WorkflowOrder.PRIORITY_ASC, WorkflowOrder.PRIORITY_DESC, WorkflowOrder.STATE_ASC, WorkflowOrder.STATE_DESC, WorkflowOrder.WITH_WARNING_ASC, WorkflowOrder.WITH_WARNING_DESC, WorkflowOrder.SUBJECT_ASC, WorkflowOrder.SUBJECT_DESC, WorkflowOrder.ACTIVITY_ASC, WorkflowOrder.ACTIVITY_DESC) |
Input |
Order |
Note: (*) (**)
- ListCreatableProcessDefinitions
This method returns a collection with the processes definitions based on which the user may create new instances matching the specified filters.
ListCreatableProcessDefinitions (filter): Collection (WorkflowProcessDefinition)
Name |
Type |
Movement |
Description |
filter |
WorkflowFilter Valid Filters: Start, Limit, Name |
Input |
Filter |
Note: (*)
- ListCreatableProcessDefinitionsOrderBy
This method returns a collection with the process definitions based on which the user may create new instances matching the specified filters in the specified order.
ListCreatableProcessDefinitionsOrderBy (filter, order): Collection (WorkflowProcessDefinition)
Name |
Type |
Movement |
Description |
filter |
WorkflowFilter Valid Filters: Start, Limit, Name |
Input |
Filter |
order |
Numeric (WorkflowOrder.ID_ASC, WorkflowOrder.ID_DESC, WorkflowOrder.NAME_ASC, WorkflowOrder.NAME_DESC) |
Input |
Order |
Note: (*)
- GetOrganizationalUnitRoles
This method allows getting the roles associated with an organizational unit.
GetOrganizationalUnitRoles (organizationalUnit): Collection (WorkflowRole)
This method allows assigning a role to the user.
AssignRole (role)
Name |
Type |
Movement |
Description |
role |
WorkflowRole |
Input |
Role to be added |
- AssignRoleToOrganizationalUnit
This method allows assigning organizational units to a role.
AssignRoleToOrganizationalUnit (organizationalUnit, role)
This method allows to unassign a role to the user.
UnassignRole (role)
Name |
Type |
Movement |
Description |
Role |
WorkflowRole |
Input |
Role to be eliminated |
- UnassignRoleFromOrganizationalUnit
This method allows unassigning roles from an organizational unit.
UnassignRoleFromOrganizationalUnit (organizationalUnit)
This method allows assigning organizational units to the user.
AssignOrganizationalUnit (organizationalUnit)
- UnassignOrganizationalUnit
This method allows unassigning an organizational unit from the user.
UnassignOrganizationalUnit (organizationalUnit)
This method rebuilds the worklist of a user.
RebuildWorklist ()
Locks the user
Block ()
Unlocks the user
Unblock ()
This method allows changing the password to a fixed password: "1234".
ResetPassword ()
This method generates a random password and emails it to the user.
ResetPasswordByMail ()
This method allows updating the user password.
ChangePassword (currentPassword, newPassword)
Name |
Type |
Movement |
Description |
currentPassword |
Character |
Input |
Actual Password |
newPassword |
Character |
Input |
New Password |
This method adds a functional role to the user.
AddRole (role)
Name |
Type |
Movement |
Description |
role |
WorkflowRole |
Input |
Role to be added |
This method allows dissociating a functional role from the user.
RemoveRole (role)
Name |
Type |
Movement |
Description |
role |
WorkflowRole |
Input |
Role to be eliminated |
- AddRestriction (Deprecated)
This method allows adding a restriction to the user or to a specific role of the user (in case this role is specified).
AddRestriction(restriction, role)
Name |
Type |
Movement |
Description |
restriction |
WorkflowRestriction |
Input |
Restriction to add |
role |
0 / WorkflowRole |
Input |
If the value is 0, the restriction is added to the user (applies to all the user roles). If not, the restriction is added to the specified role. |
- RemoveRestriction (Deprecated)
This method allows removing a restriction from the user or from a specific user role (in case this role is specified).
RemoveRestriction (restriction, role)
Name |
Type |
Movement |
Description |
restriction |
WorkflowRestriction |
Input |
Restriction to be eliminated |
role |
0 / WorkflowRole |
Input |
If the value is 0, the restriction is eliminated at user level. If not the restriction is eliminated to the role specified. |
This method allows updating the user's availability status.
SetOutOfOffice (startDate, ReturnDate, message, substitute)
Name |
Type |
Movement |
Description |
startDate |
Date |
Input |
Indicates when starts being out of the office |
returnDate |
Date |
Input |
Indicates when returns to the office |
message |
WorkflowMessage |
Input |
Allows to leave a message |
substitute |
WorkflowUser |
Input |
Indicates who is the substitute |
Note: (***)
This method sets the user's status "in office". Beware task in substitute user's worklist will not be removed with this method, a RebuildWorklist is needed.
DisableOutOfOffice ()
(*) Depends on Fetch and Max Fetch properties.
(**) It only works with users obtained by Connected User
(***) Currently, startDate must be set to today's date for the state change to take effect.
Workflow Error Codes