WorkflowStage
, WorkflowAction
, and Task
. Typical use would be querying a WorkflowStage
to get Tasks
matching some criteria, and then executing a WorkflowAction
against Tasks (for example: assigning, submitting annotation tasks, or accepting review tasks). The type of actions available depends on the stage queried.
Here is a short description of major parts of the Workflows SDK:
WorkflowStage
: Move your tasks through a Workflow Project using the WorkflowStage
class. However, tasks CANNOT “teleport” through your Workflow. Tasks must move through the Workflow in logical order.AnnotationStage
ReviewStage
ConsensusAnnotationStage
ConsensusReviewStage
FinalStage
(Complete and Archive)WorkflowAction
: Applies an action to a task in a workflow stage
The following actions are supported:
assign
: Assigns a user to one or more tasks.submit
: Moves a task to the next stage.release
: Releases a task from the current user.accept
: Accepts a task.reject
: Rejects a task.Task
: Exposes a simple version of the tasks available in a Project.
TaskStatus
: The following statuses are available:
The following statuses are available for ANNOTATE tasks:
NEW
: Tasks that are unassigned.
ASSIGNED
: Tasks that are assigned to a user.
RELEASED
: Tasks that were released from an assigned user.
REOPENED
: Tasks that were reopened.
SKIPPED
: Tasks that were skipped by annotators.
COMPLETED
: Tasks that are in the Complete stage. Used for Annotation sub-tasks in Consensus Annotation tasks.
NEW
: Tasks that are unassigned.ASSIGNED
: Tasks that are assigned to a user.RELEASED
: Tasks that were released from an assigned user.REOPENED
: Tasks that were reopened.AnnotationStage
ReviewStage
FinalStage
(Complete and Archive)Tasks
provides programmatic access to your tasks available in the UI.assign
: Assigns a user to one or more tasks.submit
: Moves a task to the next stage.release
: Releases a task from the current user.AnnotationStage
ReviewStage
ConsensusAnnotationStage
ConsensusReviewStage
FinalStage
(Complete and Archive)assign
: Assigns a user to one or more tasks.approve
: Moves a task to the next stage.release
: Releases a task from the current user.reject
: Rejects a task.produce_result
, that is undefined. You need to create and define the custom logic that selects the labels from the label options you have available.
apples-05.jpg
does not have any labels, because it was not assigned to any users before we submitted the task. If we REJECT the task, according to the Workflow in the Project, the task returns to the ANNOTATE 1 stage.
The following code filters the task in the REVIEW 1 stage based on the task’s data hash, and then rejects the task.
apples_05.jpg
was acted upon.
To verify that the task is now in ANNOTATE 1, run the following:
apples01
to apples_04
are in the COMPLETE stage.