Unofficial Content
  • This documentation is valid for:

This object represents the execution of an activity within the context of a specific process instance.

Properties


Property Type Access Description
Id Numeric Read Identifier
ProcessDefinition WorkflowProcessDefinition Read Process Definition
ProcessDefinitionId Numeric Read Identifier of the process definition
Priority Numeric (WorkflowPriority) Read/ Write Priority
Comments Character Read/ Write Associated comments
State Character Read State
Created DateTime Read Creation date
Ended DateTime Read Ending date
WarningTime DateTime Read/Write  Deadline warning date and time
DeadlineTime DateTime Read/Write Deadline date and time
Activity WorkflowActivity Read Activity
ActivityId Numeric Read Activity Identifier
ProcessInstance WorkflowProcessInstance Read Process Instance
ProcessInstanceId Numeric Read Process instance identifier
isSubprocess Boolean Read Indicates if it is a subprocess
Subprocess WorkflowProcessInstance Read Associated Subprocess
Participant WorkflowUser Read Participant User (that has the workitem assigned).
ParticipantCandidates Collection (WorkflowUser) Read Candidate users to participate in the workitem execution..
DocumentInstances Collection (WorkflowDocumentInstance) Read Associated document instances
States Collection Character(WorkflowWorkitemState) Read States that a workitem may take.
Collaborators   Collection (WorkflowUser) Read It returns the list of users that participate in the workitem execution
Index   Numeric Read Workitem index when the task defining it is array type
PreviousActivity WorkflowActivity Read Activity that was executed before
Previous WorkflowWorkitem Read Workitem that was executed before
Error WorkflowError Read Error


Methods

  • Assign

Assigns the workitem to the specified user. The workitem cannot be assigned to another user (in this case, see Reassign method).

Assign (user)

  Name Type Movement Description
1 User Character/ WorkflowUser Input User to which the workitem will be assigned.
  • Reassign

Reassigns a workitem that was already assigned to a user, to another user.

Reassign (sourceUser, targetUser)

  Name Type Movement Description
1 sourceUser WorkflowUser Input User to which the workitem was assigned.
2 targetUser WorkflowUser Entrada User to which the workitem will be assigned.
  • ChangeState
    Changes workitem state.

    ChangeState (state)
  Name Type Movement Description
1 State Character (WorkflowWorkitemState) Entrada State that the workitem will take.

 

  • SelectSuccessiveOptionalActivity

Selects a successive optional activity. Once the workitem is completed, the instances of all the selected successive activities will be created.

SelectSuccesiveOptionalActivity (activity)

  Name Type Movement Description
1 Activity WorkflowActivity Entrada Selected Successive Activity


  • Complete

Completes the workitem Before completing the workitem, the method verifies that the corresponding post-conditions are completed. The ideal condition to execute Complete() is when the workitem is in process (open.active.in_process state; see Workflow States document). Nevertheless, with the purpose of making the use of this method easier, in case the workitem is currently in assignment-pending or assigned state (but not in process), the method takes care of going through the intermediate states before the workitem is considered completed. Anyway, if the workitem is in assignment-pending state, we recommend calling the Assign()method previously, so that the user remains registered in the process history.

Complete ()

  • PostConditionFailed

This method allows the programmer to determine if the posconditions of a task were fullfiled or not. The programmer must evaluate postconditions before the completion of the workitem. This method receives a string as a parameter which is the error message for the user who is attempting to complete the workitem.

PostConditionFailed (message)

  Name Type Movement Description
1 Message Char Entrada Error Code
  • Delegate

This method allows the developer to delegate a workitem to a specific user.

Delegate (user): workitem

  Name Type Movement Description
1 User WorkflowUser Entrada User to which the workitem will be displayed
2 Workitem WorkflowWorkitem Entrada Workitem to be delegated
  • DelegateToRole

This method allows the developer to delegate a workitem to a specific role so that all users with this role will be able to see the workitem.

DelegateToRole(role): workitem

  Name Type Movement Description
1 Role WorkflowRole Entrada Role to which the workitem will be delegated

  • Skip

This method allows to skip this workitem.

Skip()
 

  • Undo

This method allows to undo this workitem.

Undo()
 


 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant