Class JscriptWorkflowDefinition
- java.lang.Object
-
- org.alfresco.repo.workflow.jscript.JscriptWorkflowDefinition
-
- All Implemented Interfaces:
java.io.Serializable
public class JscriptWorkflowDefinition extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JscriptWorkflowDefinition(java.lang.String id, java.lang.String name, java.lang.String version, java.lang.String title, java.lang.String description, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)Creates a new instance of WorkflowDefinition from scratchJscriptWorkflowDefinition(WorkflowDefinition cmrWorkflowDefinition, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)Create a new instance ofWorkflowDefinitionfrom a CMR workflow object model WorkflowDefinition instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.mozilla.javascript.ScriptablegetActiveInstances()Get active workflow instances of this workflow definitionjava.lang.StringgetDescription()Get value ofdescriptionpropertyjava.lang.StringgetId()Get value ofidpropertyjava.lang.StringgetName()Get value ofnamepropertyjava.lang.StringgetTitle()Get value oftitlepropertyprotected ValueConvertergetValueConverter()Gets the value converterjava.lang.StringgetVersion()Get value ofversionpropertyJscriptWorkflowPathstartWorkflow(java.lang.Object properties)Start workflow instance from workflow definition without attaching any package node to the workflowJscriptWorkflowPathstartWorkflow(ScriptNode workflowPackage, java.lang.Object properties)Start workflow instance from workflow definition
-
-
-
Constructor Detail
-
JscriptWorkflowDefinition
public JscriptWorkflowDefinition(WorkflowDefinition cmrWorkflowDefinition, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
Create a new instance ofWorkflowDefinitionfrom a CMR workflow object model WorkflowDefinition instance- Parameters:
cmrWorkflowDefinition- an instance of WorkflowDefinition from the CMR workflow object modelserviceRegistry- reference to the Service Registryscope- the root scripting scope for this object
-
JscriptWorkflowDefinition
public JscriptWorkflowDefinition(java.lang.String id, java.lang.String name, java.lang.String version, java.lang.String title, java.lang.String description, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)Creates a new instance of WorkflowDefinition from scratch- Parameters:
id- workflow definition IDname- name of workflow definitionversion- version of workflow definitiontitle- title of workflow definitiondescription- description of workflow definitionserviceRegistry- reference to the Service Registryscope- root scripting scope for this object
-
-
Method Detail
-
getId
public java.lang.String getId()
Get value ofidproperty- Returns:
- the id
-
getName
public java.lang.String getName()
Get value ofnameproperty- Returns:
- the name
-
getVersion
public java.lang.String getVersion()
Get value ofversionproperty- Returns:
- the version
-
getTitle
public java.lang.String getTitle()
Get value oftitleproperty- Returns:
- the title
-
getValueConverter
protected ValueConverter getValueConverter()
Gets the value converter- Returns:
- the value converter
-
getDescription
public java.lang.String getDescription()
Get value ofdescriptionproperty- Returns:
- the description
-
startWorkflow
public JscriptWorkflowPath startWorkflow(java.lang.Object properties)
Start workflow instance from workflow definition without attaching any package node to the workflow- Parameters:
properties- Associative array of properties used to populate the start task properties- Returns:
- the initial workflow path
-
startWorkflow
public JscriptWorkflowPath startWorkflow(ScriptNode workflowPackage, java.lang.Object properties)
Start workflow instance from workflow definition- Parameters:
workflowPackage- workflow package node to 'attach' to the new workflow instanceproperties- Associative array of properties used to populate the start task properties- Returns:
- the initial workflow path
-
getActiveInstances
public org.mozilla.javascript.Scriptable getActiveInstances()
Get active workflow instances of this workflow definition- Returns:
- the active workflow instances spawned from this workflow definition
-
-