Workflow Projects
Workflows are a powerful tool to design and build your Projects - letting you control how an annotation task moves through different stages of the Project, and determining how different stages are structured and interact with one another.
Creating a Workflow Project
To create a Workflow Project using the SDK:
- First create a Workflow template in the Encord platform.
- Then use the Workflow template ID, highlighted in the screenshot below, as a parameters to the create_project() method.
List all Projects
You can query and list all the available Projects for a given user. In the following example a user fetches all Projects available using the get_projects() method.
Moving tasks between Workflow stages
Moving tasks to the first Workflow stage
Use the workflow_reopen() method to reopen tasks. Reopening tasks moves tasks back to the first stage in your Workflow.
This example returns all tasks in the Project:
The example returns all tasks in a Project back to the first Workflow stage. To reopen individual tasks, modify the final lines to specify the label row you want to reopen.
We recommend using Bundles when reopening many tasks. Bundles improve performance by reducing the number of networks calls to Encord’s servers.
Moving tasks to the Complete stage
workflow_complete() moves Workflow tasks to the Complete stage.
When moving with many label rows at the same time, create a Bundle. Bundles improve performance by reducing the number of networks calls to Encord’s servers.
Referencing tasks in specific Workflow stages
The workflow_graph_node()
method returns the location of a task within the workflow in the form of a uuid
and a title
. The title
corresponds to the name of the current stage in the Workflow.
The workflow_complete()
method moves a task to the final Workflow stage marking it as Complete.
The following example shows how the workflow_graph_node()
method and the workflow_complete()
method can be used together to move all tasks in a specified Workflow stage to Complete.
Priorities
You can read and assign task priorities using the SDK. Priorities in the SDK are represented by numbers ranging from 0 to 1, where 1 corresponds to 100
in the Encord platform, the highest priority value.
The following example reads the priority of the first label row, and then changes it to 0.9
.
To change the priority of multiple label rows at the same time, create a Bundle. Bundles improve performance by reducing the number of networks calls to Encord’s servers.
Was this page helpful?