Import Mine Sources
Note: From MineMarket 5.6, the NotifyOperationsScheduledEvent class previously used to import mine sources and surveys is no longer supported.
A ProcessEvents message with either a NotifyWorkExecutedEvent or NotifyWorkReconciledEvent node can be used to create stockpile categories at a mine source location and create or move mine sources with surveys in MineMarket.
A mine source is a type of stockpile, from which material can only be removed. Mine sources can be organised in stockpile categories. The stockpile categories can be used to represent logical physical groupings (for example, Pit, Seam, Strip, Block).
When defining a supply chain, mine sources are the start of the supply chain. Mine sources hold details about mine quality at inception, for the throughput of material into the supply chain. Although a mine source can contain other mine sources, a mine source is the fundamental initial point, against which transactions start.
Note: Words in coloured text refer to node names in the XML file. Words in bold refer to field names or data in MineMarket, or required text strings. Words in italics refer to field values in MineMarket.
Subscriber Name
The subscriber name must be NotifyWorkExecutedEvent or NotifyWorkReconciledEvent.
Class Name
The class names are BulkTrak.Integration.PublishSubscribe.B2MML_Classes.NotifyWorkExecutedEvent and BulkTrak.Integration.PublishSubscribe.B2MML_Classes.NotifyWorkReconciledEvent. Either class can be used.
XML Example
Note: The following example has been simplified from the original. The example shows a NotifyWorkExecutedEvent node with mine source and a mine source survey that includes one analyte, one contributor and one geological attribute.
<?xml version="1.0" encoding="UTF-8"?>
<p:NotifyWorkExecutedEvent xmlns:p="http://www.mesa.org/xml/B2MML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mesa.org/xml/B2MML platform:/resource/Schema/B2MML-ProcessEvents.xsd">
<p:ApplicationArea>
<p:Sender>
<p:LogicalID>GMS</p:LogicalID>
<p:ComponentID>GMS</p:ComponentID>
</p:Sender>
<p:CreationDateTime>2021-09-11T17:30:00Z</p:CreationDateTime>
</p:ApplicationArea>
<p:DataArea>
<p:Notify/>
<p:WorkExecutedEvent>
<p:ID>705E9B42-6F72-46E8-85AF-370757D5C884</p:ID>
<p:HierarchyScope>
<p:EquipmentID>BusinessAreaAlias1Segment</p:EquipmentID>
<p:EquipmentLevel>Enterprise</p:EquipmentLevel>
<p:HierarchyScopeChild>
<p:EquipmentID>BusinessAreaAlias1Segment</p:EquipmentID>
<p:EquipmentLevel>Site</p:EquipmentLevel>
</p:HierarchyScopeChild>
</p:HierarchyScope>
<p:EventTimestamp>2021-09-11T17:30:00Z</p:EventTimestamp>
<p:EventEffectiveTime>2021-09-11T17:30:00Z</p:EventEffectiveTime>
<p:AddedJobResponseRecord recordTimestamp="2021-09-11T17:30:00Z" effectiveTimestamp="2021-09-11T17:30:00Z">
<p:JobResponse>
<p:ID>190115_3MonthPlan - Output_Path_MTP_20190115V1</p:ID>
<p:StartTime>2021-09-11T10:30:00Z</p:StartTime>
<p:EndTime>2021-09-11T17:30:00Z</p:EndTime>
<p:WorkType>Quality</p:WorkType>
<p:WorkMasterID>Grade Control Modelling</p:WorkMasterID>
<p:MaterialActual>
<p:ID/>
<p:MaterialDefinitionID>Insitu Ore</p:MaterialDefinitionID>
<p:MaterialLotID>MineSourceAlias1</p:MaterialLotID>
<p:MaterialUse>Inventoried</p:MaterialUse>
<p:SpatialDefinition>
<p:Value>POLYGON Z ((593480.0 1218420.0 185.5, 593500.0 1218420.0 185.5, 593500.0 1218400.0 185.5, 593480.0 1218400.0 185.5, 593480.0 1218420.0 185.5))</p:Value>
<p:Format>WKT</p:Format>
<p:SRID>Local</p:SRID>
<p:SRIDAuthority/>
</p:SpatialDefinition>
<p:Quantity>
<p:QuantityString>647.5</p:QuantityString>
<p:DataType>Numeric</p:DataType>
<p:UnitOfMeasure>t</p:UnitOfMeasure>
<p:Key>mass</p:Key>
</p:Quantity>
<p:Quantity>
<p:QuantityString>300</p:QuantityString>
<p:DataType>Numeric</p:DataType>
<p:UnitOfMeasure>BCM</p:UnitOfMeasure>
<p:Key>volume</p:Key>
</p:Quantity>
<p:StorageLocation>
<p:Location>StockpileCategoryAlias1Segment</p:Location>
<p:LocationType>Operational Location</p:LocationType>
<p:LocationChild>
<p:Location>StockpileCategoryAlias1Segment</p:Location>
<p:LocationType>Operational Location</p:LocationType>
<p:LocationChild>
<p:Location>StockpileCategoryAlias1Segment</p:Location>
<p:LocationType>Operational Location</p:LocationType>
</p:LocationChild>
</p:LocationChild>
</p:StorageLocation>
<p:HierarchyScope>
<p:EquipmentID>LocationAlias1Segment</p:EquipmentID>
<p:EquipmentLevel>Area</p:EquipmentLevel>
</p:HierarchyScope>
<p:MaterialActualProperty>
<p:ID>Opening Date</p:ID>
<p:Value>
<p:ValueString>2021-09-11T10:30:00Z</p:ValueString>
<p:DataType>DateTime</p:DataType>
<p:UnitOfMeasure xsi:nil="true"/>
</p:Value>
</p:MaterialActualProperty>
<p:MaterialActualProperty>
<p:ID>AnalyteAlias1</p:ID>
<p:Value>
<p:ValueString>48</p:ValueString>
<p:DataType>Numeric</p:DataType>
<p:UnitOfMeasure>UOMAlias1</p:UnitOfMeasure>
<p:Key>WAG</p:Key>
</p:Value>
</p:MaterialActualProperty>
<p:MaterialActualProperty>
<p:ID>ContributorAlias1</p:ID>
<p:Value>
<p:ValueString>100</p:ValueString>
<p:DataType>Decimal</p:DataType>
<p:UnitOfMeasure>UOMAlias1</p:UnitOfMeasure>
<p:Key>Contributor</p:Key>
</p:Value>
</p:MaterialActualProperty>
<p:MaterialActualProperty>
<p:ID>GeologicalAttributeAlias1</p:ID>
<p:Value>
<p:ValueString>15</p:ValueString>
<p:DataType>string</p:DataType>
<p:UnitOfMeasure xsi:nil="true" />
<p:Key>Geological Attributes</p:Key>
</p:Value>
<p:MaterialActualProperty>
</p:MaterialActual>
</p:JobResponse>
</p:AddedJobResponseRecord>
</p:WorkExecutedEvent>
</p:DataArea>
</p:NotifyWorkExecutedEvent>
XML Nodes
Node and Path |
Notes |
---|---|
ApplicationArea » CreationDateTime |
If AddedJobResponseRecord or ChangedJobResponseRecord does not include a timestamp, this time is saved in the mine source's extended data in the Date7 field. If AddedJobResponseRecord or ChangedJobResponseRecord does include a timestamp, this time is ignored in processing. Note: If used, the time must be later than existing data in MineMarket. If the time is earlier than the Date7 field in the extended data of the mine source, no data is saved. |
HierarchyScope » EquipmentID (with EquipmentLevel set to "Enterprise" or "Site") |
The Alias1 segment of an existing business area. The applicable business area is the node most nested in the XML structure. See notes below about Alias1 segments. |
HierarchyScope » EquipmentID (with EquipmentLevel set to "Area") |
The Alias1 segment of an existing mine source location in the applicable business area. The applicable location is the node most nested in the XML structure. See notes below about Alias1 segments. |
AddedJobResponseRecord or ChangedJobResponseRecord |
The start node for the mine source. Can include a timestamp for the mine source. If included, this timestamp is saved in the mine source's extended data in the Date7 field. Note: The time must be later than existing data in MineMarket. If the time is earlier than the Date7 field in the extended data of the mine source, all data in this AddedJobResponseRecord or ChangedJobResponseRecord node is ignored. |
JobResponse » EndTime |
The Opening Date of the mine source, and the Date Surveyed of the survey. If a MaterialActualProperty node with the ID "Opening Date" is included, its ValueString timestamp is used instead of the Job Response » EndTime. If neither node includes a timestamp, the current date and time is used. Note: If the survey date is earlier than the opening date or later than the closing date of the mine source, the B2MML adaptor updates the opening or closing date of the mine source. |
JobResponse » MaterialActual |
The start node for the mine source. |
JobResponse » WorkMasterID |
The node that controls the creation of mine sources. The default value is the text string "Grade Control Modelling". Note: The default value for the mine source WorkMasterID can be configured in the BulkTrak.Integration.PublishSubscribe.dll.config file. |
JobResponse » MaterialActual » MaterialDefinitionID |
The Alias1 of the mine source Current Product, which must be one of "Insitu Ore", "Insitu Waste" or "Overburden". Note: The mine source Product Type is set to Single Product. If the text string is missing or does not match one of these values, the mine source is not created. |
MaterialActual » MaterialLotID |
The Alias1 and Name of the mine source. If the mine source with the same Alias1 already exists, the dates and survey results are updated in the mine source. If the mine source does not already exist, the mine source is created. |
MaterialActual » MaterialUse |
A text string that must be the word "Inventoried" (case-sensitive). |
MaterialActual » StorageLocation | The start node for the stockpile category. |
MaterialActual » StorageLocation » Location |
The Alias1 segment of a stockpile category. New mine sources are created in the stockpile category that is the most nested node in the XML structure. Existing mine sources are moved if they were in a different stockpile category. If the stockpile category does not already exist, the stockpile category is created. See notes below about Alias1 segments. Note: The structure of the storage location and hierarchy scope (below) must fully match the nested structure of business areas, mine source locations and existing stockpile categories. Otherwise, an error occurs. |
MaterialActual » StorageLocation » LocationType |
If the text string value is "Operational Location" (case-insensitive), the node represents a stockpile category. Any other values are ignored in processing. |
MaterialActual » StorageLocation » LocationChild | The start node for a nested stockpile (sub)category. |
MaterialActual » HierarchyScope » EquipmentID (with EquipmentLevel set to "Area") |
The Alias1 segment of a location. See notes below about Alias1 segments. |
MaterialActual » MaterialActualProperty |
Several possible nodes as described below. |
MaterialActualProperty Nodes
There are several possible MaterialActualProperty nodes. A mine source may include some or all of the following nodes.
Values enclosed in double quotes refer to constant text strings. Properties with the "string" or "DateTime" data types also have a <UnitOfMeasure xsi:nil="true" /> sub-node.
Note: The analyte definitions, contributors and geological attributes included in the message must exist in MineMarket.
MaterialActualProperty » ID—"Opening Date"—The Opening Date of the mine source, and the Date Surveyed of the survey.
- ValueString—The timestamp in the format "YYYY-MM-DDThh:mm:ssZ", where Z represents Coordinated Universal Time (UTC)
- DataType—"DateTime"
(Multiple) MaterialActualProperty » ID—The Alias1 of each analyte in the survey—Only applicable for analytes that have a value.
- ValueString—The numerical result for the analyte.
- DataType—"Numeric"
- UnitOfMeasure—The Alias1 of the unit of measure.
- Key—"WAG"
(Multiple) MaterialActualProperty » ID—The Alias1 of each contributor in the survey.
- ValueString—The contributor percentage.
- DataType—"Decimal"
- UnitOfMeasure—The Alias1 of the unit of measure.
- Key—"Contributor"
Note: The total of contributor percentage values for a mine source must equal 100%, otherwise an error is caused.
(Multiple) MaterialActualProperty » ID—The Alias1 of each geological attribute in the survey.
- ValueString—The text list value for the geological attribute.
- DataType—"string"
- Key—"Geological Attributes"
Notes and Troubleshooting
Nodes not described in the tables above do not correspond to MineMarket data and are ignored in processing.
Multiple instances of nodes (with their sub-nodes) can exist within the one file:
- Multiple JobResponse nodes: For importing results for multiple mine sources in the one file. All mine sources must have the same business area and location.
- Multiple MaterialActualProperty nodes: For importing results for multiple analytes, contributors and/or geological attributes in the one survey.
When the B2MML adaptor processes the XML file, if one mine source, analyte or contributor causes an error, no mine sources are saved.
Alias1 Segments
The Alias1 segments in the XML file are concatenated in MineMarket.
For example, in the definition of the location, note the Alias1 concatenation:
<p:HierarchyScope>
<p:EquipmentID>Company</p:EquipmentID> (Alias1: Company)
<p:EquipmentLevel>Enterprise</p:EquipmentLevel>
<p:HierarchyScopeChild>
<p:EquipmentID>Orminejo Mine</p:EquipmentID> (Alias1: Company_Orminejo Mine)
<p:EquipmentLevel>Site</p:EquipmentLevel>
<p:HierarchyScopeChild>
<p:EquipmentID>Mining Area</p:EquipmentID> (Alias1: Company_Orminejo Mine_Mining Area)
<p:EquipmentLevel>Area</p:EquipmentLevel>
Note: Nested HierarchyScope nodes are called HierarchyScopeChild.
Following on from the example above, in the stockpile category hierarchy definition, note the Alias1 concatenation:
<p:StorageLocation>
<p:Location>Plateau 26</p:Location> (Alias1: Company_Orminejo Mine_Mining Area_Plateau 26)
<p:LocationType>Operational Location</p:LocationType>
<p:LocationChild>
<p:Location>Pit 05</p:Location> (Alias1: Company_Orminejo Mine_Mining Area_Plateau 26_Pit 05)
<p:LocationType>Operational Location</p:LocationType>
<p:LocationChild>
<p:Location>Flitch B</p:Location> (Alias1: Company_Orminejo Mine_Mining Area_Plateau 26_Pit 05_Flitch B)
<p:LocationType>Operational Location</p:LocationType>
</p:LocationChild>
</p:LocationChild>
</p:StorageLocation>
The Alias1 of a new stockpile category has the structure LocationAlias1_(StorageLocation)Location. The Alias1 of a new stockpile subcategory has the structure ParentStockpileCategoryAlias1_(LocationChild)Location. The name of the new stockpile subcategory is (LocationChild)Location.
Note: Nested Location nodes are called LocationChild.