Structure of the Ticket Template Model

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

<ORDER_TEMPLATE_LIST xmlns="http://schemas.stoll.com/ticketing/ordertemplate/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.stoll.com/ticketing/ordertemplate/v1.0 StollOrderTemplates.xsd">

1 <ORDER_TEMPLATE name="NAME_OF_TEMPLATE">

<TEMPLATE_DESCRIPTION>Description of Template</TEMPLATE_DESCRIPTION>

<PRODUCTION_INFO>

2 Mandatory tags from PRODUCTION_INFO group

<ORDER_NUM...>

<ORDER_TYPE...>

<TOTAL_NUM_OF_EXECUTIONS...>

<ESTIMATED_ORDER_DURATION...>

<ORDER_DESCRIPTION...>

<ARTICLE_NUM...>

<STYLE_FILE_PATH...>

</PRODUCTION_INFO>

<ORDER_VELOCITY>

<![CDATA[

3 Add here tags from STOLL:TICKET namespace

## Macro V1.1 to add TAG to resulting XML under commented conditions

#macro (AddTAG $TAG $Param $Default)

...

]]>

</ORDER_VELOCITY>

<CUSTOM_VELOCITY>

<![CDATA[<STOLL:CUSTOM xsi:schemaLocation="http://schemas.custom.com/ticketing/ticket/v0.5 CustomTicket.xsd" xmlns="http://schemas.custom.com/ticketing/ticket/v0.5">

<CARD Version="1.1">

4 Add here tags from STOLL:CUSTOM namespace

</CARD>

</STOLL:CUSTOM>

## Macro V1.1 to add TAG to resulting XML under commented conditions

#macro (AddTAG $TAG $Param $Default)

...

]]>

</CUSTOM_VELOCITY>

<TEMPLATE_TAGS>

5 Add here definitions which produce lines for entering data when using this template and references the corresponding tags in above ORDER_VELOCITY or CUSTOM_VELOCITY block

</TEMPLATE_TAGS>

</ORDER_TEMPLATE>

</ORDER_TEMPLATE_LIST>

Explanation

In (3) and (4), the AddTAG macro can be inserted.

Procedure:

    1
    Enter the name for the template as it is to be displayed in the selection list of the templates
    2
    To this tag group PRODUCTION_INFO add tags that contain pre-allocated data and for which by default there are edit boxes in the order editor of the PPS.
    3
    Add tags from the STOLL:TICKET group with the exception of STOLL:CUSTOM tags in this area. Here you can use the AddTAG macro.
    4
    In this area add tags from the STOLL:CUSTOM group. Here you can use the AddTAG macro.
    5
    Define the required input boxes with reference to the STOLL:TICKET and STOLL:CUSTOM tags here.

Example:

  1. You want to enter a tag to define the size and weight of a fabric piece.
  2. The edit box is to be editable.
    1
    Enter the following string at (5).
    <CUSTOM_TAG label="DIMENSION" editable="true">;;;; [Size;Length;Width;Weight; of knit]</CUSTOM_TAG>
  1. When applying the template, you receive the following input box (without M;60...)
  2. 2
    This tag comes from the STOLL:CUSTOM tag name area and therefore needs to be referenced in (4). For this purpose, you insert the AddTAG macro to separate the comment ([size;length;width;weight; of knit]) and to distribute the parameters.
    #AddTAG(" <DIMENSION Size='$ParamList[0]' Length='$ParamList[1]' Width='$ParamList[2]' Weight='$ParamList[3]' />" $DIMENSION)
  3. The tag has 4 parameters for determining the size and weight of the fabric, which are to be distributed to 4 attributes. The parameters can be distributed using ParamList[N], where N counts starting with 0, which corresponds to the first parameter in the entry.
    The entry in the above image is divided as follows:
    ParamList[0]=M
    ParamList[1]=60
    ParamList[2]=52
    ParamList[3]=0,5
  1. In the resulting XML file, the tag is structured as follows:
    <DIMENSION Size='M' Length='60' Width='52' Weight='0,5' />

Another example:

    1
    You want to have the print function available after order completion.
    The PRINT entry activates the printing, NONE does not print.
  1. The edit box is to be editable.
    1
    Enter a tag at (5) to switch the print function.
    <CUSTOM_TAG label="ACTION_DEFINITION" editable="true">; [NONE|PRINT; Action to take place after knit is done]</CUSTOM_TAG>
  1. When applying the template, you receive the following edit box
  2. 2
    Refer to this tag in (3) as it comes from the STOLL:TICKET\STOLL:PRODUCTION_INFO group.
    3
    Insert the AddTAG macro to separate the [NONE|PRINT; Action to take place after knit is done] comment, to extract the single parameter and to set the default to NONE in case of an empty entry.
    #AddTAG(" <STOLL:ACTION_DEFINITION>$ParamList[0]</STOLL:ACTION_DEFINITION>" $ACTION_DEFINITION "NONE")
  3. If you don't enter anything in the ACTION_DEFINITION field, "NONE" will be entered in the XML file when generating the ticket. The macro detects that nothing was entered, but the default value "NONE" exists.
    Without the default value, the tag would not be contained in the ticket.
    Therefore the resulting XML file will contain:
    <STOLL:ACTION_DEFINITION>NONE</STOLL:ACTION_DEFINITION>
  4. If you enter PRINT the output in the XML-file will be:
    <STOLL:ACTION_DEFINITION>PRINT</STOLL:ACTION_DEFINITION>

Another example for embedding user tags:

  1. You want to add a user tag for the machine user to confirm whether an update was successful
    1
    In (5) enter this tag:
    <USER_TAG label="Update ok" editable="true"></USER_TAG>
  1. User tags are supported implicitly by the PPS and this tag is automatically written into the resulting XML file including the group tag: