com.starteam
Class Workflow

java.lang.Object
  extended by com.starteam.Workflow

public final class Workflow
extends java.lang.Object

Workflow specifies a set of states (steps) and state transitions Workflow also specifies a set of rules Some rules are relevant in all states. others are relevant in a particular state Workflow is described in .xml files in the starflow extensions project


Nested Class Summary
static class Workflow.Step
          A Step represents a State in the Workflow State Machine Each step represents an EnmeratedValue from the legal set for the workflow definition's EnumeratedProperty
static class Workflow.WebCacheWorkflow
          A Workflow Accessor for the Web Cache Object Model
 
Method Summary
 boolean canUpdate(ViewMember artifact)
          Returns true if this artifact can be updated, in the context of this workflow, i.e.
static void fromStarFlowExtensions(View vw)
          Load the workflow from StarFlow Extensions Once loaded, the rules validate state transitions, provide appropriate initialization defaults when entering new states, etc.
 Workflow.Step getCurrentStep(ViewMember artifact)
          return the step that this artifact is in w.r.
 Workflow.Step getStartingStep()
          The first step in the workflow
 Workflow.Step[] getSteps()
          Returns the set of steps in the workflow
 ViewMember.Type getType()
          returns the Type in whose context this workflow definition executes
 java.lang.String getVersion()
          Returns the version of this workflow definition
 EnumeratedProperty getWorkflowProperty()
          Returns the property that is, by definition, the 'workflow property'
 boolean isDisabled()
          returns true if this workflow definition has been disabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromStarFlowExtensions

public static void fromStarFlowExtensions(View vw)
Load the workflow from StarFlow Extensions Once loaded, the rules validate state transitions, provide appropriate initialization defaults when entering new states, etc. Workflow is stored in StarFlow Extensions by default The schema is a folder called "projects" expected to be found in the root view of the project called "StarFlow Extensions" Project Specific Workflow may be located in sub-folders of "projects" identified by project name View specific workflow may be located in sub-folders of a specific project identified by view name The workflow is loaded for all types that it is available for for this view, it's parent project and the server If the xml is not well formed, or does not conform to the expected grammar, an SDK Runtime Exception will be thrown

Parameters:
vw - the view whose workflow will be loaded for all workflow aware types

getVersion

public java.lang.String getVersion()
Returns the version of this workflow definition

Returns:
the version of this workflow definition

isDisabled

public boolean isDisabled()
returns true if this workflow definition has been disabled

Returns:
true if this workflow definition has been disabled

getType

public ViewMember.Type getType()
returns the Type in whose context this workflow definition executes

Returns:
the Type in whose context this workflow definition executes

getWorkflowProperty

public EnumeratedProperty getWorkflowProperty()
Returns the property that is, by definition, the 'workflow property'

Returns:
the workflow property

getStartingStep

public Workflow.Step getStartingStep()
The first step in the workflow

Returns:
the first step in the workflow

getSteps

public Workflow.Step[] getSteps()
Returns the set of steps in the workflow

Returns:
the set of steps in the workflow

canUpdate

public boolean canUpdate(ViewMember artifact)
Returns true if this artifact can be updated, in the context of this workflow, i.e. there are no required properties left unpopulated with this item in it's current state

Parameters:
artifact - the ViewMember which is about to be updated to the StarTeam repository
Returns:
true if this artifact can be updated in the context of this workflow

getCurrentStep

public Workflow.Step getCurrentStep(ViewMember artifact)
return the step that this artifact is in w.r. t. its workflow

Parameters:
artifact - the view memebr to test
Returns:
the step that this artifact is in


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.