org.jwarp.flow.model
Class WorkflowSystem

java.lang.Object
  |
  +--org.jwarp.flow.model.WorkflowSystem
All Implemented Interfaces:
IConfigurable, IWorkflowSystem

public class WorkflowSystem
extends java.lang.Object
implements IWorkflowSystem

Implementatino class for a workflow system service. This is also the service to be initialized by the JWeb service factory.


Field Summary
protected  IRoleManager allRoules
          The role manager
protected  ITransitionManager allTransitions
          The transition manager
protected  java.util.Date creationDate
           
protected  int generation
           
protected  java.util.LinkedList models
          The models of the system.
 
Constructor Summary
WorkflowSystem()
           
 
Method Summary
 void addModel(IWorkflowModel model)
          Add a model.
 void configure(org.jdom.Element config)
          Pass the Configuration to the Configurable class.
 java.util.Date getCreationDate()
          Return the creation date (start of this generation).
 IFormManager getFormManager()
          Get the form factory.
 int getGeneration()
          Return the generation counter (starting at 1).
 java.util.Iterator getModels()
          Get the models.
 IParticipantManager getParticipants()
          Get the participant subservice.
 IRoleManager getRoles()
          Get the role subservice.
 IScreenManager getScreenManager()
          Get the screen factory.
 IScreenManager getScreens()
          Get the screen instances subservice.
 ITransitionManager getTransitionManager()
          Get the transition instances subservice.
 void removeModel(IWorkflowModel model)
          Remove a model.
 void startWorkflow(java.lang.String id, Parameter[] params)
          Start a workflow with the given parameters
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allTransitions

protected ITransitionManager allTransitions
The transition manager

allRoules

protected IRoleManager allRoules
The role manager

models

protected java.util.LinkedList models
The models of the system.

creationDate

protected java.util.Date creationDate

generation

protected int generation
Constructor Detail

WorkflowSystem

public WorkflowSystem()
Method Detail

configure

public void configure(org.jdom.Element config)
Description copied from interface: IConfigurable
Pass the Configuration to the Configurable class. This method must always be called after the constructor and before any other method.
Specified by:
configure in interface IConfigurable
Following copied from interface: org.jwarp.service.configuration.IConfigurable
Parameters:
configuration - the class configurations.

getCreationDate

public java.util.Date getCreationDate()
Description copied from interface: IWorkflowSystem
Return the creation date (start of this generation).
Specified by:
getCreationDate in interface IWorkflowSystem
Following copied from interface: org.jwarp.flow.model.IWorkflowSystem
Returns:
The creation date

getGeneration

public int getGeneration()
Description copied from interface: IWorkflowSystem
Return the generation counter (starting at 1).
Specified by:
getGeneration in interface IWorkflowSystem
Following copied from interface: org.jwarp.flow.model.IWorkflowSystem
Returns:
The generation

getParticipants

public IParticipantManager getParticipants()
Get the participant subservice.
Specified by:
getParticipants in interface IWorkflowSystem
Returns:
The participant subservice

getRoles

public IRoleManager getRoles()
Get the role subservice.
Specified by:
getRoles in interface IWorkflowSystem
Returns:
The role subservice

getTransitionManager

public ITransitionManager getTransitionManager()
Get the transition instances subservice.
Specified by:
getTransitionManager in interface IWorkflowSystem
Returns:
The transition instances subservice

getScreenManager

public IScreenManager getScreenManager()
Get the screen factory.
Specified by:
getScreenManager in interface IWorkflowSystem
Returns:
The screen factory service

getScreens

public IScreenManager getScreens()
Get the screen instances subservice.
Returns:
The screen instances subservice

getFormManager

public IFormManager getFormManager()
Get the form factory.
Specified by:
getFormManager in interface IWorkflowSystem
Returns:
The form factory service

getModels

public java.util.Iterator getModels()
Get the models.
Specified by:
getModels in interface IWorkflowSystem
Returns:
The models

addModel

public void addModel(IWorkflowModel model)
Add a model.
Specified by:
addModel in interface IWorkflowSystem
Parameters:
The - model

removeModel

public void removeModel(IWorkflowModel model)
Remove a model.
Specified by:
removeModel in interface IWorkflowSystem
Parameters:
The - model

startWorkflow

public void startWorkflow(java.lang.String id,
                          Parameter[] params)
                   throws NotFoundException,
                          InitializationException,
                          TransitionInitException,
                          ParameterException,
                          ParameterNotFoundException
Start a workflow with the given parameters
Specified by:
startWorkflow in interface IWorkflowSystem
Parameters:
The - id string of the workflow (Form: ModelName.FlowName)
The - parameters for initializing the first transition
Throws:
NotFoundException - If the workflow requested could not be located
InitException - If the initialization of the workflow failed basically
TransitionInitException - If the first transition could not be initialised, that means if parameters are invalid or missing
ParameterException - If the first transition validation failed, that means if parameters are invalid
ParameterNotFoundException - If the first transition validation failed, that means if parameters are missing

©   O R C A   S y s t e m s