GenerateBill

This rule is attached to a transaction and included in the TransactionBusinessRulesPacket. This rule will interface between the transaction and the AsBill and AsBillDetail and AsBillDetailGroup table records. When the activity executes, the rule will process and for each Bill element whose tests resolve to true (or no tests are present), a bill record will be created and inserted into AsBill<GenerateBillDetail>.

GenerateBill:Elements and Attributes

Element/Tag Parent Attribute Definition Element/Attribute Values and Description/Value

<GenerateBill>

<GenerateBill>  

The opening and closing tag of the GenerateBill Business Rule.

 

<Bill>

<GenerateBill>  

Required & Repeatable Element:

This element is used to specify the Bill Information

 
  <Bill> BILLDETAILARRAY

Require Element

Specifies the math variable containing the array of the bill detail records. This Array is expected to be created by the Final Bill Detail activity function

Value should be Math Variable containing an array of pending Bill detail records

 

Field and Math Variable

  <Bill> BILLOWNERGUID

Required Element

Defines the Entity that generated the bill. usually a group customer, class or client (list bill)

Value should be Math variable containing an entity GUID

 

 

Field and Math Variable
  <Bill> BILLOWNERTYPE

Required Element

A user defined code that indicates what entity the BillOwnerGUID comes from Literal value or Math Variable containing a code value from AsCodeBillOwnerType

Field and Math Variable
<Tests>

<Bill>

 

Optional Element

Standard tests section that indicates if the Bill element should process. All tests must resolve to true for the containing Bill to process

 

<Test>

<Tests>

 

Optional & Repeatable Element

Standard test expression

 

<Reference ID>

<Bill>

 

Optional Element

Allows a user defined identifier to be added to the bill record

Field or Math Variable containing and Identifier data type value

 

<Reference ID>

PERSISTONCYCLE

Optional Element

Allows the configuration to persist the original ReferenceID value in the case of undo/redo or recycling the activity

 

Literal value or Math Variable containing a value of 'Yes' or 'No'

Default value is "No"

<Fields>

<Bill>

 

Optional Element: Opening tag for dynamic Bill fields

Defines dynamic fields of bill to insert

 

<Field>

<Fields>

 

Required & Repeatable Element

 

 

<From>

<Field>

 

Required element:

Defines the source value, activity field or math variable.

 

<To>

<Field>

 

Required element:

Defines the target field name to which the source value is copied.

 

XML Schema

<GenerateBill>
    <Bill BILLDETAILARRAY="BillDetailArrayMV" BILLOWNERGUID=" " BILLOWNERTYPE=" ">
        <Tests>
            <Test>[Expression]</Test>
        </Tests>
        <ReferenceID PERSISTONRECYCLE="[Yes or No or Math Variable]">[MathVariable or Field]</ReferenceID>
        <Fields>
            <Field>
                <From></From>
                <To></To>
            </Field>
            <Field>...</Field>
        </Fields>
    </Bill>
</GenerateBill>

XML Example

<GenerateBill>
    <Bill BILLDETAILARRAY="BillDetailArrayMV" BILLOWNERGUID="Activity:BillOwnerGUID" BILLOWNERTYPE="GroupCustomer">
        <ReferenceID PERSISTONRECYCLE="Yes">ReferenceIDMV</ReferenceID>
        <Fields>
            <Field>
                <From>BillInvoice</From>
                <To>InvoiceNumber</To>
            </Field>
            <Field>
                <From>BillTotal</From>
                <To>InvoiceTotal</To>
            </Field>
        </Fields>
    </Bill>
</GenerateBill>