Skip navigation links
oracle.iam.platform.kernel.spi
Interface PostProcessHandler
- All Superinterfaces:
- oracle.iam.platform.kernel.spi.EventHandler
-
public interface PostProcessHandler
- extends oracle.iam.platform.kernel.spi.EventHandler
Post Process
- Post-process event handlers can be both synchronous and asynchronous.
- Post process always executes asynchronously. However indicating the event handler as sync, means orchestration engine will wait for the event handler to finish and goes to the next based on the result.
- If a post-process event cannot be executed, or post-process event handler throws an exception, process is in "Failed" state.
- 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.
- When a process is in "Failed" state, the failed event handlers registered for the post-process event will be executed. If no failed event handlers are provided, process will remain in failed until handleFailed is called.
- Post-process event handler can return an Event Result that can perform the following:
- Return a List of "immediate" Orchestrations to be performed before proceeding to the next event handler.
- Return a List of "deferred" Orchestrations to be performed if the entire change goes through normally.
- Return an event result that instructs none of this. (Indicates nothing to be done by the orchestration engine.)
- If there are no post-process events to be performed, orchestration engine will execute the "deferred" orchestration changes.
- Process can be moved to "Cancelled Stage" by calling cancel.
- Event Handlers will be notified by calling cancel, if the process is cancelled, and the event handler is currently in execution.
- Event handlers can implement compensate, to compensate for changes if the orchestration didn't go through.
Example event handler declaration :
<action-handler class="oracle.iam.platform.kernel.test.SamplePostProcessHandler" entity-type="User"
operation="CREATE" name="PostProcess1" order="FIRST" stage="postprocess" sync="TRUE">
Method Summary |
boolean |
cancel(long processId, long eventId, AbstractGenericOrchestration orchestration)
Method containing the logic that need to be executed if the orchestration is cancelled. |
void |
compensate(long processId, long eventId, AbstractGenericOrchestration orchestration)
Method containing the logic that need to be executed to compensate the changes made by current event handler if the orchestration fails |
BulkEventResult |
execute(long processId, long eventId, BulkOrchestration orchestration)
Method containing the actual implementation of this post process event handler for bulk orchestration |
EventResult |
execute(long processId, long eventId, Orchestration orchestration)
Method containing the actual implementation of this post process event handler |
Methods inherited from interface oracle.iam.platform.kernel.spi.EventHandler |
initialize |
execute
EventResult execute(long processId,
long eventId,
Orchestration orchestration)
- Method containing the actual implementation of this post 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 post 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.
compensate
void compensate(long processId,
long eventId,
AbstractGenericOrchestration orchestration)
- Method containing the logic that need to be executed to compensate the changes made by current event handler if the orchestration fails
-
- Parameters:
processId,
- Id of the orchestration process
eventId,
- Id of the orchestartion event
orchestration,
- Value object containing information such as orchestartion parameters, operation.
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.
-
- 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 © 2014, Oracle and/or its affiliates. All rights reserved.