Assign a workflow template to the given project, or to one target language of the project.
URL
(PUT) /api/projects/{pid}/settings/workflow?id={id}
(PUT) /api/projects/{pid}/settings/workflow?id={id}&locale={locale}
PARAMETERS
URL parameters are:
|
pid |
The project id. Use projects/list to find projects and get the project IDs. |
int, Mandatory |
|
id |
The workflow template to assign. Use settings/workflows/list to find templates and get the template IDs and names. Please note that a template is defined for either Codyt or Standard projects. Make sure to pick a template compatible with your project. |
int, Mandatory |
|
locale |
A target language of the project, for example Upper and lower case do not matter ( |
string, Optional |
RESULTS
None.
BEHAVIOR
|
Call |
What changes |
What stays as it is |
|---|---|---|
|
Without |
The whole workflow. The template's steps become the default steps for all languages, and all its project-wide settings apply to the project. Language-specific steps set before are removed. |
Nothing of the previous workflow. |
|
With |
The steps of that language only. |
The default steps, the steps of other languages, and all project-wide settings. |
REMARKS
-
Call order: send the call without
localefirst, then one call per language that needs its own steps. A later call withoutlocalereplaces the whole workflow again and removes all language-specific steps. Set them again afterwards if needed. -
One call at a time: send the calls for one project one after another, not in parallel. A call sent in parallel may fail and must then be sent again.
-
Languages without their own steps follow the default steps. Calling again with the same
localereplaces that language's steps. To return one language to the default steps, call withoutlocaleagain, then set the other languages again. -
Project-wide settings: a call with
localetakes only the step list from the template. Every other template setting is applied only by a call withoutlocale. This includes start workflow, deliverable creation, auto-consolidate, auto-deliver, job deadlines and reminders, automatic cost calculation, supplier invoice options, job openings, project and order completion, and Flex and CMS settings. -
Existing jobs are never changed, in Standard or Codyt projects. The new steps apply to jobs created afterwards. In Codyt projects they also apply to new file versions, unless the project uses Keep same workflow between file versions, which reuses the previous version's workflow. Reminders already scheduled for open jobs are not recalculated.
-
Limit: through this method, a project workflow can hold at most 30 step lists: the default steps plus 29 languages with their own steps. Languages that were removed from the project but still have steps count too. You can always replace the steps of a language that already has its own. Calls without
localeare never blocked by this limit. -
Differences with the user interface: on the project's Workflow & Suppliers page, Preset from Workflow Template with a language selected also overwrites the project-wide settings. A call with
localedoes not. Applying a preset to the default steps in the user interface keeps the language-specific steps. A call withoutlocaleremoves them. -
Reading the result: the steps show on the project's Workflow & Suppliers page, the same as steps set by hand. By API, use projects/{pid}/settings/workflow (GET): in
details.steps, the default steps are under"*"and each language's own steps are under its language code as spelled in the project, for example"fr".
ERRORS
None of these errors change the project workflow.
|
Condition |
Result |
|---|---|
|
|
Error on |
|
|
Error on |
|
|
Error on |
|
The template does not match the project type (Codyt or Standard) |
Error, with or without |
|
|
Error, with or without |
EXAMPLES
The project has French, German and Spanish as target languages. German and Spanish should follow Translation + Revision (template 10). French should follow Translation + Revision + QA (template 25).
1. Set the project default. Template 10's steps become the default for all languages, and its settings apply to the project:
(PUT) /api/projects/{pid}/settings/workflow?id=10
2. Give French its own steps. Only French's steps change:
(PUT) /api/projects/{pid}/settings/workflow?id=25&locale=fr
New French jobs now follow template 25's steps. New German and Spanish jobs follow template 10's steps. All project-wide settings come from template 10.