Pre-processing your data

The application provides a processing callout that precedes any Cognos report generation. Functionally, SQL alone does not suffice to extract data from the database. Performance wise, the query used to extract the data is not fast enough.

This framework allows a developer to implement a Java task that aggregates the data for the specified report before executing the report. The data is populated in a staging table (for example, the core burst reports use the AGG_USER_WRK table) in the application database, used specifically for reporting.

The report preprocessor task must extend com.workbrain.app.reports.aggregation.DataAggregationTask so that the task can perform all the necessary calculations to extract the required data. In addition, the task can store the extracted data into the core AGG_USER_WRK table or a custom staging table.

After the task completes, the report will use the data in the staging table to display the required results.

The core application includes these Data and Access classes for the AGG_USER_WRK table:

  • com.workbrain.app.reports.aggregation.db.AggUserWrkAccess
  • com.workbrain.app.reports.aggregation.model.AggUserWrkData

Aggregate tasks must be registered in the application database before they are executed as part of a Cognos report. To set up the aggregate task, you must include the full package and class name of the aggregate task when registering the report, or manually add the task to the Cgmap Preproc Task field of the Cognos mapping table in the application.

This table shows the preprocessing implementation classes that are included in the com.workbrain.app.reports.cognos.aggregation package:

Core Processing Task Description
RegOTDataAggregationTask Preprocessing task that populates the AGG_USER_WRK table with all REG and OT data by date for the specified the application users. This task is used by these core burst reports:
  • Manufacturing OT for Single Department
  • Travel and Transportation OT vs REG
  • Travel and Transportation FTE Usage.
SkdOverrideAuditDataAggregationTask Preprocessing task that populates the WBI_OVERRIDE_VALUE table with overrides pertaining to schedule edits.
TSOverrideAuditDataAggregationTask Preprocessing task that populates the WBI_OVERRIDE_VALUE table with overrides pertaining to timesheet edits.
MftPlantMgrDataAggregationTask Preprocessing task used by the Manufacturing Plant Manager burst report that populates the AGG_USER_WRK table. Task collects target injury and retention data, defined in the Team UDF fields, and compares them to actual data.
MftOvertimeDataAggregationTask Preprocessing task that populates the AGG_USER_WRK table with all OT data for the specified application users, rolled up to the immediate sub team of the application user's root team.
WbiUserExecutionTask Preprocessing task that populates the WBI_USER_EXECUTION table with the application user IDs, along with their corresponding (visible) teams or Employee IDs.
ABADataAggregationTask Calls the ABM LeaveDetailService public service API to consolidate an absence's leave details into reportable form. Reportable data is then stored in the ABA_CONS_LEAVE_DTL table.
BalanceAggregationTask Preprocessing task that populates the AGG_USER_WRK table with a summary of employee balances at the specified start date.
BalanceDetailAggregationTask Preprocessing task that populates the AGG_USER_WRK table with a list of employee balance transactions and the details of those transactions.
FlattenUserTeamAggregationTask This task transforms teams from the default hierarchical structure, which uses parent teams and sub-teams, to flat teams. It accesses team records in the WORKBRAIN_USER_TEAM table, transforms them, and stores the results in the WBI_FLAT_USER_TEAM_TABLE. A start date and end date are considered to determine team membership.

In the metadata model, the query subject WBI_SEC_EMP_BY_TEAM can be used to retrieve employee information.

ForecastWageCostTask Preprocesing task that populates the SCHED_COST_DETAIL table with calculated wage costs based on work detail information.
TeamSchprdAggregationTask This task determines the current schedule period, next schedule period, and previous schedule periods for teams that the specified employee ID is a member of. This task reads data from WBI_TEAM_SCHPRD_DATE if it exists for the team. If the data is not present because, for example, the team is not scheduled using MVS, the schedule periods are calculated and stored in the WBI_TEAM_SCHPRD_DATE table.

For more information about the above classes, see the provided Java documentation. If this document is not available, contact Infor Customer Support.