This is the “Hello world” example for ROB-EX XML import, showing the minimum required information that must be supplied in order to import
- 2 resources and
- 1 production order with 2 operations
into ROB-EX.
Essentials of the XML document structure is also described. At the end of the document small exercises will point you towards how to implement more complex import files.
A full description of the XML interface is available as a PDF document: “ROB-EX XML integration.pdf”
The XML document structure
This will explain the basic structure of the XML document being used when importing production data from external ERP systems into ROB-EX.
The header
The XML document must start out with the following information instructing the XML parser how to parse and encode the remaining part of the document
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<Config>
</Config>
Normal encoding for USA and Western Europe is “iso-8859-1”. For better international support including Asia and eastern Europe the Unicode “UTF-8” standard can be recommended.
Settings
This part of the document contains different settings and parameters in order to customize the behavior of the ROB-EX integration. As an example a parameter can be passed in instructing ROB-EX to ignore new data for a production order already existing in ROB-EX.
<Settings source="MyERP" type="MRP3" version="1">
<PlaningSettings planMethod="forward"/>
</Settings>
In the above example ROB-EX is instructed to use “forward planning” for all imported production orders, unless a different planning strategy is explicitly stated on a production order.
Resources
This part of the document lists the different resources to import including the resource id, the name etc.
<ResourceList>
<Resource id="R1" name="Preparation" genCalId="_autoassign_" specCalId="R1-S" type="normal" >
<SimpCal id="R1-S" type="4" />
</Resource>
<Resource id="R2" name="Packaging" genCalId="_autoassign_" specCalId="R2-S" type="normal" >
<SimpCal id="R2-S" type="4" />
</Resource>
</ResourceList>
The above example will import two (2) different resources named respectively “Preparation” and “Packaging”. None of the resources are resource groups (type=“normal”). Note that each resource has a unique id and also note that the general calendar to use for both of the resources is set to the keyword: “autoassign”. This will cause ROB-EX to assign the standard calendar to the resource. The standard calendar must have been created manually in ROB-EX using the menu Edit->Calendar prior to importing this file.
Also note the sub-tag “SimpCal”. This tag will create an empty calendar holding specific exceptions for the resource. If missing assigning specific exceptions in the calendar for a resource will fail. The specific calendar for each resource must have unique id (e.g. “R1-S”) being referenced in the .specCalId attribute.
Production orders
List all the production orders to import between the enclosing tags
<ProductionOrderList>
<ProdOrder id="1000" name="1000" desc="Description for order 1000" prodId="1000" quantity="100"
cust="Customer" matCal="18-08-2008 07:00" endCal="20-09-2008" state="20" >
<Product id="1000" name="Product A" />
</ProdOrder>
</ProductionOrderList>
The above example creates a ProductionOrder with id and name “1000”. Note that ROB-EX requires a separate tag being enclosed in the tag. The product being described in the tag is not a reference to a common product or raw material table, rather this should be thought of as a copy of a common product that has a 1-1 relationship to the production order it is enclosed within.
This means that the .id attribute is not, as many expects, a reference to a common product id. Instead the .id must be unique between all tags currently known to ROB-EX. Because of the 1-1 relationship to the production order we recommend just using the id of the production order for the .id attribute.
Operations
Operations must be enclosed within the tags and must be placed within the tags
br.
The workload of the first operation is calculated based on the quantity to produce (.quantity) and the capacity of the operation (.capa).
The second operation uses a fixed workload (wlType=“0”) of 3 hours (wl=“3”).
Note how the resource assigned to each operation is specified in the .resId attribute (e.g. “R1”). The resId value must point to an existing resource with the specified id.
Putting it all together
This is the full minimal example that can be imported into ROB-EX using the menu File->Import->XML Import.
Note: In order to automatically assign a general calendar to the resources at import time, a standard calendar must have been created manually in ROB-EX (using the menu Edit->Calendar and selecting properties for a new general calendar) prior to importing this file.
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<Config>
<Settings source="MyERP" type="MRP2" version="1">
<PlaningSettings planMethod="forward" />
</Settings>
<ResourceList>
<Resource id="R1" name="Preparation" genCalId="_autoassign_" specCalId="R1-S" type="normal" >
<SimpCal id="R1-S" type="4" />
</Resource>
<Resource id="R2" name="Packaging" genCalId="_autoassign_" specCalId="R2-S" type="normal" >
<SimpCal id="R2-S" type="4" />
</Resource>
</ResourceList>
<ProductionOrderList>
<ProdOrder id="1000" name="1000" desc="Description for order 1000" prodId="1000" quantity="100" cust="Customer" matCal="18-08-2008 07:00" endCal="20-09-2008" state="20" >
<Product id="1000" name="Product A" />
<OperationList>
<Opr oprId="1000-10" name="Prep operation" state="20" wlType="1" capa="20.0" postQueueTime="1.0" >
<ResAllocList>
<ResAlloc resId="R1" selected="true" />
</ResAllocList>
</Opr>
<Opr oprId="1000-20" name="Packaging operation" state="20" setUp="3.00" wlType="0" wl="3" >
<ResAllocList>
<ResAlloc resId="R2" selected="true" />
</ResAllocList>
</Opr>
</OperationList>
</ProdOrder>
</ProductionOrderList>
</Config>
The result of importing the above file is a plan with two resources and a single production order. The production order will be planned forward from the specified material date of “18-08-2008 07:00”. With a standard calendar opening op weekday from 07:00-15:00 the result will be like this:
Exercises
To get to know the import functionality better we suggest that you complete as many of the following exercises as possible. Start out importing the minimum example given above, into a nearly empty ROB-EX (only a standard calendar need to exist).
Edit the file in Notepad++ or some other text editor.
- Change the status of the imported production order to “Start possible”. Hint:
<ProdOrder>.state="40"
- Add a third resource “Shipping” with a resource efficiency of 90%. Also add a third operation “Shipment” with a fixed workload of 5.5 hours – the operation should be last in the route. Assign it to the “Shipping” resource. The operation should have an overlap of 50 pieces (i.e. once 50 pieces have been produced on the packaging operation the “Shipment” operation can start)
Hints: to specify operation overlap use the .“overlapCount” attribute. Remember to specify the overlap on the correct operation. Also see chapter “7.7.4 Definition of overlap between operations” in the XML integration specification.
- Try to plan the production orders backward from delivery date. Hint: the delivery date is specified in attribute
<ProdOrder>.endCalendar
Experiment what happens if you, after import, make manual changes to the production order (i.e. move operations to new dates) and then re-import the same file again.
- Add a second production order named “1001” with a single operation on the “Preparation” resource. This second production order should be added to the same import file and must be a sub-order going to be finished prior to the “Packaging” operation on order “1000”. The quantity to produce, workload times etc. can be freely selected.
Hint: check documentation for chapter “7.6 tag”
- Also you now want to instruct ROB-EX to keep manual changes that have been done in ROB-EX, even though the same file is reimported. To do this you want to add the following to the area of the import file.
<Settings source="MyERP" type="MRP2" version="1">
<PlaningSettings planMethod="forward" />
<ProdOrderSettings oprTimeMaster="destination" resourceMaster="destination" />
</Settings>
Verify that manual changes are no longer overwritten on re-imports. Also check other possible <ProdOrderSettings>
in the documentation.
- Import a project named “Project 1” with the project id and number “1”. Assign both production order “1000” and “1001” to the project
Hint: check documentation in chapter “7.3 tag”. Keep both projects and production orders in the same import file.
- Change the status of operation with id=“1000-20” (the packaging operation) to started and import a progress of 50 pieces. The operation was first started on “19-08-2008 08:00” (realStartCal) and the progress of 50 pieces was reported on “19-08-2008 12:00” (lastStartCal).
Hint: check documentation for chapter “7.10 Progress tag”
- We now want to create a new resource group called “Preparation group”. Create also a new normal resource “Preparation 2” and assign this new resource to the new resource group along with the already existing “Preparation” resource. I.e. you will now have a resource group with two members: “Preparation” and “Preparation 2”
- Define a general calendar (termed in XML). It should have a WEEK_CALENDAR based on the tag as described in chapter “5.3.1 tag”. Working times of this calendar can be freely selected. This example will add a general calendar opening up Mondays:
<CompCalList>
<CompCal id="prep-01" name="Preparation calendar" specificCalId="prep-01-S" weekCalId="prep-01-W">
<SimpCal id="prep-01-S" type="3">
</SimpCal>
<SimpCal id="prep-01-W" type="1">
<WeekPlan day="Monday" startDate="01-08-2008" endDate="">
<DayPer startTime="07:00" endTime="15:00" available="true" desc="shift 1"/>
<DayPer startTime="11:00" endTime="11:30" available="false" desc="break"/>
</WeekPlan>
</SimpCal>
</CompCal>
</CompCalList>
The above calendar definition should be added after the resources in the import file before projects and production orders. Also make sure that you specify <Resource>.genCalId="prep-01"
on the resources using this calendar.
Experiment with opening up the calendar on other days than Mondays.
See documentation chapter “5.3 Calendar definition”
- Try to import a single material and also assign one of the operations to consume this material.
Hint: see documentation chapter “4 Specifying material entries”
Post your comment on this topic.