Future Cost Engine Run Type Configuration
The Future Cost Engine can be configured by cost event type in one of three ways:
-
Synchronous
-
Asynchronous
-
Batch
The method to be used by each cost event type is controlled by the configuration defined in the COST_EVENT_RUN_TYPE_CONFIG table.
Synchronous
When running in synchronous mode, the Future Cost Engine is run in the same transaction as the client that calls it. For example if the cost change event is configured to run in synchronous mode, the work done in the Future Cost Engine for the approval of a cost change runs in the same transaction as the flipping of the status of the cost change to ‘A' status. That means the user in the screen will have a busy cursor until the Future Cost Engine completes.
Cost event types with an EVENT_RUN_TYPE set to ‘SYNC' on COST_EVENT_RUN_TYPE_CONFIG will run in synchronous mode.
Figure 9-1 Future Cost Engine - SYNC Mode
![Future Cost Engine Sync Future Cost Engine Sync](img/rms_futcostengine.png)
Asynchronous
When running in asynchronous mode, the Future Cost Engine is run in a separate transaction than the client that calls it. For example if the cost change event is configured to run in asynchronous mode, the work done in the Future Cost Engine for the approval of a cost change runs in a different transaction as the flipping of the status of the cost change to ‘A' status. This means that control returns to the user in the screen while the Future Cost Engine runs in the background.
Cost event types with an EVENT_RUN_TYPE set to ‘ASYNC' on COST_EVENT_RUN_TYPE_CONFIG runs in asynchronous mode.
Figure 9-2 Future Cost Engine - ASYNC Mode
![Future Cost Engine Async Future Cost Engine Async](img/rms_futcosteing_async.png)
Batch
When running in batch mode, the Future Cost Engine is run during the nightly batch run. For example if the cost change event is configured to run in batch mode, the work done in the Future Cost Engine for the approval of a cost change runs during the next batch run after the approval of the cost change.
Cost event types with an EVENT_RUN_TYPE set to ‘BATCH' on COST_EVENT_RUN_TYPE_CONFIG runs in batch mode.
The fcexec.pc batch program and its associated prepost pre job contain logic to run the Future Cost Engine in batch mode.
Figure 9-3 Future Cost Engine - Batch Mode
![Future Cost Engine Batch Future Cost Engine Batch](img/rms_futcosteng_batch.png)