10.2.3. Creating the data model for the employee rostering project


Use this section to create the data objects required to run the employee rostering sample project in Business Central.

Prerequisites

Procedure

  1. With your new project, either click Data Object in the project perspective, or click Add Asset Data Object to create a new data object.
  2. Name the first data object Timeslot, and select employeerostering.employeerostering as the Package.

    Click Ok.

  3. In the Data Objects perspective, click +add field to add fields to the Timeslot data object.
  4. In the id field, type endTime.
  5. Click the drop-down menu next to Type and select LocalDateTime.
  6. Click Create and continue to add another field.
  7. Add another field with the id startTime and Type LocalDateTime.
  8. Click Create.
  9. Click Save in the upper-right corner to save the Timeslot data object.
  10. Click the x in the upper-right corner to close the Data Objects perspective and return to the Assets menu.
  11. Using the previous steps, create the following data objects and their attributes:

    Expand
    表10.1 Skill
    idType

    name

    String

    Expand
    表10.2 Employee
    idType

    name

    String

    skills

    employeerostering.employeerostering.Skill[List]

    Expand
    表10.3 Shift
    idType

    requiredSkill

    employeerostering.employeerostering.Skill

    timeslot

    employeerostering.employeerostering.Timeslot

    Expand
    表10.4 DayOffRequest
    idType

    date

    LocalDate

    employee

    employeerostering.employeerostering.Employee

    Expand
    表10.5 ShiftAssignment
    idType

    employee

    employeerostering.employeerostering.Employee

    shift

    employeerostering.employeerostering.Shift

For more examples of creating data objects, see Getting started with decision services.

10.2.3.1. Creating the employee roster planning entity

In order to solve the employee rostering planning problem, you must create a planning entity and a solver. The planning entity is defined in the domain designer using the attributes available in the Red Hat Business Optimizer dock.

Use the following procedure to define the ShiftAssignment data object as the planning entity for the employee rostering example.

Prerequisites

Procedure

  1. From the project Assets menu, open the ShiftAssignment data object.
  2. In the Data Objects perspective, open the Red Hat Business Optimizer dock by clicking the Red Hat Business Optimizer icon on the right.
  3. Select Planning Entity.
  4. Select employee from the list of fields under the ShiftAssignment data object.
  5. In the Red Hat Business Optimizer dock, select Planning Variable.

    In the Value Range Id input field, type employeeRange. This adds the @ValueRangeProvider annotation to the planning entity, which you can view by clicking the Source tab in the designer.

    The value range of a planning variable is defined with the @ValueRangeProvider annotation. A @ValueRangeProvider annotation always has a property id, which is referenced by the @PlanningVariable property valueRangeProviderRefs.

  6. Close the dock and click Save to save the data object.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat