Computing Balances
You can compute account balances at user-defined times using the BALANCE scheduled task, or in real-time using the Balance engine.
1. BALANCE Scheduled Task
This generates the balance of all accounts that can generate a balance (Balance checkbox checked, and balance frequency specified). The task will take from the database all the postings that have not yet been processed, until the valuation date. It will calculate a new balance for each balance date and a new total of movements between 2 balance dates.
From the Calypso Navigator, navigate to Configuration > Scheduled Tasks (menu action scheduling.ScheduledTaskListWindow
), and select the type BALANCE.
Attributes
» | Reset Balances - Select True to reset existing balances, or False otherwise. When true, you can enter the Reset Date to reset the balances since the selected date only - All balances are reset otherwise. |
» | DateType - Select the posting selection date: effective date or booking date. |
» | SQL From - You can enter additional tables for the from clause (a String of comma-separated table names), or null. Note that the scheduled task will query the bo_posting table by default. |
» | SQL Where - You can enter a where clause (String) on the specified tables, for example "bo_posting_type = ‘INTEREST’". |
2. Balance Engine
2.1 Balance Engine Configuration
The Balance engine is configured in the Engine Manager of Web Admin: event subscription and engine parameters.
It should subscribe to the following accounting events: PSAccountingEvent and PSEventReprocessAccounting.
It should use the event filter BalanceFilterEvent.
The Balance engine generates account balances in real-time.
The behavior of the Balance engine may be modified with the following engine parameters.
If a parameter is not available for setup, you can register it in the domain "engineParam".
Parameters and Properties |
Description |
BALANCE_MODE |
Set to ScheduledTask – This is case sensitive. This is currently the only supported balance mode. |
CALC_BALANCE_POSITION_FXAMOUNTS |
Set to true to compute balances in base currency, and conversion balances by originating contributing currencies.
Default is false. |
MAX_BATCH_EVENT |
Maximum number of persistent events loaded at one time by an engine in batch mode. The engine will load events in MAX_BATCH_EVENT chunks until all events are processed. Persistent events received after MAX_QUEUE_SIZE is reached will be processed in batch mode. Allows controlling engine memory usage, therefore improving the performance. |
MAX_QUEUE_SIZE |
Maximum number of events buffered on an engine event queue. When this number is exceeded, real time events are discarded and the engine restarts based on the restart timer (TIMEOUT_RESTART), in order to process the unprocessed persistent events using batch mode. This parameter can be useful for controlling the engine’s memory usage. If not set, the default value for this parameter is no limit on queue size. Allows controlling engine memory usage, therefore improving the performance. |
PricingEnv |
Pricing environment used by the engine. If not set, the default Pricing Environment of the user running the engine will be used. |
PROJECTED_DAYS |
Set to 0. |
TIMEOUT_RESTART |
Number of seconds to wait before an engine restarts after MAX_QUEUE_SIZE has been reached. The default value is 3600 seconds (1 hour). |
2.2 Starting the Balance Engine
The Balance engine can be started from the Engine Manager in Web Admin.
Please refer to Calypso Web Admin documentation for complete details.