This is a sample use case for creating a workflow and covers most aspects of the procedure.
Workflow templates give more examples of different kinds of workflows.
To create a Strings workflow in Orchestrator that creates a job when a file is uploaded to a project and contains the keys affected by the upload, follow these steps:
-
(Optional) Create a working folder.
-
From the menu, select Folder.
The window opens.
-
Provide a name for the folder and click Save.
The folder is listed on the page.
-
Click the folder name to open it.
-
-
Create a workflow.
-
From the menu, select Workflow.
The window opens.
Optionally attach an existing .JSON file to automatically create a workflow. The description will be taken from the file.
-
Provide a and for the new workflow.
-
Click Save.
The new workflow is listed on the page.
Note
A library of common templates is also available for creating workflows.
-
-
Define a workflow.
-
Click on the workflow name to open it.
The workflow opens in the tab.
-
Provide an event that the workflow should be listening for.
For this sample procedure, the
event will be used and is the event that occurs once a file has been uploaded and processed in a Strings project.uploads:create
From the tab on the window, search for the word uploads.
Listed events are both TMS and Strings webhooks.
-
Drag and drop the
block on to the first workflow step.uploads:create
The step is created and details are presented in the tab on the right of the window.
The name of the block can be changed to something in normal language that describes what the block does.
-
Provide an action to the workflow. For this sample procedure the
action will be used for authentication (it fetches access tokens during runtime).Fetch access tokens
From the tab on the window, search for phrase.
A list of events is presented in the tab.
-
Drag and drop the
action block below theFetch access tokens
trigger to connect them.uploads:create
-
After authentication, a function can be provided. For this sample procedure, locales from a Strings project will be listed.
From the tab on the window, search for list locales.
A list of events is presented in the tab.
-
Drag and drop the
action block below theList locales
action to connect them.Fetch access tokens
-
The list of locales will need to be filtered for the purposes of the example. The
action will be used for this.Transform JSON with jq
From the tab on the window, search for Transform JSON with jq.
-
Drag and drop the
action block below theTransform JSON with jq
action to connect them.List locales
-
A job can now be created with the results of the workflow. For the purposes of the example, a Strings job will be created.
From the tab on the window, search for create a job.
-
Drag and drop the
action block below theCreate a job
action to connect them.Transform JSON with jq
-
Every action can have conditions defined with logical AND and OR statements to create more outputs. For the purposes of the example, two target locales will result from the
action.Create a job
Drag and drop the
action block below theTransform JSON with jq
action to connect them.Create a job
Drag and drop another
action block onto theTransform JSON with jq
action to add another branch.Create a job
These actions will run in parallel.
-
Dependent on the conditions set in the
action, a locale will be created based on the result of theCreate a job
action.Transform JSON with jq
Drag and drop a
action block below eachAdd a target locale to a job
action to connect them.Transform JSON with jq
-
Once a job locale is created, the job can be started.
Drag and drop the
action block below aStart a job
action to connect them. From the secondCreate a job
action, drag the connector dot to theCreate a job
action.Start a job
-