Getting started(入门指南)¶
The following guide provides the steps to implement a first version of your dynamic scheduling workflow. Review the referenced documentation in each section for more information.
1. Create core Ontology objects¶
You must create the following core object types to build a dynamic scheduling workflow:
- Create a
Scheduleobject type. This represents the events, assignments, or slots to which resources are allocated. For example, yourScheduleobject type may beMaintenance Tasks, which need to be assigned toTechnicians. - The object type must have properties that hold foreign keys to create relations with the resource(s) object types.
- This object type can have a
fixed durationBoolean property to enforce or not enforce a static duration of theSchedule. - You must enable edits on this object, as the start/end/duration and relations to the resources will be edited throughout this process.
- Create one or more resource object types that represent the resources to allocate to the schedule. For example, the persons that need to work on a task (the
Technician). - Create links between the
Scheduleobject type and the differentResourceobject types. - Create a save handler action for each
Schedule. See drag and drop for more information. - A save handler must modify the following parameters on the
Scheduleobject. Each parameter must be marked as optional.- Resource ID (the foreign key to the resource object)
- Start Time
- End Time
- The parameter IDs in your action must exactly match the property IDs used in your schedule object type (for example, if your property is
start_time, the parameter ID must also bestart_time). - The start time and end time action parameters must have the same type classes (
schedules:schedulable-start-timeandschedules:schedulable-end-time) as the corresponding properties on your schedule object type.
Review the dynamic scheduling Ontology primitives documentation for more information about the schema of each object type.
2. Configure the widget in Workshop¶
With the core objects created, you can now configure the widget for use in Workshop.
At minimum, the scheduling Gantt chart configuration requires:
- Timeline Data: Start and end timestamps that define the global bounds of the chart.
- Row Data: The
Resourceobjects corresponding to each row of the chart. - Input Data (Pucks): At least one schedule layer with:
- Schedule Object Set: The
Scheduleobjects for this layer. - Save Handler Action: The corresponding save handler action for the
Scheduleobject.- You should specify the default save handler action parameters within the configuration options using the widget-provided parameters available in the dropdown.
Review the scheduling Gantt chart widget documentation for more information.
中文翻译¶
入门指南¶
以下指南提供了实现动态调度工作流(dynamic scheduling workflow)首个版本的步骤。请参阅各部分引用的文档以获取更多信息。
1. 创建核心 Ontology 对象¶
要构建动态调度工作流,您必须创建以下核心对象类型:
- 创建
Schedule对象类型。该类型表示资源被分配的事件、任务或时段。例如,您的Schedule对象类型可以是"维护任务"(Maintenance Tasks),需要分配给"技术人员"(Technicians)。 - 该对象类型必须包含持有外键的属性,用于创建与资源对象类型的关系。
- 该对象类型可以包含一个
固定时长(fixed duration)布尔属性,用于强制或取消强制Schedule的静态时长。 - 您必须启用对此对象的编辑功能,因为在此过程中将编辑开始/结束/时长以及与资源的关系。
- 创建一个或多个资源对象类型,表示要分配给日程的资源。例如,需要处理任务的人员(即"技术人员")。
- 在
Schedule对象类型与不同的Resource对象类型之间创建链接。 - 为每个
Schedule创建一个保存处理程序操作(save handler action)。更多信息请参阅拖放。 - 保存处理程序必须修改
Schedule对象的以下参数。每个参数必须标记为可选。- 资源 ID(指向资源对象的外键)
- 开始时间
- 结束时间
- 操作中的参数 ID 必须与日程对象类型中使用的属性 ID 完全一致(例如,如果您的属性是
start_time,参数 ID 也必须是start_time)。 - 开始时间和结束时间的操作参数必须与日程对象类型上对应属性具有相同的类型类(
schedules:schedulable-start-time和schedules:schedulable-end-time)。
有关每个对象类型模式的更多信息,请参阅动态调度 Ontology 原语文档。
2. 在 Workshop 中配置组件¶
创建核心对象后,您现在可以配置该组件以在 Workshop 中使用。
调度甘特图(scheduling Gantt chart)配置至少需要:
- 时间轴数据(Timeline Data): 定义图表全局边界的开始和结束时间戳。
- 行数据(Row Data): 对应图表每一行的
Resource对象。 - 输入数据(Pucks): 至少一个调度层,包含:
- 调度对象集(Schedule Object Set): 该层的
Schedule对象。 - 保存处理程序操作(Save Handler Action): 对应
Schedule对象的保存处理程序操作。- 您应在配置选项中,使用下拉菜单中组件提供的参数来指定默认的保存处理程序操作参数。
更多信息请参阅调度甘特图组件文档。