52
Admin Guide – AutoStore 6.0
1175
Version 1.2
Copyright 2012 Notable Solutions, Inc.
component and XML Generator component. In XML Generator configuration browse the following
template:
<?xml version="1.0" encoding="iso-8859-1" ?> <Root> <Document> <Page>
<Number>Data</Number> <FirstBarcode>Data</FirstBarcode>
<SecondBarcode>Data</SecondBarcode> </Page>
<AllBarcodes>Data</AllBarcodes> </Document> </Root>
Based on this template, set a configuration of the output file. First, multiply the Page node by inserting a
counter m with Min value=1 and Max value=3. Next, replace the Number node value with m, the
FirstBarcode node value with ~FRB::m,1~, the SecondBarcode node value with ~FRB::m,2~and the
AllBarcodes node value with ~FRB::*,*~. If the original document has 3 pages, with the first page
containing 2 barcodes, e.g. code1, code2, the second page containing no barcodes, and the third page
containing 2 barcodes, e.g.code3, code4, then the output XML file for this document is as follows:
<?xml version="1.0" encoding="iso-8859-1" ?> <Root> <Document> <Page>
<Number>1</Number> <FirstBarcode>code1</FirstBarcode>
<SecondBarcode>code2</SecondBarcode> </Page> <Page> <Number>2</Number>
</FirstBarcode> </SecondBarcode> </Page> <Page> <Number>3</Number>
<FirstBarcode>code3</FirstBarcode>
<SecondBarcode>code4</SecondBarcode> </Page> <AllBarcodes>code1,
code2, code3, code4</AllBarcodes> </Document> </Root>
Configuring
XML Generator (eConnector) Configuration
In the XML Generator (eConnector) Configuration dialog window you can load and view the structure of
the XML template, set the values of the nodes, set the parameters of the output of the generated XML
document and of the original routed documents.
Activate - this check box is present only in the XML Generator eConnector configuration window.
Select this check box to make the component active. If this check box is not selected, the component
won't perform any actions during file processing.
XML template. Using fields in this group you can load an XML template that is used to generate the
output XML file, view its structure and change the element and attribute values.
Source - select an XML template
file.
Properties - select an element from the tree and click this button to set the element's properties.
•
In order to change the value of an attribute, select the desired attribute in the template
and click the Properties button. Attribute value can be changed in the opened Edit
Attribute
dialog box.
•
In order to multiply a node, select the required node and click the Properties button. The
options of repeating one node within the parent node can be set up in the opened Multiply
Node Block
dialog box.
•
In order to change a node value, select the required node value and click the Properties
button. The node value can be changed in the opened Edit Node Value
dialog box.
Note: You can't set the value of a node if it is not set in the template. In other words, you can only
ly
44
Admin Guide – AutoStore 6.0
1176
Version 1.2
Copyright 2012 Notable Solutions, Inc.
change a preset non-empty value of a node.
Generated XML document group contains the settings for the generated XML file.
Pass through - this check box is present only in the XML Generator eConnector configuration
window. Select this check box to make the XML document available to the subsequent
components in the process.
Output to - for XML Generator eConnector configuration, this element contains a check box and a
field. When the check box is selected, the generated XML file will be routed to the specified
output folder. If this check box is not selected, the Pass through check box is selected and
disabled. Specify the destination for the generated XML file in the text box.
For the Route component, this element contains only a text field in which you can specify the
destination folder of the generated XML file.
Rename schema - select this check box to specify the file name for the generated XML document
under which it will be saved in the output folder. You can use RRT
to dynamically set the value of
the schema. The .xml extension will be set automatically to the generated document.
If the Rename schema check box is not selected, the default schema is
used:~XMR::FileName1~#Counter#.xml, where #Counter# is a unique identifier based on the
number of files with the same name in the working directory. For example, if the first original file
is File.doc, the generated XML file will be File1.xml.
Note:
If the component has no input documents, the default name of the generated XML file will be
generatedXML1.xml.
If the Rename schema check box is selected and the schema name is not provided, then at
runtime the default schema is used: ~XMR::FileName1~_~XMR::Counter~.xml. For example, if the
first original file name is File.tif, the renamed file will be File_1.xml.
Original document(s) group contains settings for the original document(s).
Pass through - this check box is present only in the XML Generator eConnector configuration
window. Select this check box to make the original document(s) available to the subsequent
components in the process.
Output to - if this check box is selected, the original document(s) will be routed to the specified
output folder. Enter the destination folder in the text field next to the checkbox.
Note:
You can check and uncheck the Pass through and Output to options in any combinations for the
r the
original documents. If the Pass through and Output to options are not selected, the original
documents are eliminated from subsequent processing.
Rename schema - select this check box to specify the file name for the original document using
the schema field. You can use RRT
to dynamically set the value of the schema.
If the Rename schema check box is not selected, the original document name will be used.
39
Admin Guide – AutoStore 6.0
1177
Version 1.2
Copyright 2012 Notable Solutions, Inc.
If the Rename schema check box is selected and the schema name is not provided, then at
runtime the default schema will be used: ~ XMR::FileName~_~ XMR::Counter~~XMR::FileExt~. For
example, if the input file name is File.tif, the renamed file will be File_1.tif.
Overwrite existing file - if this check box is selected, the component overwrites an existing file with the
same name in the output directory. This option is related to both generated XML document and original
documents. If this option is checked, both XML document and original documents are overwritten.
Otherwise, if this option is unchecked, the presence of a file with the same name for the XML document
or the original document will cause an error message and stop further processing for this file.
XML template
The structure of the output file is defined by a template. A template is an XML file that describes in what
form the data will be presented, and it contains all nodes with their values that will be in the output.
You can load a template file in the XML Generator (eConnector) Configuration
to see its visual
representation in a from of a tree. You can change the text context of an element or the value of an
attribute by highlighting it in the tree and clicking the Properties
button. Any values can be replaced by
the available RRTs. Note that the values of nodes in the original template file can contain the definitions
of the available RRTs.
You can define a counter for a node to specify that the node should be repeated in the output XML file.
The node will be repeated for each counter value. You can specify a counter and its max and min values
by highlighting a node and clicking the Properties button. You can use the counter in values of nodes
and attributes. A counter also can be used inside RRTs definition. For example, if you have the following
in the nodes in the template
<ParentNode> <ChildNode id="ID">Data</ChildNode> </ParentNode>
Specify a counter for the ChildNode Node and set its values to be in the range from 1 to 5. Set the
counter for the value of the id attribute. The result will be as follows
<ParentNode> <ChildNode id="1">Data</ChildNode> <ChildNode
id="2">Data</ChildNode> <ChildNode id="3">Data</ChildNode> <ChildNode
id="4">Data</ChildNode> <ChildNode id="5">Data</ChildNode>
</ParentNode>
Note that after the user enters the values and clicks OK, the component will change the values in the
configuration file for this process, it will not change the template file itself.
Edit Attribute
This dialog allows you to change the value of an attribute.
Attribute name - this field displays the name of the attribute.
45
Admin Guide – AutoStore 6.0
1178
Version 1.2
Copyright 2012 Notable Solutions, Inc.
Attribute value - enter a new value of the attribute. The value can be replaced by one of the available
RRTs
or a combination of several RRTs
.
Note:
You cannot use ~XMR::Counter~ for attribute value setting.
If namespaces are used in the XML file, the namespace specification attribute cannot be edited
and all the child nodes have the same namespace as the parent node by default. In the old
versions of the component, another behavior took place, therefore when you open the old
version's configuration, the component asks to update the configuration.
All RRTs must be replaced - if this option is on, the component cannot generate the output XML file
without replacing all RRTs used in the attribute value structure by real data. By default, this option is off
and RRTs, if they are not replaced, appear as blanks in the output XML file.
Reset - click this button to return back to the original attribute value, which is provided in the
XML
template
.
Multiply Node Block
This dialog allows you to configure the options of repeating one node within a parent node. Multiplying
is useful when you want to output a repeated set of data of the same kind or when you want to map a
table data to xml. See the examples
.
Node name - this field displays the name of the selected node.
Counter label - enter any string that will be used as a counter for the repeated node. Counter label is
case-sensitive.
Note:
Every occurrence of the Counter label in the child nodes will be replaced by the value of the
counter. To prevent an unexpected data change, make sure that the counter label does not
occur in any value of any child node.
Min value - enter the minimum value of the counter.
Max value - enter the maximum value of the counter.
Note:
Maximum number of repeated nodes can be Max value - Min value + 1.
+ 1.
Max value and Min value should be integer values. If you enter non-integer value or RRT
in any
of those fields, it will cause the following error message: "Please, enter an integer value".
Max value and Min value can be both positive and negative, but Max value must be greater or
equal to Min value.
If some RRTs defined by means of a counter cannot be generated, the node that corresponds
to the counter value that produces an incorrect RRT will not be included into the output.
35
Admin Guide – AutoStore 6.0
1179
Version 1.2
Copyright 2012 Notable Solutions, Inc.
Remove - click this button to remove information about the counter from configuration. It clears all
fields in the dialog box.
You can multiply one or several nodes. The order in which single and multiplied nodes appear in the
output XML document cannot be modified.
Edit Node Value
This dialog box allows you to change the value of a node.
Node value - enter one of the available RRTs (or a combination of several RRTs) to replace node value.
Note:
You cannot use ~XMR::Counter~ for node value setting.
g.
All RRTs must be replaced - if this option is on, the component cannot generate output XML file without
replacing all RRTs used in the node value structure by real data. By default, this option is off, and RRTs
that cannot be replaced appear as blanks in the output XML file.
Reset - click this button to return back to the original node value, which is provided in the template
.
Runtime Replacement tags
What are RRTs?
Runtime Replacement Tags (RRT) are tags placed within the configuration file for replacement by
metadata values during execution time. At runtime (when a component instance is executed within the
application), each component is responsible for searching all items within the configuration memory
structure and replacing their assigned RRTs with actual metadata values. The RRTs were formerly known
as Field Value References or FVRs.
How does it work?
When you create a process that consists of a series of components, the components are executed in
order from left to right (Capture to Route). Each component, prior to its termination, searches all
configuration entries and replaces all its own RRTs with actual metadata values. As an example, the XML
Knowledge Package Loader component will search for RRT's starting with "~ASX::" and replaces them
with actual metadata values.
The order of execution of components within a process is significant. Due to the component execution
order (Capture to Route), RRT's owned by components that appear later in a process cannot be placed
within components that appear earlier in a process. As an example, placement of Folder Store
31
Admin Guide – AutoStore 6.0
1180
Version 1.2
Copyright 2012 Notable Solutions, Inc.
component RRT's within a Capture component such as Poll Directory is invalid and will not be replaced
at runtime.
RRT naming convention
The figure below provides you with an illustration of the RRT definition. Each part of the RRT is designed
to create a standard field tag replacement that can be expanded to all components designed and
developed within the component framework.
Note:
RRT's are case sensitive. You must follow the proper case for all RRTs. You cannot introduce
space characters in between the RRT segments.
The table below provides details on each segment of the RRT:
Segment name
Description
Markers
Special characters used to mark the beginning and the ending of each RRT. The
"~" is used to mark each end. Note that you cannot use the same character
anywhere within the other parts of the RRT. Having "~" appear as a value of a
special field is not supported with this new RRT design.
RRT ID
Special three characters identifying the component owning the RRT and
responsible for replacing the tags with the actual values.
Separators
Double colon "::" characters used to separate the Component RRT ID from the
actual Replacement Tag Name. Double colon is now reserved and cannot be
used within other parts of the RRT. Example of an illegal use of :: is
"~MYC::Invoice::Number~" where the double colon is repeated within the
replacement tag name.
The image part with relationship ID rId548 was not found in the file.
Documents you may be interested
Documents you may be interested