com.bigbross.bossa.wfnet
Class WorkItem

java.lang.Object
  extended bycom.bigbross.bossa.wfnet.WorkItem
All Implemented Interfaces:
Serializable

public class WorkItem
extends Object
implements Serializable

This class represents a transition of a specific case instance.

We use a somewhat non standard definition of a work item: instead of a fireable transition a work item is a likely fireable transition. All methods of this class account for this and it is possible to discover in advance if a work item is actually fireable without opening it.

Author:
BigBross Team
See Also:
Serialized Form

Method Summary
 boolean canBePerformedBy(Resource resource)
          Indicates if this work item can be open by the provided resource.
 Case getCase()
          Returns the case of this work item.
 CaseType getCaseType()
          Returns the case type of this work item.
 String getId()
          Returns the id of this work item.
 boolean isFireable()
          Indicates if this work item is fireable.
 Activity open(Resource resource)
          Opens this work item.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCaseType

public CaseType getCaseType()
Returns the case type of this work item.

Returns:
the case type of this work item.

getCase

public Case getCase()
Returns the case of this work item.

Returns:
the case of this work item.

getId

public String getId()
Returns the id of this work item. It is the same id of the transition this work item represents.

Returns:
the id of this work item.

isFireable

public boolean isFireable()
Indicates if this work item is fireable.

Returns:
true if the work item is fireable; false otherwise.

canBePerformedBy

public boolean canBePerformedBy(Resource resource)
Indicates if this work item can be open by the provided resource.

Parameters:
resource - the resource.
Returns:
true if the resource can open this work item; false otherwise.

open

public Activity open(Resource resource)
              throws BossaException
Opens this work item. A open work item is represented by an activity and is locked to the resource who opened it. The actual completion of the work item in handled by the created activity.

Parameters:
resource - the resource that is opening the work item.
Returns:
the activity created by the opening of this work item, null if the work item could not be opened.
Throws:
EvaluationException - if an expression evaluation error occurs. If this exception is thrown the state of the case may be left inconsistent.
PersistenceException - if an error occours when making the execution of this method persistent.
BossaException


Copyright © 2003,2004 OpenBR Sistemas S/C Ltda.