OrderXMLSample
OrderXMLSample is used by the CreateOrdersFromFile step in the OrderSample workflow to create an order and two jobs.
Order property mapping objects have properties that specify which sample XML file they use and what time format is found in the sample XML file. The default values for this property mapping are:
- Sample order XML file: order.xml
- Time format: MM/dd/yyyy HH:mm:ss ZZZZ
Order property mappings include a list of XML elements (or XPaths) that identify orders and jobs in the sample file. The order and job identifiers defined in this sample are:
- Order identifiers
/Orders/Order
- Job identifiers
/Orders/Order/OrderDetails/OrderDetail
Finally, order property mappings also include a list of XML elements and the objects and properties they correspond to. When the CreateOrdersFromFile step runs, it uses the settings in the property mapping object to set values for order and job properties. In this sample, these mappings are defined:
XML element (XPath expression) | Object type | Property |
---|---|---|
/Orders/Order/ID |
Order | Order name (Order.name) |
/Orders/Order/OrderNumber |
Order | External order reference (Order.Reference) |
/Orders/Order/Customer |
Order | Customer name (Order.Customer) |
/Orders/Order/Notes |
Order | Description (Order.Description) |
/Orders/Order/quantity |
Order | Copies (Order.Copies) |
/Orders/Order/DueDate |
Order | Due date (Order.DueDate |
/Orders/Order/OrderDetails/OrderDetail/ID |
Job | Job name (Job.Name) |
/Orders/Order/OrderDetails/OrderDetail/OrderType |
Job | Custom 1 (Job.Info.Attr1) |
/Orders/Order/OrderDetails/OrderDetail/ProductName |
Job | Custom 2 (Job.Info.Attr2) |
/Orders/Order/OrderDetails/OrderDetail/PrintFile |
Job | Custom 3 (Job.Info.Attr3) |
/Orders/Order/OrderDetails/OrderDetail/PrintFile/@type |
Job | Media (Job.Media) |