Workflows, states and templates
A workflow is the graph of the tasks of an item (a shot, an asset): each task waits for the ones that come before it. This page explains how a task changes state, how to build and modify a workflow, and how a change propagates to items that already exist. The view that displays it is described in Node view.
Templates and references
A studio does not build each shot by hand. It defines templates (a shot template, an asset template, a project template…) that carry the structure, the properties, the workflow and the files. Each object created from a template is a reference of it: it receives a copy of everything the template carries, and stays linked to it.
- An item's workflow is the one of its item template (Project Item Model). Workflows are not found at the root of the studio: they belong to items, and therefore to projects.
- On a template, each property is in Local mode (each reference keeps its value) or Global mode (the template's value applies to all references). See Customizing Bernard.
- A template's tasks do not "work": they stay Waiting or Aborted.
The states of a task
A task has one of the following seven states.
| State | Meaning |
|---|---|
| Waiting | the task waits for what comes before it to be finished |
| Ready | it can start |
| WIP | someone is working on it (or, for a script task, it is running) |
| Pause | work is interrupted |
| Done | finished |
| Aborted | canceled: the task is ignored, as if it did not exist |
| Failed | a script task failed |
Not every task type has all the states:
| Task type | For whom | Possible states |
|---|---|---|
| Task | an artist's work (time spent, estimates, instructions) | all except Failed |
| Task Validation | a "go / no go" stopping point: a lead or a supervisor validates | all except Failed |
| Task Script | work done by a workstation, with nobody involved | all except Pause |
A compound has no state that you choose: its state is computed (see below). The workflow has an entry door (Input) and an exit door (Output), created with it.
Who decides. The server computes the state of each task, the resulting state, the progress and the time spent. The rules tied to your role (permissions, assignment, corrections) are checked by the application before sending the request. If the server refuses a request, the display goes back to the previous state.
How a task becomes Ready
You do not have to set tasks to Ready by hand: Bernard does it by following the links of the workflow.
- A task becomes Ready when all the tasks directly before it are finished (Done) and at least one of them is really Done. The first task of a new workflow is Ready right away.
- An Aborted task is transparent: if what comes before it is finished, its following tasks move on.
- If an already Done task is reopened (Ready, WIP or Pause), all the tasks that follow it go back to Waiting, even those that were Done. When it becomes Done again, its following tasks become Ready again.
- Tasks in parallel (two branches starting from the same task) work at the same time; a task that waits for several branches is a bottleneck.
Approvals and retakes
A correction (retake) is a correction-type note placed on a task, from Add Correction or Note (right-click on the task) or from a review.
- When a correction arrives on a task that is not WIP, the task goes back to Ready: a Done task reopens, and its following tasks go back to Waiting. Closing a correction does not change the state.
- As long as a correction is active, the task cannot become Done: the artist checks the correction to say they have handled it.
- A review in Bernard Review publishes a verdict: Not Approved creates a correction (so the task goes back to Ready); Approved closes the corrections and requests Done, one step per approval (the work task, then the lead's validation, the supervisor's…, never going past the next work task); Pending leaves only a note, with no change of state.
See also Notes.
Pause, WIP and time spent
- Only one task in WIP per person. Setting a task to WIP puts that person's previous current task in Pause.
- When you open a file of a Ready or Pause task, Bernard asks "Do you want to change … state to WIP ?" and reminds you of the task's instructions (not for scripts, validations or Bernard Review).
- A task in WIP goes to Pause when you stay inactive, when you close Bernard (at the next startup, Bernard offers to put it back to WIP), when your connection is lost beyond the studio's inactivity delay, or when its assignees change. The notification area menu also offers Pause current tasks.
- Each time it leaves WIP, the elapsed duration is added to the time spent of each assignee of the task. Script tasks have no human time spent.
Resulting state, current task and progress
- Resulting state of a compound or a workflow: Waiting if it has no task; otherwise the common state if all the tasks (excluding Aborted) are in the same state; WIP if at least one is WIP, Pause, Failed or Done among other states; otherwise Ready. The workflow copies its state and progress onto the item: these are the spreadsheet columns.
- Current task: the Ready, WIP, Pause or Failed tasks, and the Waiting tasks whose predecessors are all finished. Several tasks can be current at the same time (parallel branches). A compound also has its current task, displayed in Spreadsheet Multi.
- Progress: each non-canceled task weighs the same share; Done counts in full, WIP and Pause count for half. Canceled tasks count for nothing, neither in progress, nor in cumulative time, nor in the sum of budgets.
Changing a task's state: what can stop you
You change the state in the Properties tab, in the spreadsheet, in the Instructions tab (WIP and Done buttons), or by right-clicking a selection of tasks. Bernard shows State Error (refusal) or State Warning with "Do you want to continue anyway ?" in the following cases.
| Situation | Message |
|---|---|
| template task: only Waiting or Aborted | "Warning You can't change the state on Model or Template" |
| you are not assigned and do not have the Can modify the state of tasks assigned to others (override assignees) permission | "Warning you can't change this state because you are not assigned to the task" |
| Aborted without the Can manually abort tasks permission | "Warning You can't change the state to 'aborted' because your role does not allow it" |
| WIP on someone else's task | allowed only if there is a single assignee and they are online |
| Done with an active correction | "Warning: you can't change the state to Done because there is still active correction" |
| Done with an incomplete checklist | "Warning: you can't change the state to Done because at least one of the checklist element is not checked: " and the list; an administrator can override after confirmation |
| state of a running script | "Please wait Script until Script finished for change State" |
The server also refuses a state that the graph does not allow (for example Done while a previous task is not finished). Permissions are set in Roles, permissions and assignment.
Script tasks
A Task Script task is run by a workstation, with no human intervention. Its properties: Command (the command, an expression), Launch On (the workstation), Task Priority, Log and Files.
- No "Run" button: the script starts when the task becomes Ready, automatically when its previous tasks are finished, or by hand. To run it again, set it back to Ready.
- Which workstation runs it? If Launch On designates a workstation, it is the Bernard open on that workstation, provided the task has exactly one assignee. If Launch On is empty (Assigned User's Computer), it is the assignee's Bernard, on their current workstation. With several assignees, or if the workstation is off, the script does not run and the task stays Ready, with a warning. The typical case is a "robot" user alone in their department × role pair.
- Queue: at most 3 scripts at the same time per workstation (Local Settings › Max Simultaneous Script). The others wait by priority (Task Priority, from 1 to 99: the highest goes first).
- Result: the task goes to WIP at startup. An exit code of 0 sets it to Done ("Finished SuccessFully"), otherwise Failed ("Failed with exit Code N"). The Log keeps the script's output, reduced to the last lines.
- Stops: if Bernard closes or the workstation loses its connection, running scripts go to Failed.
A script is an example of studio-specific automation: Bernard does not ship a ready-made command. See Scripts and API.
Actions, triggers and events
An action (Action) is a command that you run on objects. A trigger (Trigger) runs it when a property changes. An event (Event) runs it at a date.
Actions. An action has a command (an expression), an icon, a department (to file it in the menus), Read Access (who sees it), Show Action Log and Start Up (run when Bernard starts). To use it:
- Assign it to objects: Actions tab, Assign actions button (on a template, it applies to its references). You need the Can assign actions and Can remove assigned actions permissions.
- Run it: right-click on the selection (submenus by department) or the buttons of the Actions tab.
- Follow it in the Action Log view: "Running", "Success", "Failed".
At most three actions run at the same time (Local Settings › Max Simultaneous Action). An action succeeds if it writes nothing on its error output; the exit code is not looked at.
Triggers. Reserved for the roles that have the Can edit event triggers permission.
- Right-click on the property to watch › Edit Trigger. The Triggers Edition on '…' window opens.
- Create New Trigger, then Add Condition: =, !=, >, >=, <, <= (dates and numbers), Changed, Contains (texts and lists).
- Choose the action to run.
Several conditions work as an "OR": the first one met runs the action. A property that has a trigger is displayed in red. On a template, the trigger is copied to the references. The properties that can be watched are texts, dates, numbers, durations, booleans, lists, as well as the state and the version.
Events. An event runs an action at a date: Launch At, Launch For (users or roles), Is Active, Launch Action, and Loop (Never, Every Day, Every Week, Every Hour).
Creating a workflow
Reserved for administrators and the roles that have access to project settings (Has access to projects settings).
A workflow is built on an item template: all the items created afterwards with this template will have it.
- In the Tree View, open the project's Project Settings (see Project Settings).
- Right-click on Project Item Model › Create › Project Item Model. Give it a name (for example "Shot", "Character") and click Create.
- Display the Node view: an empty Input node and Output node, in the template color.
- In the Properties panel, set the template's name, color, icon and estimates. To add properties, right-click on the template › Assign › Property.
- Click the Edit Workflow button. The border changes color and the Save and Cancel buttons appear.
- Create the tasks: right-click in the background of the view › Create › Task (work), Task Validation or
Task Script, or the
Tabkey under the cursor. The Task Templates, Task Validation Templates and Task Script Templates submenus offer ready-made tasks (department, role…). - Link the tasks: drag from an output port (on the right) to an input port (on the left). To insert a task in the middle of a link, drop it onto it. Loops are refused.
- On each task, you can already set the department, the expected role (Assign To), the estimates and the instructions: the items created will receive them.
- Click Save.
Then create an item with this template: it receives the workflow. To make an item's task or workflow reusable, right-click on the task › Copy To Template (confirmation required) adds it to the task templates.
Compounds
A compound groups the tasks of a major step (Layout, Animation, Compositing…): it is a simple grouping, the links still go from task to task, across its edges. It has a name, a department and a color.
Creating a compound (in edit mode):
- select several tasks, then right-click › Create › Compound from selected items, or
Ctrl+G; - or right-click › Create › Compound for an empty compound.
Once created:
- double-click to enter the compound; double-click again (or click the name of the main workflow) to go back;
- select the compound to choose its department and color in the Properties panel (the department's color can serve as a template);
- the compound's state is computed from its tasks (see Resulting state).
Limits: a compound cannot contain another compound, and creating one from the selection is refused if the selection already contains a compound or a task already placed in a compound.
Modifying a workflow and propagating the change
An item's workflow is a copy of its template's workflow. To modify it:
- Go to the workflow of a template, or of an item: in that case, Bernard warns that all the items of the same template will be modified at the same time ("Warning, all '…' will be modified at the same time").
- Click Edit Workflow, make your changes, then Save. To abandon everything, Cancel.
If someone else is already editing this workflow, Bernard says so and asks whether you want to continue.
Propagation. On saving, Bernard applies the change to the template and all its references: creation, modification and deletion of tasks and links, in batches. The Workflow Propagation window shows progress, throughput and remaining time, and offers Pause after current batch. Interrupting it is not recommended: the references not yet processed stay behind the template, and only the user who started the update can resume it, at the next startup of Bernard.
Adding a task to a workflow already in production. A task added in front of finished work would send items backwards. So Bernard chooses the state of the new task for each item:
- if a task that follows it is already Done, WIP, Pause or Failed, the new task is born Aborted (it is ignored);
- otherwise it is born Waiting.
The window says "Aborted on N reference(s) (work already started after it)" and "Waiting on N reference(s)". A finished item therefore stays finished. To activate the task on a specific item, switch it from Aborted to Waiting on that item (or on several by selecting them together).
Deleting a task or a compound from the template deletes it from the references; the following tasks are re-evaluated.
Propagating a value. After modifying a property on a template, right-click on the property › Set this value on all references applies the value to all references (reserved for the roles that have Can propagate property values to all child references). Bernard announces the number of items affected and asks for confirmation.
Project templates
A project template (Project Template) is a model project: creating a project from a template copies its structure, its settings, its templates and its workflows, but not its production items (nor their files).
- Creating a template (administrators): in the Tree View, right-click on a project › Copy To Template, then confirm. The template is named after the project followed by "Template".
- Creating a project from a template: right-click on Project › Create, then choose the template in the creation window. The project keeps the template's colors, images and workflows.
- Modifying a template: open it like a project and change its workflows or settings; projects created afterwards benefit from it. Projects already created are not modified.
- Deleting a template: in the Root Settings, project templates folder, Delete.
Without a template, the project is created from the default project template.
Instructions
An instruction is a guideline displayed on a task: a line of text, possibly checkable, with images or animated GIFs. Instructions guide the artist, and serve as a checklist for whoever validates.
- They exist on work and validation tasks. Not on script tasks, compounds or items.
- They are read in the Instructions tab of the Properties panel. Each person checks what they have done; Bernard keeps who checked what.
Creating or modifying instructions (roles that have the permission to create or delete instructions, and administrators):
- Select the task (on the workflow's template so that all items receive them).
- In the Instructions tab, open the menu of the edit button (Edition Mode): Edit modifies this task's instructions, Edit Model those of the template.
- For each instruction, write the text ("Write Instruction ..."), turn on Is Checkable if it must be checked, and drag and drop an image or a GIF if needed. The Move Up and Move Down arrows change the order.
- Confirm with the OK button.
The copy buttons let you Copy Instructions, Copy Text and Paste Instructions; a right-click offers Clear All Instructions. Add Correction creates a correction from the tab.
On a validation task, the lead can mark each instruction as correct or not, then add a correction: it is attached to a previous task or to the whole compound, with a correction category (see Categories), and notifies the roles planned by that category.
A task can require that all its instructions be checked before going Done (see Changing the state). To create many instructions at once, see Instructions From Table in Instructions.