Application DesignGenerate Related Labels Using Multiple Label Templates (XML)

You can use a business rule to cause one print request to generate additional print requests that use the same label template or other label templates. This can be useful for situations in which a set of related printed labels is required for each job, such as a bill of lading for a shipment and a label for each item in the shipment.

Important! Content in a business rule is case sensitive. This includes business rule component names, attributes, and values.

Important! The following example is a special type of business rule called a Job Source. To use this business rule, you must create a generator process and enter the path to this special business rule in the Job Source field.

The following business rule generates four labels from a single print request.

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

<businessRules configuratorSupport="false" id="0">

 

   <businessRule>

 

      <forLoop name="PER_LABEL_TASKS" namespace="Body" direction="INCREMENT" maxLength="5" mergeRowToJobData="false" minLength="1" mode="NUMERIC" step="1">

 

         <triggers>

            <trigger eventTrigger="ENQUEUE" priority="1"/>

         </triggers>

 

         <children>

            <dataPipe name="LABEL_GENERATOR_PIPE" namespace="Body" targetProcessor="LABEL_GENERATOR">

               <triggers>

                  <trigger eventTrigger="GENERATE_LABEL" priority="5"/>

               </triggers>

            </dataPipe>

         </children>

 

         <!-- For Loop functionality -->

         <startValue>0</startValue>

         <endValue>3</endValue>

         <loopEvents eventName="GENERATE_LABEL" includeSiblings="false"/>

 

      </forLoop>

 

   </businessRule>

 

   <dataProcessors>

 

      <processGenerator name="LABEL_GENERATOR">

         <process ignoreErrors="false">

            <processUrl>/Default/Generic Document Process</processUrl>

            <data>

               <entry name="Body">

                  <value>${/Body}</value>

               </entry>

               <entry name="!DOCUMENT_URL!">

                  <value>/Default/Label1</value>

               </entry>

               <entry name="!DESTINATION!">

                  <value>/Default/PDF Printer</value>

               </entry>

            </data>

         </process>

      </processGenerator>

 

   </dataProcessors>

 

</businessRules>