Skip navigation links


oracle.iam.platform.kernel.spi
Interface PreProcessHandler

All Superinterfaces:
oracle.iam.platform.kernel.spi.Cancellable, oracle.iam.platform.kernel.spi.Compensable, oracle.iam.platform.kernel.spi.EventHandler

public interface PreProcessHandler
extends oracle.iam.platform.kernel.spi.EventHandler, oracle.iam.platform.kernel.spi.Compensable, oracle.iam.platform.kernel.spi.Cancellable

Pre Process

  1. Pre-process event handlers can be both synchronous and asynchronous.
  2. If a pre-process event cannot be executed, or pre-process event handler throws an exception, process is in "Failed" state.
  3. If the event handler is executed in synchronous mode, it must return an event result, if the event handler is executed in asynchronous mode, it must return null. If the event handler returns in other combination, we move the process to "Failed" state.
  4. When a process is in "Failed" state, the failed event handlers registered for the preprocess event will be executed. If no failed event handlers are provided, process will remain in failed until handleFailed is called.
  5. Pre-process event handler can return an Event Result that can perform the following:
  6. If there are no pre-process events to be performed, process is moved to "Action Stage".
  7. Process can be moved to "Cancelled Stage" by calling cancel.
  8. Event handlers will be notified by calling cancel, if the process is cancelled, and the event handler is currently in execution.
  9. Event handlers can implement compensate, to compensate for changes if the orchestration didn't go through.
  10. Once the process moves to a different stage, the rest of the event handlers in this stage are not executed.

Example event handler declaration :

 <action-handler orch-target="oracle.iam.platform.kernel.vo.SampleOrchestrationTarget" 
     class="oracle.iam.platform.kernel.test.SamplePreProcessHandler" entity-type="oracle.iam.platform.kernel.impl.Address" 
     operation="X" name="samplePreprocess" order="FIRST" stage="preprocess" sync="FALSE" />
 

Method Summary
 boolean cancel(long processId, long eventId, AbstractGenericOrchestration orchestration)
          Method containing the logic that need to be executed if the orchestration is cancelled.
 BulkEventResult execute(long processId, long eventId, BulkOrchestration orchestration)
          Method containing the actual implementation of this pre process event handler for bulk orchestration
 EventResult execute(long processId, long eventId, Orchestration orchestration)
          Method containing the actual implementation of this pre-process event handler

 

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

 

Methods inherited from interface oracle.iam.platform.kernel.spi.Compensable
compensate

 

Method Detail

execute

EventResult execute(long processId,
                    long eventId,
                    Orchestration orchestration)
Method containing the actual implementation of this pre-process event handler
Parameters:
processId, - Id of the orchestration process
eventId, - Id of the orchestartion event
orchestration, - Value object containing information such as orchestartion parameters, operation.
Returns:
Outcome of the event handler. If the event handler is defined to execute in a synchronous mode, it must return a result. If it is defined execute in asynchronous mode, it must return null.

execute

BulkEventResult execute(long processId,
                        long eventId,
                        BulkOrchestration orchestration)
Method containing the actual implementation of this pre process event handler for bulk orchestration
Parameters:
processId, - Id of the orchestration process
eventId, - Id of the orchestartion event
orchestration, - Value object containing information such as orchestartion parameters, operation.
Returns:
Outcome of the event handler. If the event handler is defined to execute in a synchronous mode, it must return a result. If it is defined execute in asynchronous mode, it must return null.

cancel

boolean cancel(long processId,
               long eventId,
               AbstractGenericOrchestration orchestration)
Method containing the logic that need to be executed if the orchestration is cancelled. This would be called only for asynchronous actions.
Specified by:
cancel in interface oracle.iam.platform.kernel.spi.Cancellable
Parameters:
processId, - Id of the orchestration process
eventId, - Id of the orchestartion event
orchestration, - Value object containing information such as orchestartion parameters, operation.

Skip navigation links


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