MineMarket Object Event Scripts
See Set up an Object Event Script for activity steps. Contact Datamine for assistance with object event scripts.
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.
Stockpiles
For any stockpile to be exported, use an object event script to ensure that the Alias1 is set before the stockpile is saved for the first time. The Alias1 value should match the naming convention recognised by external systems.
Despatches
For any despatch to be exported, use an object event script to ensure that the Alias1 is set before the despatch is saved for the first time. The Alias1 value should match the naming convention recognised by external systems.
For any despatch to be exported, use an object event script to specify values for the JobOrderID and WorkScheduleID export mappings.
Use an object event script to create a composite sample for each barge or shipment and specify a value for the JobOrderID export mapping on the sample. The Alias1 value of the sample is a concatenation of Sample Template Alias1 + "_" + Sample Name + "_" + Process Flow Alias1.
Despatch Compartments
NotifyWorkScheduled messages for trains, barges and ships include a MaterialLotID for each despatch.
A MaterialLotID usually corresponds to a stockpile Alias1, and a MaterialLotID will ideally correspond to the Alias1 of a despatch stockpile. However, when a despatch object is first created in MineMarket, and the NotifyWorkScheduled message first produced, no despatch stockpiles exist for despatch.
Therefore, the MaterialLotID that is sent corresponds to a notional despatch stockpile. This notional despatch stockpile is derived from the Alias1 of the despatch itself and a suffix indicating the particular despatch compartment. For this functionality to work as expected, any barge or vessel must have non-default Alias1 values for its holds. These Alias1 values must also include a suffix in the sequence: _01, _02, _03... For example, for a vessel 'MyPanamax', the holds might be aliased MyPanamax_01, MyPanamax_02, and so on.
Use an object event script to enforce this rule.
Note: If the despatch stockpiles in outbound NotifyPerformanceTracked messages are to be reconciled with those announced in outbound NotifyWorkScheduled messages, each train can have only one rake, and each barge or vessel can have only one hold. This naming convention for the rake and hold Alias1 values is still recommended; for example, MyPanamax_01.