WorkflowWorkitem Data Type

Official 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
NodeInstance WorkflowNodeInstance Read  

 

Methods

  • Load

It allows to load a workitem from its Identifier.

Load (id)

Name Type Movement Description
Id WorkflowWorkitemId Input Workitem to be loaded identifier

 

  • 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 ()

 

  • 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
User WorkflowUser Input User to which the workitem will be assigned

 

  • Unassign

Unassigns a workitem that was already assigned to a user.

 

  • Reassign

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

Reassign (sourceUser, targetUser)

Name Type Movement Description
sourceUser WorkflowUser Input User to which the workitem was assigned.
targetUser WorkflowUser Input User to which the workitem will be assigned.

 

  • ChangeState

Changes workitem state.

ChangeState (state)

Name Type Movement Description
State Character (WorkflowWorkitemState) Input 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
Activity WorkflowActivity Input Selected Successive Activity
  • 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
Message Char Input Error Code

 

  • Collaborate

It allows to add collaborators to the workitem.

Collaborate (User) : WorkflowWorkitem

Name Type Movement Description
User WorkflowUser Input User to be added as a collaborator

 

  • AssignRole

It allows to assign the workitem to a specified role.

AssignRole (Role)

Name Type Movement Description
Role WorkflowRole Input Role to assign the workitem

 

  • Delegate

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

Delegate (user): workitem

Name Type Movement Description
User WorkflowUser Input User to which the workitem will be displayed
Workitem WorkflowWorkitem Input 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
Role
 
WorkflowRole Input 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()
 

See Also
 





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.