org.alfresco.repo.workflow.jscript
Class JscriptWorkflowPath

java.lang.Object
  extended by org.alfresco.repo.workflow.jscript.JscriptWorkflowPath
All Implemented Interfaces:
java.io.Serializable

public class JscriptWorkflowPath
extends java.lang.Object
implements java.io.Serializable

Class that represents a path of execution through a workflow. A simple workflow consists of only one root path of execution. That path may branch at some subsequent transition, so that execution follows multiple paths through the workflow.

See Also:
Serialized Form

Constructor Summary
JscriptWorkflowPath(java.lang.String id, WorkflowNode node, JscriptWorkflowInstance instance, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
          Creates a new instance of a workflow path
JscriptWorkflowPath(WorkflowPath cmrWorkflowPath, ServiceRegistry serviceRegistry, org.mozilla.javascript.Scriptable scope)
          Creates a new instance of WorkflowPath from an instance of the WorkflowPath class provided by the CMR workflow model
 
Method Summary
 java.lang.String getId()
          Gets the value of the id property
 JscriptWorkflowInstance getInstance()
          Gets the value of the instance property
 WorkflowNode getNode()
          Gets the value of the node property
 org.mozilla.javascript.Scriptable getTasks()
          Get all tasks associated with this workflow path
 boolean isActive()
          Gets the value of the active property
 JscriptWorkflowPath signal(java.lang.String transitionId)
          Signal a transition to another node in the workflow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JscriptWorkflowPath

public JscriptWorkflowPath(java.lang.String id,
                           WorkflowNode node,
                           JscriptWorkflowInstance instance,
                           ServiceRegistry serviceRegistry,
                           org.mozilla.javascript.Scriptable scope)
Creates a new instance of a workflow path

Parameters:
id - workflow path ID
node - workflow node the path has reached
instance - instance to which the workflow path belongs
serviceRegistry - Service Registry object
scope - the root scripting scope for this object

JscriptWorkflowPath

public JscriptWorkflowPath(WorkflowPath cmrWorkflowPath,
                           ServiceRegistry serviceRegistry,
                           org.mozilla.javascript.Scriptable scope)
Creates a new instance of WorkflowPath from an instance of the WorkflowPath class provided by the CMR workflow model

Parameters:
cmrWorkflowPath - an instance of WorkflowPath from the CMR workflow object model
serviceRegistry - Service Registry object
scope - the root scripting scope for this object
Method Detail

getId

public java.lang.String getId()
Gets the value of the id property

Returns:
the id

isActive

public boolean isActive()
Gets the value of the active property

Returns:
the active

getNode

public WorkflowNode getNode()
Gets the value of the node property

Returns:
the node

getInstance

public JscriptWorkflowInstance getInstance()
Gets the value of the instance property

Returns:
the instance

getTasks

public org.mozilla.javascript.Scriptable getTasks()
Get all tasks associated with this workflow path

Returns:
all the tasks associated with this workflow path instance

signal

public JscriptWorkflowPath signal(java.lang.String transitionId)
Signal a transition to another node in the workflow

Parameters:
transitionId - ID of the transition to follow (or null, for the default transition)
Returns:
the updated workflow path


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