org.alfresco.repo.workflow.jbpm
Class AlfrescoJavaScript
java.lang.Object
org.alfresco.repo.workflow.jbpm.JBPMSpringActionHandler
org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript
- All Implemented Interfaces:
- java.io.Serializable, org.jbpm.graph.def.ActionHandler
public class AlfrescoJavaScript
- extends JBPMSpringActionHandler
A jBPM Action Handler for executing Alfresco Script
The configuration of this action is as follows:
It's exactly the same as jBPM's own script configuration.
- See Also:
- Serialized Form
Method Summary |
void |
execute(org.jbpm.graph.exe.ExecutionContext executionContext)
|
static java.lang.Object |
executeScript(org.jbpm.graph.exe.ExecutionContext context,
ServiceRegistry services,
java.lang.String expression,
java.util.List variableAccesses,
org.alfresco.service.cmr.repository.NodeRef companyHome)
Execute a script |
protected void |
initialiseHandler(org.springframework.beans.factory.BeanFactory factory)
Initialise Action Handler |
void |
setRunas(java.lang.String runas)
|
void |
setScript(org.dom4j.Element script)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlfrescoJavaScript
public AlfrescoJavaScript()
initialiseHandler
protected void initialiseHandler(org.springframework.beans.factory.BeanFactory factory)
- Initialise Action Handler
- Specified by:
initialiseHandler
in class JBPMSpringActionHandler
- Parameters:
factory
- Spring bean factory for accessing Alfresco beans
execute
public void execute(org.jbpm.graph.exe.ExecutionContext executionContext)
throws java.lang.Exception
- Throws:
java.lang.Exception
executeScript
public static java.lang.Object executeScript(org.jbpm.graph.exe.ExecutionContext context,
ServiceRegistry services,
java.lang.String expression,
java.util.List variableAccesses,
org.alfresco.service.cmr.repository.NodeRef companyHome)
- Execute a script
- Parameters:
context
- jBPM execution contextservices
- Alfresco service registryexpression
- script to executevariableAccesses
- (optional) list of jBPM variables to map into script (all, if not supplied)companyHome
- TODO
- Returns:
- script result
setScript
public void setScript(org.dom4j.Element script)
setRunas
public void setRunas(java.lang.String runas)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.