Skip navigation links


oracle.iam.platform.kernel.spi
Interface FailedHandler

All Superinterfaces:
oracle.iam.platform.kernel.spi.EventHandler

public interface FailedHandler
extends oracle.iam.platform.kernel.spi.EventHandler
  1. Failed handlers specify how failures should be handled for a particular stage, event or child process.
  2. Failed handlers can be both synchronous and asynchronous.
  3. All stages but Preview and Validation can define their failed handlers.
  4. Child process can define its failed handlers to tell orchestration engine how to proceed when error occurred in Preview or Validation stage.
  5. To register a failed handler for all child process type, specify the "stage" attribute to "change".
  6. To register a failed handler for one kind of child process type, specify the "event" attribute to the child process type [i.e. event=immediate, deferred or restart].
  7. Failed handler can return a response from an enumeration (MANUAL_COMPLETE, RETRY, or COMPENSATE).
  8. If the failed handler returns COMPENSATE, then process is moved to "Compensate Stage". But if the handler that failed in execution is a compensate event handler, process remains in failed state until the handleFailed method is called.
  9. If the failed handler returns RETRY, process will re-execute the event with failed status. If that event has already exceeded the maximum retry count, process remains in failed state until the handleFailed method is called.
  10. If the failed handler returns MANUAL_COMPLETE, process will resume its execution with the next event handler. If all event handlers for the stage are performed, we automatically move the process to the next stage.
  11. A failed handler may return 'NULL' to indicate, it doesn't know how to deal with the error, in which case the next failed handler in the list is executed.
  12. If the failed handler is working asynchronously, the execution can be cancelled by calling cancelPendingFailedEvent, and the next failed event handler in the list will be executed.
  13. Failed handlers will be notified by calling cancel, if the handler is cancelled, and the failed handler is currently in execution.
  14. Once the process moves to a different stage, rest of the failed handlers are not executed.
  15. If no failed handler can handle the error (Because there are no handlers defined, or all executed handlers return NULL for the response), process will remain in failed state until the handleFailed method is called.
  16. If the failed handler cannot be executed or throws any Runtime exceptions, it will be logged, and process will proceed to execute the next failed handler.

Example event handler declaration :

 <failed-handler orch-target="oracle.iam.platform.kernel.vo.ToplinkOrchestration" 
     class="oracle.iam.platform.kernel.test.SampleFailedRetryHandler" entity-type="Person" 
     operation="WALK" name="testFailed" order="1" event="PostProcess" sync="TRUE" />
 

Method Summary
 boolean cancel(long processId, long eventId)
          Method containing the logic that need to be executed if the orchestration is cancelled.
 FailedEventResult execute(long processId, long eventId, BulkOrchestration orchestration)
          Method containing the actual implementation of the event handler that gets executed when process is failed in any stage
 FailedEventResult execute(long processId, long eventId, Orchestration orchestration)
          Method containing the actual implementation of the event handler that gets executed when process is failed in any stage

 

Methods inherited from interface oracle.iam.platform.kernel.spi.EventHandler
initialize

 

Method Detail

execute

FailedEventResult execute(long processId,
                          long eventId,
                          Orchestration orchestration)
Method containing the actual implementation of the event handler that gets executed when process is failed in any stage
Parameters:
processId, - Id of the orchestration process
eventId, - Id of the orchestartion event
orchestration, - Value object containing information such as orchestartion parameters, operation.
Returns:
A response from an enumeration (COMPENSATE, RETRY, or MANUAL_COMPLETE) indicating whether process should be moved to Compensate Stage or it should be retried or it should move onto next event handler

execute

FailedEventResult execute(long processId,
                          long eventId,
                          BulkOrchestration orchestration)
Method containing the actual implementation of the event handler that gets executed when process is failed in any stage
Parameters:
processId, - Id of the orchestration process
eventId, - Id of the orchestartion event
orchestration, - Value object containing information such as orchestartion parameters, operation.
Returns:
A response from an enumeration (COMPENSATE, RETRY, or MANUAL_COMPLETE) indicating whether process should be moved to Compensate Stage or it should be retried or it should move onto next event handler

cancel

boolean cancel(long processId,
               long eventId)
Method containing the logic that need to be executed if the orchestration is cancelled. This would be called only for asynchronous actions.
Parameters:
processId, - Id of the orchestration process
eventId, - Id of the orchestartion event

Skip navigation links


Copyright © 2014, Oracle and/or its affiliates. All rights reserved.