Download Defining Maintenance Object Options
Transcript
Configuration Tools Fastpath Refer to Business Object - Lifecycle for more information on how to set up state-specific algorithms. Inheriting Lifecycle If a business object references a parent business object, it always inherits its lifecycle from the highest-level business object in the hierarchy. In other words, only the highest-level parent business object can define the lifecycle and the valid state transitions for each state. Child business objects, in all levels, may still extend the business rules for a given state by introducing their own state-specific algorithms. The system executes all state-specific algorithms at all levels in the inheritance chain starting from the highest-level parent business object moving on to lower levels. Auto-Transition In a single transition from one state to another, the system first executes the Exit algorithms of the current state, transitions the entity to the new state, executes the Enter algorithms of the new state followed by its Monitor algorithms. At this point if a Monitor algorithm determines that the entity should be further automatically transitioned to another state the remaining monitoring algorithm defined for the current state are NOT executed and the system initiates yet another transition cycle. Notice that an Enter algorithm can also tell the system to automatically transition the entity to another state. In this case the remaining Enter algorithm as well as all Monitor algorithms defined for the current state are NOT executed. The following illustration provides an example of an auto-transition chain of events. In this example a business entity is in a Pending state. While in that state a Monitor algorithm determines to autotransition it to the Denied state. At this point the following takes place: • • • • • No further Monitor algorithms of the Pending state are executed Pending state Exit algorithms are executed The system transitions the entity to the Denied state Denied state Enter algorithms are executed. No further auto-transition is requested. Denied state Monitor algorithms are executed. No further auto-transition is requested. Keeping An Entity In Its Last Successful State By default, any error encountered while transitioning a business entity from one state to another rolls back ALL changes leaving the entity in its original state. When applicable, the Maintenance Object can be configured to always keep an entity in its last successful state rather than rolling all the way back to the original state. This practice is often referred to as "taking save-points". In case of an error, the entity is rolled back to the last successfully entered state and the error is logged on the maintenance object's log. Notice that with this approach no error is returned to the calling process, the error is just logged! The logic to properly log the error is in a Transition Error Maintenance Object plug-in. The system considers a maintenance object to practice "save-points" when such an algorithm is plugged into it. 374 • Oracle Utilities Application Framework Administration User's Guide