com.bigbross.bossa.wfnet
Class Activity

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

public class Activity
extends Object
implements Serializable

This class represents an open (firing) work item.

Author:
BigBross Team
See Also:
Serialized Form

Method Summary
 boolean cancel()
          Cancel this activity.
 boolean close()
          Closes and finishes this activity.
 boolean close(Map attributes)
          Closes and finishes an activity.
 Case getCase()
          Returns the case of this activity.
 CaseType getCaseType()
          Returns the case type of this activity.
 int getId()
          Returns the id of this activity.
 Resource getResource()
          Returns the resource responsible by this activity.
 String getWorkItemId()
          Returns the id of the work item that created this activity.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public int getId()
Returns the id of this activity.

Returns:
the id of this activity.

getResource

public Resource getResource()
Returns the resource responsible by this activity.

Returns:
the resource id.

getWorkItemId

public String getWorkItemId()
Returns the id of the work item that created this activity.

Returns:
the id of the work item that created this activity.

getCaseType

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

Returns:
The case type of this activity.

getCase

public Case getCase()
Returns the case of this activity.

Returns:
The case of this activity.

close

public boolean close()
              throws BossaException
Closes and finishes this activity. Call this method when the activity is successfully completed.

Returns:
true if the activity is succesfully opened, false otherwise.
Throws:
SetAttributeException - if the underlying expression evaluation system has problems setting an attribute.
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

close

public boolean close(Map attributes)
              throws BossaException
Closes and finishes an activity. Call this method when the activity is successfully completed.

An attribute mapping should be passed when this method is called. This is a (String, Object) mapping of variables names (as used in edge weight expressions) and Java objects. The Java objects should be understandable by the underlying BSF engine being used (for JavaScript, Boolean, Integer and String are known to work). The attributes provided will overwrite current set attributes and the value of these attributes will be used when evaluating edge weights.

Parameters:
attributes - the attributes mapping.
Returns:
true if the activity is succesfully opened, false otherwise.
Throws:
SetAttributeException - if the underlying expression evaluation system has problems setting an attribute.
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

cancel

public boolean cancel()
               throws BossaException
Cancel this activity. Call this method if the activity could not be completed. The related work item will return to the list of available work items and can be opened again.

Returns:
true if the activity is succesfully canceled, false otherwise.
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.