|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.bigbross.bossa.wfnet.CaseType
This class represents the definition of a process (case type). It also keeps track of all current cases of this case type.
| Constructor Summary | |
CaseType(String id)
Creates a new case type, without any places or transitions. |
|
| Method Summary | |
void |
buildTemplate(Map attributes)
Builds the template case that will spawn all other cases. |
List |
getActivities()
Returns the list of all activities of the cases of this case type. |
Case |
getCase(int id)
Returns a case by its id. |
List |
getCases()
Returns all cases of this case type. |
String |
getId()
Returns the id of this case type. |
Place |
getPlace(String id)
Returns the place of this case type that has the specified id. |
List |
getResources()
Returns all resource groups of this case type. |
Transition |
getTransition(String id)
Returns the transition of this case type that has the specified id. |
List |
getWorkItems()
Returns the list of all work items of the cases of this case type. |
List |
getWorkItems(boolean getInitial)
Returns the list of all work items of the cases of this case type. |
Case |
openCase()
Creates a new case using the state of the case type template. |
Case |
openCase(Map state)
Creates a new case using the provided state as the initial token count. |
Place |
registerPlace(String id)
Creates a place with the specified id and initial marking set to zero in this case type. |
Place |
registerPlace(String id,
int initialMarking)
Creates a place with the specified id and initial marking in this case type. |
Transition |
registerTransition(String id,
String resource)
Creates a transition with the specified id and resource expression, but with no timeout, in this case type. |
Transition |
registerTransition(String id,
String resource,
long timeout)
Creates a transition with the specified id, resource expression and timeout in this case type. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CaseType(String id)
id - the id of the new case type.| Method Detail |
public String getId()
public Place registerPlace(String id,
int initialMarking)
id - the place id.initialMarking - the initial marking, the number of tokens in
this place when a new case starts.
public Place registerPlace(String id)
id - the place id.
public Place getPlace(String id)
id - the place id.
null if there is no such a place.
public Transition registerTransition(String id,
String resource,
long timeout)
The resource expression defines which resources can perform work
items associated with this transition. If it is null or
an empty string, every resource can do it.
The timeout sets a number of milliseconds this transition will wait before it fires automatically. If the timeout is negative, the transition will never fire automatically. If it is zero, this transition will fire immediately.
NOTICE: As of this version of Bossa, the only timeout possible is zero or no timeout.
id - the transition id.resource - the expression to select the resource responsible by
this transition.timeout - the number of milliseconds this transition will wait
before it fires automatically.
Expression
public Transition registerTransition(String id,
String resource)
NOTICE: As of this version of Bossa, the only timeout possible is zero or no timeout.
id - the transition id.resource - the expression to select the resource responsible by
this transition.
Expressionpublic Transition getTransition(String id)
id - the transition id.
null if there is no such transition.public List getResources()
public Case openCase()
throws BossaException
This method bypasses the usual case opening process and should be used with caution to override the normal way a case is created.
SetAttributeException - if the underlying expression
evaluation system has problems setting an attribute.
BossaException
public Case openCase(Map state)
throws BossaException
null, the state of the case type
template is used instead. This method bypasses the usual case opening process and should be used with caution to override the normal way a case is created.
state - the initial token count as a map (String,
Integer), indexed by the place id.
This state map must have a token count for every place.
SetAttributeException - if the underlying expression
evaluation system has problems setting an attribute.
BossaException
public void buildTemplate(Map attributes)
throws BossaException
attributes - the attributes of the template case.
SetAttributeException - if the underlying expression
evaluation system has problems setting an attribute.
EvaluationException - if an expression evaluation error
occurs.
BossaExceptionpublic Case getCase(int id)
id - the case id.
null if
this case does not exist.public List getCases()
public List getWorkItems()
public List getWorkItems(boolean getInitial)
getInitial - set to true to get the initial work
items and to false to only get the
standard work items.
public List getActivities()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||