org.alfresco.repo.workflow.activiti.listener
Class ScriptExecutionListener

java.lang.Object
  extended by org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase
      extended by org.alfresco.repo.workflow.activiti.script.DelegateExecutionScriptBase
          extended by org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener
All Implemented Interfaces:
org.activiti.engine.delegate.ExecutionListener

public class ScriptExecutionListener
extends DelegateExecutionScriptBase
implements org.activiti.engine.delegate.ExecutionListener

An ExecutionListener that runs a script against the ScriptService. The script that is executed can be set using field 'script'. A non-default script-processor can be set in the field 'scriptProcessor'. Optionally, you can run the script as a different user than the default by setting the field 'runAs'. By default, the user this script as the current logged-in user. If no user is currently logged in (eg. flow triggered by timer) the system user will be used instead.

Since:
3.4.e

Field Summary
 
Fields inherited from class org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase
EXECUTION_BINDING_NAME, PERSON_BINDING_NAME, runAs, script, scriptProcessor, USERHOME_BINDING_NAME
 
Fields inherited from interface org.activiti.engine.delegate.ExecutionListener
EVENTNAME_END, EVENTNAME_START, EVENTNAME_TAKE
 
Constructor Summary
ScriptExecutionListener()
           
 
Method Summary
protected  java.util.Map getInputMap(org.activiti.engine.delegate.DelegateExecution execution, java.lang.String runAsUser)
           
 void notify(org.activiti.engine.delegate.DelegateExecution execution)
           
 
Methods inherited from class org.alfresco.repo.workflow.activiti.script.DelegateExecutionScriptBase
runScript
 
Methods inherited from class org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase
executeScript, executeScript, executeScriptAsUser, getPersonNode, getServiceRegistry, getStringValue, setRunAs, setScript, setScriptProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptExecutionListener

public ScriptExecutionListener()
Method Detail

notify

public void notify(org.activiti.engine.delegate.DelegateExecution execution)
            throws java.lang.Exception
Specified by:
notify in interface org.activiti.engine.delegate.ExecutionListener
Throws:
java.lang.Exception

getInputMap

protected java.util.Map getInputMap(org.activiti.engine.delegate.DelegateExecution execution,
                                    java.lang.String runAsUser)
Overrides:
getInputMap in class DelegateExecutionScriptBase


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.