Spawns Element
The Spawns element generates activities to complete a multi-step business scenario or to continue an automated business process. The activity's fields and activity math variables are available as source data for the fields of the generated activity. The Spawns syntax allows for the following functionality:
-
An activity can be conditionally generated.
-
Activities can be generated for same day processing or the future. The generation process will enforce correct processing order through validations that maintain a precise processing order and not allow scenarios where the generated activity recycles the generating (parent) activity.
-
When generating Policy activities:
-
For same day processing of the generated activity, the processing order of the generated activity must be greater than the processing order of the current generating (parent) activity.
-
This applies to SPAWNCODEs "03" and "09" where the value of FIELD has the same value as the current activity's effective date and it also applies to SPAWNCODE "01" which always generates activities for the current activity's effective date.
-
-
For future date processing of the generated activity, the value of the effective date is validated to be in the future automatically making the generated activity's processing order higher than the generating (parent) activity's processing order.
-
This applies to SPAWNCODEs "03" and "09" where the value of FIELD is greater than the current activity's effective date.
-
-
-
When generating activities across different entities, there is no processing order validation.
-
SPAWNCODEs "03" and "09" require the FIELD attribute to provide an effective date value to the generated activities.
-
-
Activities can be generated in the past given very specific conditions. These are:
-
Spawned activities are generated for different entity instances.
-
Policy1 can generate a backdated activity to Policy2 and cannot generate a backdated activity to itself.
-
Client1 can generate a backdated activity to Client2 and cannot generate a backdated activity to itself.
-
-
The spawned activities are generated for different entities.
-
Policy1 can generate a backdated Client activity.
-
Client1 can generate a backdated Policy activity.
-
GroupCustomer1 can generate a backdated Policy activity.
-
-
-
Multiple activities can be generated by the parent activity through SPAWNCODE "09". FIELD and COLLECTION attributes are required to support this spawn.
-
All transactions should have the same input signature (transaction name and set of input fields) and are restricted to Policy level activities.
-
The best practice is to use an ACTIVITYARRAY of ACTIVITY data types. This supports activities with different input signatures, activities with different transaction names and activities to different entities.
-
-
A Policy level activity can generate a client activity by providing a ClientGUID in the CLIENT attribute.
-
CLIENT attribute is only applicable with SPAWNCODEs "01" and "03".
-
The best practice is to use an ACTIVITYARRAY of ACTIVITY data types where ACTIVITY objects can be directed to multiple Clients, multiple Client activities and different input signatures and transaction names.
-
-
Existing Suspense tickets and Allocation records can be passed to the generated activities through optional elements.
The following spawn codes from AsCodeSpawn are supported:
-
01 - Generate immediately (the system will use the current Activity Effective Date)
-
03 - Generate on a specific date (FIELD attribute holds the spawn date)
-
09 - Generate from a collection (FIELD attribute holds the spawn date and COLLECTION attribute holds the collection).
Element/Tag | Parent Element | Attribute | Definition |
---|---|---|---|
Common Definitions | |||
<Spawns> |
<Transaction> |
|
Optional: This element defines Activities to spawn when the current Activity processing is successful. |
<Spawn>
|
<Spawns> |
|
Required, Repeatable: This element defines the activities to generate, their data, and the conditions that allow the activity generation. |
<Spawns> |
IF
|
Optional: Value expresses a condition that when true initiates activity generation. When the attribute is not present, the spawn will generate under all conditions. Operators available for EXPRESSION Writing explains the operators that may be used in the condition. Values:
|
|
Spawning through Activity Array | |||
<Activity> | <Spawn> |
Optional: This element identifies an ActivityArray that contains ACTIVITY data type objects. Each ACTIVITY data type object represents the transaction from which the activity will be generated, data for the activity’s input fields, and the entity the activity will be associated with. These transactions can span different entity activity levels (Plan, Client, Policy, etc.). This element cannot co-exist with the <Transaction> element and the legacy elements associated with <Transaction> within the same <Spawn> structure. |
|
Legacy spawning | |||
<Transaction> |
<Spawn> |
Optional: This element provides the name of the transaction from which the Activity will be generated. This element and associated legacy elements cannot co-exist with the <Activity> element within the same <Spawn> structure. Values:
|
|
<Transaction> | SPAWNCODE |
Required: This attribute indicates how the activity’s effective date will be provided. The supported spawn codes are: The supported spawn codes are:
Values:
|
|
<Transaction> | CLIENT |
Optional: This attribute provides the identity of the client (ClientGUID) to which the activity is generated. This is applicable for SPAWNCODE 01 and 03 and ignored for SPAWNCODE 09. Note: Best practice is to use an Activity object data type in an ActivityArray within the <Activity> element structure to generate Client level activities from a Policy level activity or generate activities from one Client to another Client. Values:
|
|
<Transaction> | SPAWNONREVERSAL |
Optional: Indicates that an activity will be generated upon reversal or undo of this activity. Values:
|
|
<Transaction> | FIELD |
Optional: This attribute provides the generated activity with its effective date. This is required for SPAWNCODEs 03 and 09. Values:
|
|
<Transaction> |
COLLECTION |
Optional: This attribute allows a single parent activity to generate activities to multiple policies in the same plan or across multiple plans. This is applicable to SPAWNCODE 09 only. Note: Best practice is to use the Activity object data type in an ActivityArray within the <Activity> element structure to generate activities to multiple policies. This allows the generated activities to carry different sets of fields per transaction and to transfer different values to those activity fields. Values:
|
|
<Allocation> |
<Spawn> |
|
Optional: This provides the generated activity with an allocation. The value must be an AsCodeAllocationType code value. This element cannot co-exist with the <Activity> element. Values:
|
|
<Allocation> |
TYPE |
Required: This attribute identifies the source of the allocation. Values:
|
|
<Allocation> |
ProgramGUID |
Optional: This attribute identifies the specific Program (ProgramGUID) that is the source of the allocation to pass to the generated activity. This attribute is required when the TYPE attribute is valued with "Program". Values:
|
<Suspense> |
<Spawn> |
|
Optional: This element identifies the specific Suspense item that will be used in the Suspense processing of the generated activity. The element value can be either a SuspenseGUID or a Suspense number. This element cannot co-exist with the <Activity> element. Values:
|
|
<Suspense> |
TYPE |
Required: Defines whether the Suspense item is identified by its Suspense Number or SuspenseGUID. Values:
|
<MultiSuspense> | <Spawn> |
Optional:
This element identifies multiple Suspense tickets that will be used in the Suspense processing of the generated activity. The collection is built as a key of Suspense Numbers or Suspense GUIDs paired with values of unattached Suspense amounts. This element cannot Values:
|
|
<MultiSuspense> | TYPE |
Required: This element defines whether the key in the collection is the Suspense Number or the SuspenseGUID. Values:
|
|
<Spawn> |
Optional: This is a section to define the data that is passed from the parent activity (current activity) to the generated activity or activities. |
||
<SpawnFields> |
Required, Repeatable: Each SpawnField identifies a field in the generated activity’s transaction definition and a data source within the current activity to pass to the generated activity’s field. |
||
<From> | <SpawnField> |
Required: This element contains a reference to a data source in the parent activity. This data value will be transferred to the generated activity’s field. Values:
|
|
<To> | <SpawnField> |
Required: This element provides the field name in the generated activity’s transaction definition with which the data value will be associated. Values:
|
|
<Data Type> | <SpawnField> |
Required: This element defines the data type of the generated activity’s field. Values:
|
XML Schema
<Transaction> ... <Spawns> <Spawn IF="[conditional statement]"> <Activity>[activity array]</Activity> </Spawn> <Spawn IF="[conditional statement]"> <Transaction SPAWNCODE="01" CLIENT="[variable]" SPAWNONREVERSAL="[No | Yes]">[transaction name]</Transaction> <Allocation TYPE="[Policy | Parent | Segment | Program]" ProgramGUID="[variable | field]">[allocation code]</Allocation> <Suspense TYPE="[number | GUID]">[variable | field]</Suspense> <MultiSuspense TYPE="[number | GUID]">[collection]</MultiSuspense> <SpawnFields> <SpawnField> <From>[variable]</From> <To>[field]</To> <DataType>[Check | Combo | Date | Decimal | Integer | Money | Percent | Radio | Text | TextArea]</DataType> </SpawnField> <SpawnField>...</SpawnField> </SpawnFields> </Spawn> <Spawn IF="[conditional statement]"> <Transaction SPAWNCODE="03" FIELD="[variable | field]" CLIENT="[variable]" SPAWNONREVERSAL="[No | Yes]">[transaction name]</Transaction> <Allocation TYPE="[Policy | Parent | Segment | Program]" ProgramGUID="[variable | field]">[allocation code]</Allocation> <Suspense TYPE="[number | GUID]">[variable | field]</Suspense> <MultiSuspense TYPE="[number | GUID]">[collection]</MultiSuspense> <SpawnFields> <SpawnField> <From>[variable]</From> <To>[field]</To> <DataType>[Check | Combo | Date | Decimal | Integer | Money | Percent | Radio | Text | TextArea]</DataType> </SpawnField> <SpawnField>...</SpawnField> </SpawnFields> </Spawn> <Spawn IF="[conditional statement]"> <Transaction SPAWNCODE="09" COLLECTION="[collection]" FIELD="[variable | field]" SPAWNONREVERSAL="[No | Yes]">[transaction name]</Transaction> <Allocation TYPE="[Policy | Parent | Segment | Program]" ProgramGUID="[variable | field]">[allocation code]</Allocation> <Suspense TYPE="[number | GUID]">[variable | field]</Suspense> <MultiSuspense TYPE="[number | GUID]">[collection]</MultiSuspense> <SpawnFields> <SpawnField> <From>[variable]</From> <To>[field]</To> <DataType>[Check | Combo | Date | Decimal | Integer | Money | Percent | Radio | Text | TextArea]</DataType> </SpawnField> <SpawnField>...</SpawnField> </SpawnFields> </Spawn> <Spawn>...</Spawn> </Spawns> ... </Transaction>
Legacy Spawn Example
<<Transaction> ... <Spawns> <Spawn IF="DeathPayoutSpawnIndicatorMV = 'True'"> <Transaction SPAWNCODE="01">DeathPayout</Transaction> <SpawnFields> <SpawnField> <From>ConfirmationNumberMV</From> <To>ConfirmationNumber</To> <DataType>Identifier</DataType> </SpawnField> <SpawnField> <From>PricingTypeMV</From> <To>PricingType</To> <DataType>Radio</DataType> </SpawnField> </SpawnFields> </Spawn> <Spawn IF="PremiumRefundScenario"> <Transaction SPAWNCODE="03">Disbursement</Transaction> <SpawnFields> <SpawnField> <From>RoleGUID</From> <To>RoleGUID</To> <DataType>Text</DataType> </SpawnField> <SpawnField> <From>DiffAmount</From> <To>DisbursementAmount</To> <DataType>Money</DataType> </SpawnField> <SpawnField> <From>DisbursementChangeReasonMV</From> <To>DisbursementReason</To> <DataType>Text</DataType> </SpawnField> </SpawnFields> </Spawn> </Spawns> ... </Transaction>
Spawning an Activity Array Example
<Transaction> ... <Spawns> <Spawn IF="DeleteCountMV = 1 And RequirementProofOfDeathReceivedMV = '01'"> <Activity>RoleDeleteSpawnArray</Activity> </Spawn> <Spawn IF="AddCountMV = 1 And RequirementProofOfDeathReceivedMV = '01'"> <Activity>RoleAddSpawnArray</Activity> </Spawn> </Spawns> ... </Transaction>