com.evolveum.midpoint.wf
Class WfHook

java.lang.Object
  extended by com.evolveum.midpoint.wf.WfHook
All Implemented Interfaces:
ChangeHook

@Component
public class WfHook
extends java.lang.Object
implements ChangeHook

Provides an interface between the model and the workflow engine. (1) catches hook calls and determines which ones require workflow invocation (2) (asynchronously) receives results from the workflow process and passes them back to model; resulting e.g. in continuing model operation that has been approved by workflow process

Author:
mederly

Field Summary
static java.lang.String WORKFLOW_HOOK_URI
           
 
Constructor Summary
WfHook()
           
 
Method Summary
 java.util.List<ProcessWrapper> getWrappers()
           
 HookOperationMode invoke(ModelContext context, Task task, OperationResult parentResult)
          Generic method to be implemented by the hook.
 void postChange(java.util.Collection<ObjectDelta<? extends ObjectType>> changes, Task task, OperationResult result)
          Deprecated. 
 void register(HookRegistry hookRegistry)
           
 void registerWfProcessWrapper(ProcessWrapper starter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKFLOW_HOOK_URI

public static final java.lang.String WORKFLOW_HOOK_URI
See Also:
Constant Field Values
Constructor Detail

WfHook

public WfHook()
Method Detail

register

public void register(HookRegistry hookRegistry)

invoke

public HookOperationMode invoke(ModelContext context,
                                Task task,
                                OperationResult parentResult)
Description copied from interface: ChangeHook
Generic method to be implemented by the hook. It is invoked by the Model Clockwork at these occasions: - after PRIMARY state has been entered, - after SECONDARY state has been entered, and - after each of secondary-state waves has been executed (i.e. with the state of SECONDARY for all except the last one, will have state set to FINAL). TODO: what about EXECUTION and POSTEXECUTION states?

Specified by:
invoke in interface ChangeHook
Returns:
- FOREGROUND, if the processing of model operation should continue on the foreground - BACKGROUND, if the hook switched further processing into background (and, therefore, current execution of model operation should end immediately, in the hope it will eventually be resumed later) - ERROR, if the hook encountered an error which prevents model operation from continuing (this case is currently not defined very well)

registerWfProcessWrapper

public void registerWfProcessWrapper(ProcessWrapper starter)

getWrappers

public java.util.List<ProcessWrapper> getWrappers()

postChange

@Deprecated
public void postChange(java.util.Collection<ObjectDelta<? extends ObjectType>> changes,
                                  Task task,
                                  OperationResult result)
Deprecated. 

Description copied from interface: ChangeHook
Callback after the change is executed by the model. The callback gets a view of the changes after they were executed - with filled-in OIDs, generated values, etc. The callback may be used to post-process the changes, e.g. to notify users about their new accounts.

Specified by:
postChange in interface ChangeHook
Parameters:
changes - changes after the execution
task - task in which context we execute
result - ????


Copyright © 2012 evolveum. All Rights Reserved.