Import workers
This section lists the workers that can be applied to the import process.
FetchFilesWorker
nl.planon.morpheus.pnworkers.server.xmlworkers.FetchFilesWorker
This worker can read multiple import files. If required, it should be the fist worker in the list (according to the sequence).
The worker will read the files in the order sorted on the file modification date/time of the operating system. The oldest files are read first.
* 
For more information on reading multiple files during import, refer to Reading multiple files
XMLReaderWorker
nl.planon.morpheus.pnworkers.server.xmlworkers.XMLReaderWorker
This worker uses a STaX parser to extract main business objects one at a time when the execute API is called by the Worker Manager. This component reads data from the XML files for importing data into Planon ProCenter .
The output of this Worker is an XML string corresponding to the main business object in the XML.
XMLToPOJOWorker
nl.planon.morpheus.pnworkers.server.xmlworkers.XMLToPOJOWorker
The Workers associated with the Planon Writer and Reader work with a POJO. This system worker converts an XML string to a POJO that is required by the Planon Workers.
PlanonDataWriterWorker
nl.planon.morpheus.pnworkers.server.planonwriterworker.PlanonDataWriterWorker
This worker interacts on the POJO corresponding to the source’s main business object that is passed to it and persists this in Planon ProCenter . The writer also applies the import policy defined in the definition to load the details into Planon ProCenter .
* 
With the Approval feature in Planon, you can configure that important changes must always be approved by a second person before the changes are actually implemented. See Approvals.
When importing data via Enterprise Talk or SDI configuration, it is possible to bypass the triggering of the approval process for changes that normally require approval. Via the triggerApproval parameter on the import worker, the triggering of approvals can be skipped for the data to be imported via this worker.
For the PlanonDataWriterWorker, in the Additional parameters box, add the following line:
triggerApproval = Yes/No
Possible settings:
triggerApproval = Yes: to explicitly define that approvals are triggered when importing/updating data through this worker.
triggerApproval = No: to skip triggering approvals when importing/updating data through this worker. Even if an approval is required by the approval definition, data is simply changed and no approval is generated.
If the triggerApproval parameter is not registered, approvals are triggered if necessary.
CSVReaderWorker
nl.planon.morpheus.pnworkers.server.csvworkers.CSVReaderWorker
If you need to import from a CSV file, the workers needed are:
CSVReaderWorker
XMLToPOJOConvertor
PlanonWriterWorker
A CSV file is converted into XML data. This component reads data from the CSV files for importing data into Planon ProCenter
The output of this Worker is an XML string corresponding to each main business object in the CSV.
An example file of CSV data is used to explain the effect of the CSVReaderWorker with the terminology used to describe its parameters.
Example CSV file
1 = text qualifier (“)
2 = delimiter ( ,)
3 = an escaped text qualifier
If parameter mainElementName=Person, the resulting XML file would be:

<Person>
<Code>00123</Code>
<LastName>Jackson</LastName>
<Comment>Comment, with a delimiter in it</Comment>


</Person>
<Person>
<Code>00124</Code>
<LastName>Johnson</LastName>
<Comment>Comment with an "escaped" qualifier</Comment>

</Person>

For a description of the parameters of the CSVReaderWorker, refer to CSVReaderWorker.
ExcelReaderWorker
nl.planon.morpheus.pnworkers.server.excelworker.ExcelReaderWorker
The ExcelReaderWorker reads Excel sheets (xls, xlsx) with data so as to import them into Planon ProCenter .
For a description of the parameters, refer to ExcelReaderWorker.
Example:
tabSheet=Persons
mainElementName=Person
columns=D;E;F;G;H;I;J;K;L;M;N;O;P;Q
rowHeader=9
rowStartData=11
numberOfRows=50
nrOfEmptyRowsToStop
unitOfMeasurement=M
columnForStopDef=D
The output of the ExcelReaderWorker is XML. The ExcelReaderWorker allows you to specify a cell containing the reference date using the 'referenceDateCell' parameter. There are three ways to to specify a reference date in Excel:
Use 'referenceDateCell'
When you specify the parameter 'referenceDateCell' and you do not specify parameter 'referenceDateElementName' a BeginDate attribute will be added containing the fixed date value from 'referenceDateCell'.
Use 'referenceDateCell' and 'referenceDateElementName'
In the XML a tag will be added with the name specified in the 'referenceDateElementName' the tag will be populated with the 'referenceDateCell' value. The position of this tag is by default the last exported field in the XML. If a different order is required, you can specify the order with parameter 'columns' and add the value of the 'referenceDateCell' parameter at the right location.