Program Spawning from Non-program Transactions
Using the new MaintainProgram APE, a non-program activity may trigger the spawning of the transactions in the ProgramAction of the ProgramDefinition. The spawned transactions then exist inside the program's activity list.
A new transaction called MaintainProgram in the Functional Prototype Plan illustrates this feature by either executing a change to the existing programs or terminating them.
Prerequisites
Programs must be set up and active for the Policy.
New Items
- MaintainProgram - transaction added to the Functional Prototype Plan. The processing order is prior to the Program Start, Terminate and Change actions.
- MaintainProgram - APE attached rule spawns the Change or Terminate program action from the ProgramDefinition based on the action selected in the MaintainProgram activity field.
Changes to Existing Items
None
Configuration Details
MaintainProgram - transaction + Security for the Prototype Super security role
- Fields
- Program - required combo field listing all active programs for the policy.
- ProgramAction - required radio button selecting either Program change or Program Terminate program actions.
- CurrentProgramAmount - disabled money field displays the ProgramAmount the program in the Program field (filled by actions and events for reference only).
- CurrentProgramFrequency - disabled text field displays the ProgramFrequency of the program in the Program field (filled by actions and events for reference only).
- NewProgramAmount - user entered decimal field to hold the new ProgramAmount value. Enabled/disabled by actions and events based on ProgramAction.
- NewProgramFrequency - user entered decimal field to hold the new ProgramAmount value. Enabled/disabled by actions and events based on ProgramAction.
- Actions & Events
- Events - ONLOAD executes ProgramMath screen math and ProgramValues actions.
- Events - ONCHANGE of Program field executes ProgramMath screen math and ProgramValues actions.
- Events - ONCHANGE of ProgramAction field executes ProgramMath screen math and ProgramValues actions.
- ScreenMath - (ProgramMath) Non global math respectively calculates the CurrentFrequency and CurrentAmout math variables to return the values of the ProgramFrequency and ProgramAmount fields of the Program selected in the Program field.
- Actions - (ProgramValues) assigns the values of the CurrentProgramFrequency and CurrentProgramAmount fields from the (ProgramMath) ScreenMath. It also enables the NewProgramFrequency and NewtProgramAmount fields if the ProgramAction field is Change and disables those fields if the ProgramAction field is Terminate.
- Math
- Change & Terminate text values that define the literal strings 'Change' & 'Terminate' for use in IF comparisons for the ProgramAction field.
- ProgramGUIDMV - A variable to hold the ProgramGUID of the Program field.
- ProgramActionMV- A variable to hold the selected value of the ProgramAction field.
- MathIF - If the ProgramActionMV is Change, create a collection of the ProgramGUID and the new Frequency and Amount and EffectiveDate.
- ChangeEffectiveDateCollection - ProgramGUIDMV as key and Activity Effective Date as value.
- StartDateCollection - SQL returns ProgramGUID and StartDate field as key and value. Reusing existing values since the spawning transaction requires all fields.
- ProgramFrequencyCollection - ProgramGUIDMV as key and NewProgramFrequency field as value.
- ProgramAmountCollection - ProgramGUIDMV as key and NewProgramAmount field as value.
- MathIF - If the ProgramActionMV is Terminate, create a collection of the ProgramGUID and the EffectiveDate.
- TerminateEffectiveDateCollection - ProgramGUIDMV as key and Activity Effective Date as value.
- MaintainProgram - APE attached rule
- Program - PROGRAMACTION attribute is equal to Change.
- Test confirms ProgramActionMV is equal to Change.
- Fields map the four collections from the transaction MathIF to the Program Fields.
- FromCollection ChangeEffectiveDateCollection to EffectiveDate.
- FromCollection StartDateCollection to StartDate.
- FromCollection ProgramFrequencyCollection to ProgramFrequency.
- FromCollection ProgramAmountCollection to ProgramAmiount.
- Program - PROGRAMACTION attribute is equal to Terminate.
- Test confirms ProgramActionMV is equal to Terminate.
- Field maps the collection from the transaction MathIF to the Program Fields.
- FromCollection TerminateEffectiveDateCollection to EffectiveDate.
- Program - PROGRAMACTION attribute is equal to Change.