Skip to content

Create Workflow Template

POSThttps://${domain}/rosetta-open/workflow/template

Helix calls to create a custom workflow template and returns the workflow template anme, which can be used when creating a Campaign

The workflow rule of the workflow template is as follows:

  1. The name of the work pool must be unique
  2. There is only one allocation pool and it must be at the head node
  3. The end of each branch must be the completion pool.And the completion pool cannot be connected after the pool.
  4. No isolated nodes
  5. The maximum number of nodes in the working pool template is 20
  6. A work pool other than the assignment pool can have only one subordinate work pool

body params

*nodesmap[] Defaults to [ { "name": "disttribution", "type": "DISTRIBUTION" } ]
workflow pool nodes
*edgesmap[] Defaults to [ { "from": "annotation", "to": "check" } ]
workflow pool edges.
*namestring Defaults to template name
workflow template name.with a maximum length of 255 bytes.for unique check.

nodes

*namestring Defaults to annotation
annotation node name. with a maximum length of 255 bytes.
*typestring Defaults to DISTRIBUTION
The enumeration is as follows: DISTRIBUTION ANNOTATION CHECK SAMPLING ALGORITHM COMPLETE
taskMaximumnumber Defaults to 5
The upper limit of the number of questions in the work pool is only valid in the annotation/check/sampling pool
peopleMaximumnumber Defaults to 5
The single-person holding task limit is only effective in the annotation/check pool
runModenumber Defaults to 1
Task allocation Mode 0: Manual allocation 1: Automatic allocation. It only takes effect in the distribution/algorithm pool
isAutoRecyclingboolean
Whether to enable the automatic recycling function
taskDeadlinenumber
New task countdown (milliseconds) : If a task is not claimed by the annotator within this time, it will be reclaimed to the distribution pool.It only takes effect in the annotation/check pool
rejectDeadlinenumber
Rejection/return revision countdown: (milliseconds) : When a task is rejected, if the annotator fails to submit the task within this time limit, it will be reclaimed to the distribution pool.It only takes effect in the annotation/check pool
disclaimerLimitnumber
Exemption is granted when the number of task rejections is less than or equal to this number.It only takes effect in the annotation/check/sampling pool
autoRecyclingLimitnumber
When the number of task rejections exceeds this number, the task is automatically reclaimed into the distribution pool.The value of autoRecyclingLimit must be greater than or equal to the disclaimerLimit.It only takes effect in the annotation/check/sampling pool
reverseTypenumber
Task reverse flow type 1: Rejection,2: Return
preAnnotationOwnershipboolean
The transfer of ownership of the annotation results: Whether the ownership of the pre-annotated data is transferred to the user who first acquires the task.It only takes effect in the annotation pool
isTimeSequenceboolean
Whether to enable the 4D reconstruction function.It only takes effect in the annotation/check/sampling pool
algorithmListmap[]
Configure the additional parameters of the algorithm

algorithmList

*algorithmIdnumber
Algorithm primary key.
*algorithmTypenumber
Algorithm Type 1: Auxiliary Annotation 2: Pre-annotation 3: Quality Inspection.
*algorithmMappingstring
The mapping relationship between algorithms and operation items.
*keyMapsstring
List of mapping relationships between algorithms and operation items.
*queryParamsstring
Additional parameters of the query algorithm.

edges

*fromstring Defaults to distribution
The name of the head node of this edge.
*tostring Defaults to annotation
The name of the end node of this edge.
Examples
shell
curl https://${domain}/rosetta-open/workflow/template \
 -X POST \
 -H 'Content-Type: application/json' \
 -H 'X-STARDUST-KEY: <X-STARDUST-KEY>' \
 -H 'X-TS: <X-TS>' \
 -H 'X-SIGN: <X-SIGN>' \
 -d '{"nodes":[{"name":"disttribution","type":"DISTRIBUTION"}],"edges":[{"from":"annotation","to":"check"}],"name":"template name"}'

responses

2000
{
"code": 2000,
"message": "Success",
"data": "template name",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": true
}
5000
{
"code": 5000,
"data": null,
"message": "Service hiccuped, please try again later.",
"date": "2025-03-13 20:00:00",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50522
{
"code": 50522,
"data": null,
"message": "The pool vertex information is incorrect",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50523
{
"code": 50523,
"data": null,
"message": "The last pool is not the finish pool.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50525
{
"code": 50525,
"data": null,
"message": "The pool name in the workflow template is the same.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50526
{
"code": 50526,
"data": null,
"message": "There are some pools that have no edges.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50527
{
"code": 50527,
"data": null,
"message": "The annotaion/check/sampling/algorithm pool can output only one edge.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50528
{
"code": 50528,
"data": null,
"message": "The number of pools exceeds the limit of 20.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50529
{
"code": 50529,
"data": null,
"message": "TemplateName is already exists.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50530
{
"code": 50530,
"data": null,
"message": "The pool type has not exists.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}
50531
{
"code": 50531,
"data": null,
"message": "The completion pool cannot be connected to other pools.",
"date": "2024-05-16 19:03:34",
"requestId": "864b70706a7349ea83e177a49800464f",
"success": false
}