Work Center APIs

When you call a Work Center API, the system assumes a child/parent order. In other words, when the API is called, the system assumes that any error that is in the runtime error message stack belongs to the level that is associated with that instance of the API call. This means that all of the errors in the error space at that time, whether they are set using business functions or event rules, are packaged or grouped together as children of the level that was passed to the Work Center API. These error messages are then cleared from the error space so that the system can create the next group of messages based on a new set of records.

The timing of the calls to the Work Center API is critical. The reporting program typically starts by editing the header-level record, which leads to a set of detail records. The detail records are the first to be read and processed. Thus, the calls to the work center API typically send level break numbers in descending level break order.

For example, the actual series of level break calls to the API might appear as 4, 4, 4, 3, 4, 4, 3, 2, 4, 4, 3, 2, 1. This series indicates that the call structure started four levels down. The first call at level 4 allows the Work Center API to find any messages that occurred at that time and creates child messages using the level 4 message as the parent. If no errors occurred, then no messages are created. This call sequence example illustrates that the API was called at level 3 after three calls to level 4. When the call to level 3 is made, the Work Center API remembers if any level 4 messages were written. In other words, if no errors occurred when any of the level 4 calls were made, then the Work Center API does not create the level 3 messages. If even one error existed at any of the level 4 calls, the Work Center API creates the level 3 and the level 2 messages.

You must call the Work Center API at every level. Because the work center error messages are created based on a parent/child structure, if a level call is skipped, then the API has no way to group the child messages and child levels that are already created.

For example, this level call structure is valid: 6, 6, 5, 4, 3, 4, 4, 3, 2, 1. Conversely, the call sequence 6, 6, 4, 3, 4, 4, 3, 2, 1 is invalid because after level 6 is called, there is no corresponding call to level 5.

The Work Center API must be called using level 1 when the reporting job is about to complete. Hence, level 1 is the parent to all errors and level break messages. The level 1 call issues the job completed message. The level 1 call to the Work Center API is essential because it ensures that no orphan JD Edwards EnterpriseOne Work Center records are created and it also cleans up all allocated storage used by the Oracle's JD Edwards EnterpriseOne Work Center system. The level 1 call to the API should occur only once, typically in the End Section event of the primary section of the report.