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 may be conditionally generated.
  • Activities may be generated for same day processing or into the future, but never generated into the past. Validations do apply.
    • 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 of the current (parent) activity.
      • For future day processing of the generated activity, there is no processing order validation.
    • When generating activities across transaction types, there is no processing order validation.
    • Generating into the future requires providing the future date in a FIELD attribute.
      • The FIELD attribute may also be used to generate an activity for same day processing.
  • Multiple activities may be generated within the parent activity.
    • Best practice is to use an ACTIVITYARRAY of ACTIVITY data types.
    • There is <Spawn> element syntax to spawn multiple activities, but this is limited to Policy level activities and activities with the same input signature (same set of input field definition).
  • A Policy level activity may generate a client activity by providing a ClientGUID.
    • Best practice is to use an ACTIVITYARRAY of ACTIVITY data types where ACTIVITY objects can be directed to multiple client activities.
  • Existing Suspense tickets and Allocation records may be passed to the generated activities.

The following spawn codes from AsCodeSpawn are supported:

  • 01 - Spawn immediately (system will use current Activity Effective Date)
  • 03 - Spawn on a specific date (FIELD attribute holds the spawn date)
  • 09 - Spawn from a collection (FIELD attribute holds the spawn date and COLLECTION attribute holds the collection)
Spawns Elements and Attributes
Element/Tag Attribute Definition Element/Attribute Value and Description

<Spawns>

This is the start and end element for the transaction.

<Spawn>

 

 

Required, Repeatable:   

Opening element that defines the transaction to spawn and its data.

 

IF

Optional:   

Value expresses a condition that when true initiates the spawn. 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.

String:

conditional expression

<Activity>   Optional: Identifies an ACTIVITYARRAY that contains ACTIVITY data type objects. Each ACTIVITY data type object represents the input fields of a transaction. These transactions may span different levels of activities (Plan, Client, Policy, etc.). This element cannot co-exist with the <Transaction> element. math variable

<Transaction>

 

Optional:

Name of the transaction to be spawned. This element cannot co-exist with the <Activity> element.

String:

literal

FIELD Optional: Provides the generated activity's effective date. This is required for spawn codes 03 and 09. math variable, field name
SPAWNCODE Required: Provides methods to change the way an activity is spawned. The supported spawn codes from AsCodeSpawn are '01', '03' and '09'. code value
SPAWNONREVERSAL

Optional:

Indicates that the transaction should be spawned upon reversal or undo of the parent activity.

Yes,No
CLIENT

Optional: Provides the identity to a client (ClientGUID) upon which a client activity is spawned. This is applicable for spawn codes 01 and 03.

Note: Best practice is to use the Activity data type in an ActivityArray to spawn from a policy level activity to a client level activity or from one client activity to another client's activity.

math variable, field name

COLLECTION

Optional: This allows for the activity to be spawned to multiple policies optionally across multiple plans. The collection is PolicyGUID and PlanGUID pairs. This is applicable to SPAWNCODE 09 only.

Note: Best practice is to use the Activity data type in an ActivityArray to spawn to multiple policies. This allows the activity to carry different sets of fields per transaction and different values to the activity's fields.

math variable

<SpawnFields>

Optional:

This is a section where data is passed from parent activity (current activity) to the generated activity or activities. This element cannot co-exist with the <Activity> element.

<SpawnField>

Required, Repeatable:   

Each SpawnField identifies a field that will be spawned and the source of the value to pass to the generated field.

<From>

Required:

Defines the source value to pass to the generated field.

activity field, or math variable

<To>

Required:

Defines the target field (spawned activity) by its name that will contain the passed value.

literal,

math variable,

field name

<DataType>

Required:

Defines the data type of the target field on the generated activity.

Check,

Combo,

Date,

Decimal,

Integer,

Money,

Percent,

Radio,

Text,

TextArea

<Allocation>   Optional: This provides the generated activity with an allocation. The value must be an AsCideAllocationType. This element cannot co-exist with the <Activity> element. literal, math variable
  TYPE Required: This identifies the source of the allocation. The "Parent" type will duplicate the current activity's allocation to the generated activity. Policy, Parent, Segment, Program
  ProgramGUID Optional: Identifies the specific Program (ProgramGUID) that is the source of the allocation to pass to the generated activity. math variable, field name

<Suspense>

  Optional: Identifies the specific Suspense ticket that may be used in the Suspense processing of the generated activity. This may be either a SuspenseGUID or a Suspense number. This element cannot co-exist with the <Activity> element. math variable, field name
 

TYPE

Required:

Defines whether the Suspense ticket is identified by its Suspense Number or SuspenseGUID. Applicable values are "Number" and "GUID".

Number, GUID

<MultiSuspense>

  Optional: Identifies multipl[]e Suspense tickets that may be used in the Suspense processing of the generated activity. The collection is built as a key of Suspense Numbers or Suspense GUIDs and values of unattached Suspense amounts. This element cannot co-exist with the <Activity> element. math variable
 

TYPE

Required:

Defines whether the key in the collection is the Suspense Number or the SuspenseGUID. Applicable values are "Number" and "GUID".

Number, GUID

XML Schema

<Spawns>
<Spawn IF="[condition]">
<Transaction SPAWNCODE="[01 | 03 | 09]" FIELD="[field | variable]" CLIENT="[field | variable]" COLLECTION="[variable]" SPAWNONREVERSAL=”[Yes | No]”>>[transaction name]</Transaction>
<SpawnFields>
<SpawnField>
<From>[field | variable]</From>
<To>[literal | field | variable]</To>
<DataType>[Check | Combo | Date | Decimal | Integer | Money | Percent | Radio | Text | TextArea]</DataType>
</SpawnField>
<SpawnField>. . .</SpawnField>
</SpawnFields>
<Allocation TYPE="[Policy | Parent | Segment | Program]" ProgramGUID="[field | variable]">[literal | variable]</Allocation>
<Suspense TYPE="[Number | GUID]">[field | variable]</Suspense>
<MultiSuspense TYPE="[Number | GUID]">[variable]</MultiSuspense>
</Spawn>
<Spawn>
<Activity>[variable]</Activity>
</Spawn>
<Spawn>. . .</Spawn>
</Spawns>

XML Example

<Spawns>
<Spawn>
<Transaction SPAWNCODE="03 FIELD="NextCycleDate">EntryReportByAccount</Transaction>
<SpawnFields>
<SpawnField>
<From>GroupByField</From>
<To>GroupBy</To>
<DataType>Text</DataType>
</SpawnField>
<SpawnField>
<From>NextCycleDate</From>
<To>FromDate</To>
<DataType>Date</DataType>
</SpawnField>
<SpawnFields>
<Allocation TYPE="Policy">02</Allocation>
</Spawn>
</Spawns>
Example of the use of an Activity Array
<Spawns>
<Spawn IF="SpawnActivityFlag = true">
<Activity>PolicyActivityArray</Activity>
</Spawn>
</Spawns>