Inventories
The inventories determine what data is shown in the inventories by applying filters and determine what actions are possible per inventory. Settings can be modified for existing inventories or new inventories can be created with specific actions or filters. Take great care to make sure that end-users are not able to create their own inventories as this would undermine the security and workflow procedures and can lead to instability of the application.
Creating an Inventory and Filtering Data
An inventory is created/edited by going to the inventory called inventory at System > User management > Inventory and either selecting one followed by edit or choosing new.
The Inventory should have a unique code, a name and a description, the inventory type field is used to select the inventory type, by default the inventory type field is ‘Classic’ and user can select URL also. When the inventory is type is ‘Classic’ then the subject should be chosen from the list and optionally, if the default list of displayed columns for the inventory is not what is desired, a selection can be chosen. This optional selection here supersedes the one which can be set on entity configuration which in turn supersedes the one on entity selection.
By default, all records for a chosen subject will be shown, but this might not always match what is desired. Hence a filter can be created to limit which records should be displayed for an inventory.
To add items to the filter, select them in the subject tree and double click them or perform a right click and select filter. The items will be added to the filter from the subject list. On the filter itself, use the AND/OR button to change the conditions, add, remove or edit specific parts of the filter and use expert mode to enter the query directly.
For more information, please refer to the Query Builder documentation in the Administrator guide.
When Inventory type is selected as URL, screen will be changed and new field “URL” will be added, User can set url for example: ‘https://www.sungard.com/solutions/corporate-liquidity/payments-factory’. This URL inventory will display the URL page when user clicks on an inventory and it is of type URL, then display the URL on the right hand side (just like for Nodes)
Figure 48 Creating a classic Inventory
Figure 49 creating a URL Inventory
The following options exist for relative times and dates.
T: Returns todays date. For date fields, this is interpreted as the date only, for date-time fields, this is interpreted as today at the beginning of the day. (00.00 hours)
N: Now (The date of today plus the current time)
D: days
H: hours
m: minutes
s: seconds
Allowed operators for relative dates are
+
-
( )
Examples
tomorrow: T+1
today when using a date-only field: T
yesterday: T - 1
30 days ago: T - 30
30 days in the future + 30
Everything from today when using a date-time field: (> (T) AND < (T+1)) because it starts at today (00:00) and ends at tomorrow (00:00).
Everything between 60 days ago and 30 days ago: (>= (T-60) AND <= (T-30))
Everything between 30 and 60 days into the future: (> (T+30) AND < (T+60))
All payments with a cut-off time within the hour: Payment.Payment[cutoffTime > 'N' and cutoffTime < ('N + 1H')]
Notice the difference in behavior when using a date or date-time field as for dates, the entire day will count, while for date-times only the date at midnight in the morning counts.
Special Cases
In order to check for empty fields "null" can be entered in the condition field. =null corresponds to empty fields, <>null corresponds to non-empty fields.
Wildcards can be used for filters as well. The % character will replace multiple characters.
When selecting values: the filter x > 010 will result in all values larger than 10. (e.g. 0099 and 090 are valid, but 009 is not.)
When selecting text fields, the filter x > 010 will result in all data where the first three characters are larger than 010. (e.g. 090 is valid, but 0099 and 009 are not.) In text fields letters have a larger value than numbers (e.g. a > 1)
Editing the list of Allowed Actions
Every inventory has a list of allowed actions and an order in those actions (which actions are first in that list). From this list of actions, a subset can be chosen per security profile (for example, certain profiles are allowed to view data, but not to edit that data). The actions tab of the inventory is where this list of allowed actions is configured.
Figure 49 Editing the allowed actions
To add an action, select the Add button and choose the action from the presented list which will then be added to the bottom of the current list. To remove it, select the action and pick Remove. The order of actions is edited by selecting the action and choosing the Up or Down buttons and a separator is added by clicking the Add separator button.
Setting the Default Action for an Inventory
The default action is chosen in the inventory menu on the actions tab. There, you choose the action which is to become the default and then choose Default at the bottom of the menu.
Figure 410 Default Action
Changing the Translations of an Inventory
Inventories have their own translations on the translation tab. These same translations can also be edited via the central translation inventory which is available to the integrator via System > GUI > Translations. Having them also here simply allows for easier editing.
Figure 411 Editing inventory translations
Adding a Counter to an Inventory
The counter mechanism counts the number of records or objects retrieved from the database and displays this number next to the inventory itself. Note that the number of existing records is shown, not the actual number of records displayed as this can differ due to activated filters. The counter is enabled on the additional fields tab of the inventories detail screen. Check the checkbox to have the counter displayed for the inventory. In addition, the auto refresh option can be activated to keep the counters up to date. The refresh interval should be specified in seconds and if no interval is entered, the default interval of ten seconds is used. Do note that this impacts performance.
Figure 412 Adding a counter to an inventory
Adding Alerts to an Inventory
Inventories can trigger an alert symbol for different conditions (most commonly when empty or when not empty). The desired condition for the alerts can be set on the additional fields tab of the inventories detail screen. In addition, activating auto refresh and choosing the interval for refreshing (in seconds) will make sure that the alerts and counts are regularly updated. Note that auto refreshing consumes additional resources since a connection to the database is made during every refresh. If no interval is entered, a default interval of ten seconds will be used.
Figure 413 Adding an alert condition to an inventory
On Screen Filtering of Inventory Data
There are two ways to filter data within an inventory. You can create an expression at runtime which must be matched by the available data, or you can have default on-screen filters.
You can create a filter at runtime by right clicking on the column header and entering the characters which must be matched. (%Pay in the example below which means any word with the letters Pay in them and respecting the case)
A search screen can be added to an inventory. This is done on the additional fields tab. The screen itself is selected from a list of XGL screens and the way it is displayed is selected in the Search option. It can be set to None, Collapsed, which means you have to expand it to use it, Available, which means it can be used, but is not required and finally required, which means that filter data must be filled out before the content of the inventory is shown. This last option is used to prevent inventories from overwhelming the database which could cause delays in the system.
Figure 414 Adding on screen filter to an inventory
Figure 415 Example of filter
Refreshing Inventory Data
When you want to periodically refresh the contents of an inventory, the auto refresh option on the additional fields tab can be used. The refresh interval should be specified in seconds and if no interval is entered, the default interval of ten seconds is used. Do note that this impacts performance. This refresh interval will refresh both the counters (if activated for that inventory) and the contents.
Figure 416 Inventory refreshing
The Inventory Context
The context of the inventory can be used to pass on additional information for that inventory. Trax security is managed by a security manager (com.trax.framework.security.SecurityManager), defined in application.properties. The default implementation is com.trax.system.usermanagement.DefaultSecurityManager, but this can be extended by adding new security rules or SecurityInterceptors (com.trax.system.usermanagement.SecurityInterceptor) or it can be replaced for specific projects. There is one default security interceptor in the template which adds the security rules for reporting: securityInterceptors=com.trax.reporting.ReportingSecurityInterceptor.
The security manager & interceptors get the query / CRUD request and the user that is requesting it as input. Sometimes it is necessary to give more context to the security layer. To do this you can add parameters to the query. This is done in java code with the following statement: query.getParameters().put("aaa","bbb").
For GUI Inventories, the context field can be used, this will add the "context" parameter to the query. For example if you set context to signing then the security manager will know to invoke the signing logic.