K2BTools employs an intent resolver program before invoking the intent resolver object. This program is responsible for mapping intention parameters, which can be either object parameters or session parameters. The intent resolver program determines the appropriate session keys to use and how the object's parameters can be utilized.
K2BTools' intent-based navigation includes three generic programs designed to handle the invocation of the intent resolver object:
- IntentResolverWorkWith
- IntentResolverEntityManager
- IntentResolverWebPanelDesigner
These programs can be customized by developers, or new ones can be created. Each intent resolver program receives an Intent as a parameter, which is an SDT (Structured Data Type) containing:
- IntentResolverName: to identify the intent in the Intent based navigation metadata
- Parameters. : Parameters extracted by the LLM.
 |
| Intent parameter SDT |
Essentially, these programs perform the following tasks:
- Identify the object that needs to be called.
 |
| Getting intent resolver object to call |
- Determine which constants can be used as object parameters.
 |
| In case an entity manager the &TrnMode is declared as a constant of the intention |
- Iterate through the parameters. Depending on each parameter
 |
| Iterating through the parameters |
- If it is an object parameter, it will be used to call the object.
 |
| Adding parameters to the parameter list |
- If the parameter is a filter, it will be added to the GridState and this state will be set in the session, concerning the object that will be called.
 |
| Adding filter to the state of the grid |
- If the parameter is an Attribute Default , it will be added to the TrnContext.
 |
| Adding a default value to an attribute |
- Call the object with the selected parameters
 |
| In this case filter parameters are set in the GridState and object parametrs are used to call the object |
In the base code of the intent resolver, the maximum number of parameters the object supports when called is five. If more parameters are needed, developers can add an extra case for this purpose.
Case &Parameters.Count = 6
&Parameter1 = &Parameters.Item(1)
&Parameter2 = &Parameters.Item(2)
&Parameter3 = &Parameters.Item(3)
&Parameter4 = &Parameters.Item(4)
&Parameter5 = &Parameters.Item(5)
&Parameter6 = &Parameters.Item(6)
Link(&ObjectName, &Parameter1, &Parameter2, &Parameter3, &Parameter4, &Parameter5, &Parameter6)
If using encrypted URL parameters, the intent resolver code can be edited to add encryption to the link. This can be modified by appending !"_site_encryption" or !"session_encryption" after the link parameter, depending on the value of the encrypt URL parameter properties.
Case &Parameters.Count = 6
&Parameter1 = &Parameters.Item(1)
&Parameter2 = &Parameters.Item(2)
&Parameter3 = &Parameters.Item(3)
&Parameter4 = &Parameters.Item(4)
&Parameter5 = &Parameters.Item(5)
&Parameter6 = &Parameters.Item(6)
Link(&ObjectName,!"_site_encryption", &Parameter1, &Parameter2, &Parameter3, &Parameter4, &Parameter5, &Parameter6)
|