Macros
Macros are means to perform configurable actions like quickly set an end date to a record and all underlying details.
A macro definition consists of the following settings:
Field | Description |
---|---|
Code |
The code of the macro |
Description |
The description of the task that the macro performs |
Type |
When a macro is started, it invokes one the following: |
Context |
The execution level of the macro Based on the context, the user gets an option to start the macro from either the group client or group account or group account product page. |
Bulk Update Definition |
The referenced bulk update definition gets invoked for a Bulk Update (type) macro |
Dynamic Logic |
The referenced dynamic logic gets invoked for a Dynamic Logic (type) macro |
Access Restriction |
Only a user with the specified access can invoke the macro |
Page Template |
The referenced floorplan enables the selection of contextual attributes. This configuration does not apply for bulk update type macros. The macro uses the Object Selection page template. |
For Oracle Insurance Gateway Integration, the following additional settings apply: |
For additional information on setting credentials refer to the credential integration point.
A macro can specify one or more parameter.
The parameter provides means to supply execution or contextual data for the macro of type dynamic logic, Oracle Insurance Gateway Integration, and bulk update (as activity parameter: named value pair ). This configuration is mainly to assist a user to start a macro form the user interfact and therefore is not a mandatory configuration.
For example, a macro to end date group account products linked to a specific enrollment product can specify a single value date type parameter 'endDate' and a single value char type parameter of type 'enrollmentProduct'.
The value of the endDate parameter provides information about the date from when the group account product gets ended. Similarly, the value of the 'enrollmentProduct' parameter specifies the selection criteria for group account product.
Field | Description |
---|---|
Usage Name |
Name of the parameter. The usage name makes the parameter key |
Display Name |
The display name of the parameter |
Data Type |
1) Char |
Mandatory? |
true or false |
Multi Value? |
true or false |
Pick List |
The reference to List of Value Floorplan template. |
Filter |
Applicable only in context of a pick list. Specifies the filter criteria for a list of values. |
A user can start the macro from the Oracle Health Insurance user interface (JET) or by directly using the Macro Integration Point.
History record gets created when a user starts a macro. The history record has the following fields:
Field | Description |
---|---|
Macro |
The macro to which the history record belongs to |
Request |
The macro request JSON |
Response |
The macro response JSON |
Subject Id |
Id of the context object |
Monitor Id |
Task id or Bulk update activity id or Oracle Insurance Gateway exchange id |
Use Cases
Term Group
This sample use case explains the use of macros to term a group. Termination of a group implies end dating all the group account product availability as of the term date. Also, term the policy enrollments linked to the group as of the term date. To configure such a macro, set up the definition as follows:
Field | Configuration |
---|---|
Code |
TERM_GROUP |
Description |
Terms the group account product availability and policy enrollment products linked to the group as of the term date. |
Type |
Oracle Insurance Gateway Integration |
Context |
Group Client |
Access Restriction |
- |
Page Template |
- |
The macro requires the term date as a parameter.
Parameter setup is necessary only if the intention is to start the macro from the user interface. Depending on the parameter configuration, the user interface displays the correct input form elements. For example, date picker or a list of values to choose from etc. |
The following parameter configurations ensure that a field of type "date", labeled as Term Date is displayed on the user interface.
Field | Configuration |
---|---|
Usage Name |
termDate |
Display Name |
Term Date |
Data Type |
Date |
Mandatory? |
true |
Multi Value? |
false |
Pick List |
- |
Filter |
- |
This macro is based on the Oracle Insurance Gateway Integration. This means that all the business logic that is, term group account product availability and policy enrollment is performed by an Oracle Insurance Gateway integration. Suppose such an integration can be invoked by sending a POST request to:
http://[context:host]/exchanges/integration/termgroup
The user starts the macro from the user-interface page or by directly making the following request to the Macro Integration Point.
{
"parameters":[{
"name":"termDate",
"value":"2022-01-01"
}],
"macroDefinitionCode":"TERM_MACRO",
"context":
{"id": "26551" }
}
The macro integration point creates a macro history and starts the Oracle Health Insurance Integration. For the integration point to be able to start Oracle Health Insurance Exchange, the following additional setup must be configured:
Property | Value |
---|---|
ohi.macro.termGroup.endpoint, |
http://[context:host]/exchanges/integration/termgroup |
ohi.service.OIG_INTEGRATION_termGroup.client.authentication |
BasicAuthentication |
Setup credential for OIG_INTEGRATION_termGroup |
Credentials Integration Point |
Oracle Insurance Gateway integration is invoked by the macro integration point with the following payload.
{
"parameters":[{
"name":"termDate",
"value":"2022-01-01"
}],
"context":
{"id": "26551" },
"links": [{
"href" : "refers to macro history",
"rel" : "subject",
"httpMethod" : "GET"
}],
}
Oracle Insurance Gateway can use the term date and context information to first end date policy enrollment products (by starting a bulk update activity) and then send a patch request on the group account to end availability of all the group account products as of the term date.
Oracle Insurance Gateway updates the macro history dynamic fields, records, and status of the dynamic field for the execution summary. For every error the OIG application encounters, it sends a patch request to update the macro history. The end result depends on the specified dynamic logic.
Term availability for specific insurable classes.
Let’s extended the above use case to limit the insurable classes for which the availability can be termed. This requires a user to specify the list of insurable classes to consider.
The following additional parameters can be defined:
The following parameter configurations ensure that a field of type "date", labeled as Term Date is displayed on the user interface.
Field | Configuration |
---|---|
Usage Name |
groupAccountInsurableClasses |
Display Name |
Insurable Classes |
Data Type |
Char |
Mandatory? |
true |
Multi Value? |
true |
Pick List |
groupaccountinsurableclasses |
Filter |
groupaccount.code.eq({$context.code}) |
This configuration ensures that a pick list of group account insurable classes defined for the group is displayed. The macro request contains (comma separated) list of selected group account insurable class ids.
A user can start the macro from the user-interface page or by directly making the following request to the Macro Integration Point.
{
"parameters":[{
"name":"termDate",
"value":"2022-01-01"
},
{
"name":"groupAccountInsurableClasses",
"value":"12323243, 2323232, 24434343"
}],
"macroDefinitionCode":"termMacro",
"context":
{"id": "26551" }
}
Alternatively, a selection floorplan can be attached to the macro definition to allow users to select the group account insurable classes from UI.
Floorplan Configuration
{
"floorplan_selection":{
"title":{
"label":"SELECT_RECORDS_TO_TERM"
},
"properties":[
{
"name": "code",
"sequence": 1
},
{
"name": "descr",
"sequence": 2
},
{
"name": "groupaccountinsurableclasses",
"sequence": 3,
"properties": [{
"name": "insurableClass",
"sequence": 1,
"refType": {
"type": "insurableClass"
}},
{
"name": "displayName",
"sequence": 2
}]
}]
}
}
In this case the payload constructed from the UI to start the macro will be different from the parameter based approach. Payload to start macro integration:
{
"parameters":[{
"name":"termDate",
"value":"2022-01-01"
}],
"macroDefinitionCode":"termMacro",
"context": {
"id": "26551",
"code": "ORACLE",
"descr":"Oracle Corp.",
"groupAccountInsurableClassList": [
{
"id": "12323243",
"insurableClass": {
"id": "18435",
"links": [
{
"href": "http:[context:root]/generic/insurableclasses/18435",
"rel": "canonical"
}
]
},
"displayName": "Employee"
},
{
"id": "2323232"
},
{
"id": "24434343"
}]
}
}
Similarly, Oracle Insurance Gateway integration gets the group account insurable class information either in the parameters or in the context object depending on the macro configuration.
This flexibility allows for user interface design best suited for the use case at hand.
Transfer Product
Consider another example to transfer membership from a basic product to a silver product as of specified date using bulk update definition.
Bulk update definition can be invoked using
1) global activities or
2) through macros
To start a bulk update definition using macros, the macro definition must be setup as follows:
Field | Configuration |
---|---|
Code |
transferProduct |
Description |
Transfers memberships to the selected product as of given date |
Type |
Bulk Update |
Context |
Group Account |
Bulk Update Definition |
transferProduct |
The advantage of starting a bulk update through macros is consolidated UI experience on all the processes started in context of groups.
The following parameter configurations ensure that a field of type "date", labeled as Transfer Date gets displayed on the user interface.
Field | Configuration |
---|---|
Usage Name |
transferDate |
Display Name |
Transfer Date |
Data Type |
Date |
Mandatory? |
true |
Multi Value? |
false |
Pick List |
- |
Filter |
- |
Configure the following additional parameters to supply the "from product" and "to product" details.
Field | Configuration |
---|---|
Usage Name |
fromProduct |
Display Name |
From Product |
Data Type |
Char |
Mandatory? |
true |
Multi Value? |
false |
Pick List |
groupaccountproducts |
Filter |
groupaccount.code.eq({$context.code}) |
Field | Configuration |
---|---|
Usage Name |
toProduct |
Display Name |
To Product |
Data Type |
Char |
Mandatory? |
true |
Multi Value? |
false |
Pick List |
groupaccountproducts |
Filter |
groupaccount.code.eq({$context.code}) |
The user starts the macro from the user-interface page or by directly making the following request to Macro Integration Point.
-- Paramters must specify "bulk update activity parameters" ---
-- For bulk update, any macro definition *parameters* are sent in as named value pairs
{
"parameters":[{
{
"name":"parameters",
"value":"transferDate,2022-01-02;toProduct,SILVER;fromProduct,BASIC "
}],
"macroDefinitionCode":"transferProduct",
"context":
{"id": "26551" }
}
The macro integration point internally starts the bulk update activity as specified by the macro definition.