Workflow Functions

NoReturn workflow:SetStage(Record rec, String workflowName, String stageName)
Sets the given record to be at the specified workflow stage, for the given workflow (workflowName). This will send out notifications for those who have subscribed. (Only applicable to the Workflow v1 Engine)

NoReturn workflow:AddAssignment(Path path, String roleID, Record user, String workflowStage, String notes)
Adds an assignment to a record. Assigns the record to either a given security role ID, the given user, or both. Optionally specify the specific workflow stage (workflowName + stage ID), or leave blank. Optionally specify notes which the user will be emailed, and will see when they visit the record.

NoReturn workflow:RemoveAssignment(Path path, String roleID, Record user, String workflowStage, Boolean removeViewBy)
Removes the specified assignment from a record. Removes all assignments that match the given roleID, user and optionally workflowStage. Optionally (removeViewBy=true) will remove the view filter for this user.

NoReturn workflow:RemoveAllAssignments(Path path)
Removes all assignments outstanding on a record.

NoReturn workflow:RemoveMyAssignment(Path path)
Removes the assignment from a record for the current user.

NoReturn workflow:RemoveMyAssignmentKeepVisible(Path path)
Removes the assignment from a record for the current user, but keeps it visible to them if they are using the Assigned XXX role.

NoReturn workflow:AddWorkflowComplete(Path path, String workflowName, String stageName, String role)
Manually records a complete workflow item for the record at path. WorkflowName is the name of the workflow, StageName is the name of the final stage of the workflow that is complete. If role is omitted, the logged-in user is recorded.

NoReturn workflow:AddReminder(Path path, String roleID, Record user, String workflowStage, Date date, String notes)
Sets a record to be assigned to the specified user or role (optionally at the given workflowStage) at the specified date. When the date arrives, the record will then be automatically assigned to the given user or role, and prior to that no assignment will be visible to them, except in the calendar view in the dashboard.

Number workflow:GetAssignmentCount(Path path)
Returns the number of assignments for the given path downwards for the current user (all assignments for the user or any of their roles).


Next Topic:
v4.2.0.956 (beta)
Up Since 2/29/2024 12:02:23 AM