This chapter will explain how to interface between an external system (e.g. ERP) and ROB-EX using the XML integration module.

It is possible to transfer data both ways.

Data possible to transfer with XML interface

  • Resources
  • Resource calendar
  • Products and raw materials
  • Projects
  • Production orders
  • Operations
  • BOM information (linked to operations)
  • Links between production orders (sub order relations ship)
  • Document links
  • and much more…

Interface developers are encouraged to initially focus on these subjects

  1. Read the chapter XML minimal example, which includes a hands-on tutorial that will get you started quickly. This chapter also contains additional exercises that will help interface developers to explore the more complex areas.
  2. Download and investigate the examples available in ROB-EX_XML_resources.zip. This file contains XSD validation schema and ready-made examples.
  3. Read the PDF document ROB-EX XML integration.pdf. This document explains in detail how to create legal ROB-EX XML interface files. This document also contains comprehensive examples.
  4. If using an ETL tool is of interest, then watch the videos on Talend Open Studio.

The user can manually activate the exchange or a macro can be created that automatically imports an XML file at start-up of the client or automatically when a new or changed file is detected. Please refer to chapter Setup the XML Plugin macro” for a description of XML Plugin macro.

  1. Manual activation of XML import and export
  2. Using the XML Plugin macro
  3. Setup the XML Plugin macro

Manual activation of XML import and export

Import

  1. Start XML import by selecting either:
  • The xml file import button in the toolbar or
  • ERP XML import in the menu Files – Import.

Please notice that the button in the toolbar is a list where the last selected function is shown on the button.

  1. In the window “Open import file” select the file to be imported. ROB-EX shows automatically the folder where a file was imported from last time. Please notice that sometimes the import data is placed in two files:
  • A file containing data that is not often changed, e.g. data for resources and resource calendars.
  • A file containing data for operations, routes and orders.
  1. Select the file and press Ok. The data are now imported in to the current plan.

Export

  1. Start the XML export by selecting either:
  • The XML export button in the toolbar or
  • The ERP XML export button in the menu Files – Export

Please notice that the button in the toolbar is a list where the last selected function is shown on the button.

  1. In the window “Export to…” select if you want to export to all orders or only orders that has been changed since the last export.
  2. Select name of the file to export to. The last selected file name is shown.
  3. Press Ok. The order list is shown. If the option “Export changes” is selected, the order list shows only the orders that have been changed since the last export.
  4. Mark the orders to be exported. Use the filter function to filter the orders.
  5. Press “Export selected order” to export the orders to the specified file.

Selecting export encoding format

By default the encoding format used when exporting XML files from ROB-EX will be UTF-8. You should consider changing the format if the destination ERP is not correctly displaying text imported from ROB-EX.

The currently selected format can be investigated by opening the generated XML document with a text editor (e.g. Run->Notepad.exe) and check what encoding is specified in the top of the document. Typically it would read:

 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

The encoding used during export can be changed by adding the option -Dgantt.XMLEncoding= as parameter on the shortcut used when starting up the ROB-EX client. A list of valid encodings is available from http://www.iana.org/assignments/character-sets

Changing export max line length

Some ERP systems have a limit on the number of characters allowed per line when importing XML files. The length of the exported lines can be controlled in ROB-EX by editing the file custom\GanttSetup.properties appending the following lines

# The max line length (in characters) that the XML file should be written with
# Set to -1 means that there is no limit
# This attribute cannot have a value less than 100
maxXMLLineLength=-1

Also refer to the chapter Miscellaneous configurations.

Using the XML Plugin macro

Use the XML Plugin module to make a macro for automatic import of text files.

In the following chapter Setup the XML Plugin macro” you are guided in setting up the macro.

The following functions are available:

  1. Open a specified Gantt plan (OpenFile),
  2. Start an external program (RunExternalProgram),
  3. Import a text file (TextIOImport, it is possible to import more files in the same macro by using a filter. Reads the oldest first),
  4. Delete a text-file after it has been imported (DeleteFile),
  5. Save the plan with the imported data (SaveAs),
  6. Close ROB-EX (ExitProgram).

Click on…

if you want to…

New

- make a new macro.

Rename

- rename an existing macro.

Select the macro in the macro list.

Delete

- delete an existing macro.

Select the macro in the macro list.

Execute manually

- start a macro manually.

Select the macro in the macro list.

Move up/down

- change the order the macros are executed in.

If more than one macro in the macro list, use this function to decide the order which the macros should be executed in.

The import of data must be done in the following order:

  • Resources
  • Production orders
  • Projects

Add command

- add a new macro command to a macro.

Remove command

- remove a macro command from a macro.

Active

- activate a macro.

The auto detection function runs the macro next it is true.

Prompt

- see a message before the macro is executed.

*File name
(in the macro list)*

- select a file or folder to be imported.

Double click in the column “Filename”. A file dialog is shown where it is possible to select a file or a folder. If a folder is selected it is possible to select a filter.

The filter is based on MS-DOS expressions like *.xml or xmlimport*.xml, where * means an unlimited number of characters.

Check for new files

- activates auto detection of new files at the specified time interval.

Run at start-up

- executes the macro when ROB-EX is started.

Close

- ends the macro setup.

Setup the XML Plugin macro

Importing a single file

  1. Select “Settings – XML Plugin” in the Functions menu.
  2. Make a new macro by pressing the “New” button.
  3. In the dialogue “New macro” enter the name of the macro. Press the “Ok” button to make a new macro.
  4. Double click on a macro in the macro list in column “Filename” to select the file to be imported.
  5. In the “Open” dialogue select the file to be imported during execution of the macro.
  6. Set up the macro to check for new version of the import file. Put a check mark in the field “Check for new files…” and enter how often the macro must check for new version of the file in the field to the right.
  7. Activate the macro by setting a check mark in the field “Active” next to the macro.
  8. Test the macro by pressing the button “Execute manually”.

Importing multiple files based on file pattern

  1. Make a macro as described above.
  2. Double click on the macro in the column “File name” to select the import folder.
  3. Enter a folder filter. In the example below all files starting with “gantt” and file type is “xml” are imported.

  1. Activate the macro.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment