Client Metadata
Planning board​
Prerequisites​
For configurating planning board we need to have prepared:
- feature types: allocation, activity (which will be planned), resource (who will realize the activity)
- state values: for allocations, for activities
- association between: allocation and activity, resourse and allocation, resource and activity
Allocation - feature type definition
<ber:featureType id="ft_boAllocation" name="Allocation" parentId="ft_5000002" abstract="false">
<ber:container refId="ct_boAllocation"/>
<ber:featureAttributeArray>
<ber:attribute id="at_boAllocation_cl_boAllocationState" name="Allocation state" dbName="CL_BOALLOCATIONSTATE" nillable="true">
<ber:dataType>
<ber:codeListRef refId="cl_boAllocationState" displayColumn="ca_boAllocationState_description"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boAllocation_completed" name="Completed Yes/No" dbName="COMPLETED" nillable="true">
<ber:dataType>
<ber:codeListRef refId="cl_boYesNo" displayColumn="ca_boYesNo_description"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boAllocation_title" name="Title" dbName="TITLE" nillable="true">
<ber:dataType>
<ber:string maxLength="255"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boAllocation_dateFrom" name="Date From" dbName="DATEFROM" nillable="true">
<ber:dataType>
<ber:date/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boAllocation_dateTo" name="Date To" dbName="DATETO" nillable="true">
<ber:dataType>
<ber:date/>
</ber:dataType>
</ber:attribute>
<ber:featureRefAttribute id="at_boAllocation_fr_boFishingGuard" name="Fisching Guard" dbName="FR_BOFISHINGGUARD" nillable="true">
<ber:dataType>
<ber:featureRef>
<ber:attribute refId="at_boPerson_fullName"/>
<ber:featureRefRelationAssoc refId="as_boPerson_boAllocation"/>
</ber:featureRef>
</ber:dataType>
</ber:featureRefAttribute>
<ber:featureRefAttribute id="at_boAllocation_fr_boInspection" name="FR boInspection" dbName="FR_BOINSPECTION" nillable="true">
<ber:dataType>
<ber:featureRef>
<ber:attribute refId="at_boInspection_description"/>
<ber:featureRefRelationAssoc refId="as_boInspection_boAllocation"/>
</ber:featureRef>
</ber:dataType>
</ber:featureRefAttribute>
</ber:featureAttributeArray>
</ber:featureType>
Activity - feature type definition
<ber:featureType id="ft_boInspection" name="Inspection" parentId="ft_5000002" abstract="false" sharedSemantics="false">
<ber:container refId="ct_boInspection"/>
<ber:featureAttributeArray>
<ber:attribute id="at_boInspection_cl_boInspectionState" name="Inspection State" dbName="CL_BOINSPECTIONSTATE" nillable="true">
<ber:dataType>
<ber:codeListRef refId="cl_boInspectionState" displayColumn="ca_boInspectionState_description"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boInspection_estimation" name="Estimation" dbName="ESTIMATION" nillable="true">
<ber:dataType>
<ber:decimal precision="7" scale="1"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boInspection_code" name="Code" dbName="CODE" nillable="true">
<ber:dataType>
<ber:string maxLength="30"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boInspection_dateFrom" name="Inspection Start" dbName="DATEFROM" nillable="true">
<ber:dataType>
<ber:date/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boInspection_dateTo" name="Inspection End" dbName="DATETO" nillable="true">
<ber:dataType>
<ber:date/>
</ber:dataType>
</ber:attribute>
<ber:featureRefAttribute id="at_boInspection_fr_boFishingGuard" name="Fisching Guard" dbName="FR_BOFISHINGGUARD" nillable="true">
<ber:dataType>
<ber:featureRef>
<ber:attribute refId="at_boExtParty_code"/>
<ber:featureRefRelationAssoc refId="as_boFishingGuard_boInspection"/>
</ber:featureRef>
</ber:dataType>
</ber:featureRefAttribute>
</ber:featureAttributeArray>
</ber:featureType>
Resource - feature type definition
<ber:featureType id="ft_boFishingGuard" name="Fishing Guard" parentId="ft_boPerson" abstract="false">
<ber:featureAttributeArray>
<ber:attribute id="at_boFishingGuard_cardId" name="Identification ID" dbName="CARDID" nillable="true">
<ber:dataType>
<ber:string maxLength="30"/>
</ber:dataType>
</ber:attribute>
<ber:attribute id="at_boFishingGuard_cardValidTo" name="Card Valid To" dbName="CARDVALIDTO" nillable="true">
<ber:dataType>
<ber:shortDate/>
</ber:dataType>
</ber:attribute>
</ber:featureAttributeArray>
</ber:featureType>
Configuration​
For planning board configuration a page with module samo-planning-board is used.
Required properties are:
- type
- board
- resourcesGroup
- resources
Board definition - configuration example
"title": "Work orders planning",
"module": {
"type": "component:entity-modules/planning/samo-planning-board",
"board": {
"displayModes": [
{
"type": "days",
"title": "{tr:time.day}",
"days": 1,
"shiftDisplayUnits": 1,
"columnMins": 60,
"daylightMinsFrom": 420,
"daylightMinsTo": 1080,
"collapsedNight": true,
"default": true
}
]
}
}
Resources definition - configuration example
"resources": {
"title": "{tr:resources.title}",
"entities": [
{
"type": "group",
"groupId": "wfm-resources"
}
]
},
"resourcesGroup": "wfm-resources",
"resourcesPropertiesGroup": {
"ft_boFishingGuard": "employeePlanningPropertyGroup"
}
Activities​
Activities that are planned in this planning board are also configured in samo-planning-board module.
Activities definition - configuration example
"activities": {
"entities": [
{
"type": "ft_boInspection",
"allocationEntity": "ft_boAllocation",
"expectedDurationProperty": "at_boInspection_estimation"
}
],
"cardContext": "compact"
}
CardContext is used to identify, wchich detail context is used to displays information about activities. Content of the detail is defined in a separate file (under ...metadata\entities\features\appPartName\details folder). For cardContext configuration module samo-task-card-detail-module is used.
cardContext definition - configuration example
"module": {
"type": "component:entity-modules/tasks/samo-task-card-detail-module",
"title": "Inspection: {get:#at_boInspection_code}",
"subtitle": "{get:#at_boInspection_estimation}",
"coloring": {
"color": "{get:#business.state.symbology.fgColor}",
"bgColor": "{get:#business.state.symbology.bgColor}"
},
"collapsibleItems": [
"note",
"description",
"sections"
],
"sections": [
{
"module": {
"type": "component:entity-modules/workflow/samo-entity-workflow"
}
}
]
}
Allocations​
Allocation is created when an activity is planned in the planning board. They are also configured in samo-planning-board module.
There are defined:
- entities - feature type of allocation
- resource - the employee who will realize the activity
- activity - the activity for which an allocation is created
- detail -
title,plannedDateStartProperty,plannedDateEndProperty...
Allocations definition - configuration example
"allocations": {
"types": [
{
"entities": [
"ft_boAllocation"
],
"resource": {
"relation": "as_boFishingGuard_boAllocation",
"refAttribute": "at_boAllocation_fr_boFishingGuard",
"role": "rt_boFishingGuard"
},
"activity": {
"refAttribute": "at_boAllocation_fr_boInspection"
},
"completedProperty": "at_boAllocation_completed.ca_boYesNo_id",
"title": "{get:#at_boAllocation_title}",
"subtitle": "{getDateRange:#at_boAllocation_dateFrom,#at_boAllocation_dateTo, - ,LT}",
"plannedDateStartProperty": "at_boAllocation_dateFrom",
"plannedDateEndProperty": "at_boAllocation_dateTo",
"titleProperty": "at_boAllocation_title"
}
]
}