Class JscriptWorkflowDefinition
java.lang.Object
org.alfresco.repo.workflow.jscript.JscriptWorkflowDefinition
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJscriptWorkflowDefinition(String id, String name, String version, String title, 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
Modifier and TypeMethodDescriptionorg.mozilla.javascript.ScriptableGet active workflow instances of this workflow definitionGet value ofdescriptionpropertygetId()Get value ofidpropertygetName()Get value ofnamepropertygetTitle()Get value oftitlepropertyprotected ValueConverterGets the value converterGet value ofversionpropertystartWorkflow(Object properties) Start workflow instance from workflow definition without attaching any package node to the workflowstartWorkflow(ScriptNode workflowPackage, Object properties) Start workflow instance from workflow definition
-
Constructor Details
-
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(String id, String name, String version, String title, 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 Details
-
getId
Get value ofidproperty- Returns:
- the id
-
getName
Get value ofnameproperty- Returns:
- the name
-
getVersion
Get value ofversionproperty- Returns:
- the version
-
getTitle
Get value oftitleproperty- Returns:
- the title
-
getValueConverter
Gets the value converter- Returns:
- the value converter
-
getDescription
Get value ofdescriptionproperty- Returns:
- the description
-
startWorkflow
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
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
-