ActivityArray
Activity Array allows for the spawning of the same transaction multiple times from a single activity. By allowing each spawned transaction to reference unique data sets, any number of transactions may be spawned any number of times on the policy from a single parent transaction. For example, this could be used for an annuity payout that has multiple individuals receiving disbursements, to ensure both individuals get their correct disbursement amounts. Also, multiple activities could be spawned for Bank Drafts, Invoices or Anniversaries.
This replaces Spawn Code 08 that was used with Version 8 and prior releases. This also deprecates the use of the MultiRowProcessing business rule.
To configure multiple spawning activities, the following three MathVariable types are needed :
- Activity MathVariables contain instructions to create and set up Activity Math objects for a given transaction rule.
- Activity Array holds multiples of the activity math type record (Activity Math Object).
- ActivityField extracts the value of a specified field within the Activity Math object.
When configuring the creation of the Activity Array the following logic is needed:
- Create the Activity Array.
- Open the Loop.
- Create the Activity Math object.
- Set values of the Activity Math object.
- Add an Activity Math object to the Activity Array.
- Close the Loop.
To extract values, use the ActivityField MathVariable.
The Activity Array math variable is an arrangement of one or more Activity type math objects. Once field values are set using the Activity math variable, the object is added to the ActivityArray math variable to be used in the spawn section of the parent transaction.
ActivityArray Math Variable in Palette
For a comprehensive explanation of the characteristics of this math variable, refer to the XML Configuration Guide in the Help menu.
Define the ActivityArray Math Variable
Drag and drop the ActivityArray math variable from the Palette window onto the Math Pane. Enter the following information for the math variable.
-
Type a name in the Name field. This is required.
-
The data types must be Activity.
-
Make sure variable type is defined as ActivityArray. This is required.
-
The applicable Operation selections are: Create, Append, and Insert. First, Create the ActivityArray before the array is fed into the Spawn section of the parent transaction. Once the array is created, Insert an object into the array. Insert allows an Index or location of the object to be specified. The Index property must be populated when using the Insert Operation. Append will place the object at the end of the array.
Aggregate Function methods Count and Index can be used with an ActivityArray.
- Count: Returns the number of records in the array.
- Index: Returns the value of the specific number element. Indexing allows the system to identify the value by the elements location. Then the value can be used for storage, a subsequent calculation or display purposes.
For example, creating a Disbursement spawn activity array will use a Count of the number of Payee records. Index will return an Activity math object from the referenced location of the array. The Index value must be designated as the numeric location of the object. If there is no object at the referenced index or the array is empty, no value will be returned. Defining a default value object may be required for system stability.
Math Loop with Activity and ActivityArray:In order to populate the array with more than one Activity math object, a standard loop can be used (optional).
- Create the Activity Array.
- Begin the MathLoop.
- Create the Activity object.
- Set the Value of the Activity object.
- Add the object to the Activity Array.
- Close the MathLoop.
- Check-in the transaction to save the information to the database.
The Activity Array math variable must be instantiated outside of the loop and the Activity object math object inside the loop.
Copyright © 2009, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices