Gantt Description
🔥 This feature is currently considered experimental. Try it out and give feedback by reporting bugs and suggesting new features. It’s not recommended for production use.
🛠️ This feature is available to studio makers.
This page explains how the Gantt description can be configured in Sirius Web.
1. Introduction
Gantt descriptions focus on describing task hierarchies, scheduling expressions, and task dependency tools. Every field is configured with the same expression editor and palette pickers you already use elsewhere in Sirius Web. Taken together, these pieces let you describe timelines that stay synchronized with your semantic model, support task creation and editing operations, and expose dependency management directly inside Sirius Web.
2. Configuring Gantt descriptions
When you create a GanttDescription inside your view you will typically:
-
Configure the description’s metadata (name, domain type, precondition, title).
-
Set the
dateRoundingExpressionto snap inline edits to meaningful intervals (for example12Hfor half days). -
Add one or more
TaskDescriptionentries to map semantic elements to rows on the timeline. -
Provide tools for creating, editing, deleting, and connecting tasks so the UI can react to user actions.
The same variables you use elsewhere are available here (self, editingContext, etc.), so you can reuse existing expressions or services.
3. Gantt Description
To define how your model is represented with a Gantt representation, the specifier needs to create a GanttDescription in the View model.
-
Name: A name that helps the specifier to know what the GanttDescription is about -
Domain Type: Type of the object on which it is possible to create the representation -
Precondition Expression: An expression that determines if it is possible to create the representation-
selfvariable is the semantic element associated with theGantt.
-
-
Title Expression: The initial name of the representation once created-
selfvariable is the semantic element associated with theGantt.
-
-
Date Rounding Expression: An expression that returns a string that is a time duration that will define how the date is rounded when changing the date from the Gantt representation. The string contains-
an integer which is the number of time unit.
-
a character among {D,H,m} corresponding to a Day, Hour or minute time unit. Example: to round to half a day, the expression must returns
12HNote: To be coherent, ifStart Time ExpressionandEnd Time Expressionof Task description return aLocaDate,Date Rounding Expressionshould be in days.
-
4. Task descriptions
The TaskDescription is used to define the direct tasks of its parent in the tasks hierarchy.
It can be the root tasks in the Gantt or the sub-tasks in a task.
-
Name: A name that helps the specifier to know what the TaskDescription is about -
Semantic Candidates Expression: An expression that returns one or more semantic elements. Each semantic element will be represented by a task.-
selfvariable is the semantic element associated with theGantt.
-
-
Domain Type: Type of the object used to filter the semantic object represented by a task
All the following expressions are called as many times as the number of semantic elements returned by the Semantic Candidates Expression.
self variable is the current semantic element.
-
Name Expression: An expression that defines the name of the task -
Description Expression: An expression that defines the description of the task -
Start Time Expression: An expression that returns ajava.time.Instantorjava.time.LocalDateto define the start date of the task. -
End Time Expression: An expression that returns ajava.time.Instantorjava.time.LocalDateto define the end date of the task. -
Progress Expression: An expression that returns an integer between 0 and 100 to define the percentage progress of the task. -
Compute Start End Dynamically Expression: An expression that returns a boolean. If true and if the task contains sub-tasks, the start and end dates displayed in the Gantt are computed from the sub-tasks. The start date(respectively the end date) is the lower(respectively upper) date of the sub-tasks dates. -
Task Dependencies Expression: An expression that returns a list of semantic elements to define dependency relations between the current task and the tasks associated the returned semantic elements.
4.1. Task description as sub task
To define tasks as the second level of the tasks hierarchy, create a TaskDescription in the TaskDescription.
It is also possible to reuse TaskDescription so that it is possible to define a recursive description.
Use Reused Task Element Descriptions field to select existing TaskDescription.
5. Tools
Many tools can be configured for Task.
All the tools are created under GanttDescription.
Note that, by default, a tool does nothing.
You need to add operations in the tool to make changes in the semantic model.
Typical operations:
-
Change Context: It allows to change theselfvalue. But typically this operation is useful if you just want to call a java service that will implement the tool behavior. -
Create Instance: Creates a semantic object and add it in the defined feature of theselfsemantic element -
Set Value: Sets the value on a given feature onselfsemantic element -
Delete Element -
etc
Each tool gives access to variables that can be used in the expression of the tools. When the tool is executed, the system will set the variables(that depends on the execution context of the tool) and executes the operations associated with the tool.
5.1. Task tools
-
Create Task Tool: This tool defines the behavior when the user creates a task using the button in the task contextual palette in Gantt. Available variables:-
self: The semantic element associated with the selected Task
-
-
Delete Task Tool: This tool defines the behavior when the user deletes a task using the button in the task contextual palette in Gantt. Available variables:-
self: The semantic element associated with the selected Task
-
-
Edit Task Tool: This tool defines the behavior when the user uses the handles to change start or end dates or the progress. Available variables:-
self: The semantic element associated with the selected task. -
newName: The new value of the name. -
newStartTime: The new value of the start time. -
newEndTime: The new value of the end time. -
newDescription: The new value of the description. -
newProgress: The new value of the progress.
-
-
Drop Task Tool: This tool defines the behavior when dragging and dropping, in the table part of Gantt, a task before, after or inside another task. Available variables:-
sourceObject: The semantic element associated with the dragged task -
targetObject: The semantic element associated with the target task where the task is dropped. -
sourceTask: The draggedTask. -
targetTaskOrGantt: The target where the task is dropped. It can beGanttor anotherTask. -
indexInTarget: The index of the dropped task inside the new list of tasks where it is dropped. index=0 means first position.
-
5.2. Dependency tools
-
Create Task Dependency Tool: This tool defines the behavior when creating a task dependency by dragging the dependency handler from one task to another. Available variables:-
sourceObject: The semantic element associated with the task from which the dependency link is initiated. -
targetObject: The semantic element associated with the dependant task where the dependency finishes.
-
-
Delete Task Dependency Tool: This tool defines the behavior when deleting a task dependency using the button in the task dependency contextual palette in Gantt. Available variables:-
sourceObject: The semantic element associated with the task from which the dependency link is initiated. -
targetObject: The semantic element associated with the dependant task where the dependency finishes.
-