hero.session
Class UserSessionBean

java.lang.Object
  extended byhero.session.UserSessionBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, hero.util.EventConstants, java.io.Serializable, javax.ejb.SessionBean

public class UserSessionBean
extends java.lang.Object
implements javax.ejb.SessionBean, hero.util.EventConstants

The User Session Bean, is an stateless session bean that provides the user API to get information on Todo list and started activities and to produce events on activities (start, terminate, cancel).
This Session Bean is based on Engine Session Bean: a recursive implementation that manage the previous execution operations and propagates the activity state changes to the activities that are connected to this one.

The User Session Bean API provides information about user projects and activites (project list, todo list and activity list) and also useful information about project instances or user preferences. With this API users can performs his task/activities by using start, terminate and cancel methods and also terminates workflow processes.

The following lines shows a sample code to use this API in your application:


First of all you have to import the User Session files:

import hero.interfaces.UserSessionLocalHome;
import hero.interfaces.UserSessionLocal;
import hero.interfaces.UserSessionHome;
import hero.interfaces.UserSession;
import hero.interfaces.UserSessionUtil;

Now, it is time to create the User Session instance:

Like this if you want to use local interfaces:

UserSessionLocalHome userh = (UserSessionLocalHome)hero.interfaces.UserSessionUtil.getLocalHome();
UserSessionLocal usersession = userh.create();

or like this if you use remote interfaces:

UserSessionHome userh = (UserSessionHome)hero.interfaces.UserSessionUtil.getHome();
UserSession usersession = userh.create();


Now you can call all User Sessions methods...

Author:
Miguel Valdes
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface hero.util.EventConstants
ADDEDGE, ADDITERATION, ADDNODE, ADDROLE, ADDUSERPROJECT, ANTICIPATING, CANCELED, CHANGEROLE, DELETEEDGE, DELETENODE, DELETEPROJECT, EDGE, EDGENAME, EVENT, FROM, ITERATION, LOG, NODE, NODEDEADLINE, NODEDEADLINES, NODEIN, NODENAME, NODEOUT, NODESTATE, NODETYPE, PROJECT, PROJECTNAME, READYINITIAL, ROLE, ROLENAME, SETEDGESTATE, SETNODEDEADLINE, SETNODEDEADLINES, SETNODEEXECUTOR, SETNODESTATE, SETUSERROLE, START, TERMINATED, TO, UNSETUSERROLE, USER, USERNAME, USERROLE
 
Constructor Summary
UserSessionBean()
           
 
Method Summary
 void cancelActivity(java.lang.String projectName, java.lang.String nodeName)
          Tries to cancel an activity (when activity is executing or anticipating)
 void deleteUserProperty(java.lang.String key)
          Delete a property of a user
 void ejbActivate()
          Internal Enterprise Java Beans method.
 void ejbCreate()
          Creates the User Session Bean.
 void ejbPassivate()
          Internal Enterprise Java Beans method.
 void ejbRemove()
          Internal Enterprise Java Beans method.
 java.util.Collection getActivityList(java.lang.String projectName)
          Obtain all user activities from specific project (executing and anticipating state)
 java.util.Collection getActivityListAllInstances()
          Obtain executing user activities for all instances/cooperative projects (executing and anticipating state)
 java.util.Collection getActivityListAllInstancesAsPK()
          Obtain executing user activities for all instances/cooperative projects (executing and anticipating state)
 java.util.Collection getActivityListAllInstancesByPK(java.util.Collection list, int offset, int numrows)
          Obtain executing user activities for all instances/cooperative projects (executing and anticipating state)
 java.util.Collection getActivityListAsPK(java.lang.String projectName)
          Obtain all user activities from specific project (executing and anticipating state)
 java.util.Collection getActivityListByPK(java.lang.String projectName, java.util.Collection list, int offset, int numrows)
          Obtain all user activities from specific project (executing and anticipating state)
 java.util.Collection getActivityListByProperty(java.lang.String key, java.lang.String value)
          Obtain executing user activities matching with property value (executing and anticipating state activities)
 java.util.Collection getActivityListByPropertyAsPK(java.lang.String key, java.lang.String value)
          Obtain executing user activities matching with property value (executing and anticipating state activities)
 java.util.Collection getActivityListByPropertyByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Obtain executing user activities matching with property value (executing and anticipating state activities)
 java.util.Collection getCooperativeList()
          Get user cooperative projects list.
 java.util.Collection getCooperativeList(int offset, int numrows)
          Get user cooperative projects list.
 java.util.Collection getInstanceNodes(java.lang.String instanceName, java.lang.String userName)
          Get ready and executing activities for a user instance
 java.util.Collection getInstancesActivityTerminated(java.lang.String projectName, java.lang.String nodeName)
          Get activities model instances terminated by this user
 java.util.Collection getInstancesActivityTerminatedAsPK(java.lang.String projectName, java.lang.String nodeName)
          Get subset of activities model instances terminated by this user
 java.util.Collection getInstancesActivityTerminatedByPK(java.lang.String projectName, java.lang.String nodeName, java.util.Collection list, int offset, int numrows)
          Get subset of activities model instances terminated by this user
 java.util.Collection getInstancesActivityTodoList(java.lang.String projectName, java.lang.String nodeName)
          Get activities model instances assigned to this user
 java.util.Collection getInstancesActivityTodoListAsPK(java.lang.String projectName, java.lang.String nodeName)
          Get subset of activities model instances assigned to this user
 java.util.Collection getInstancesActivityTodoListByPK(java.lang.String projectName, java.lang.String nodeName, java.util.Collection list, int offset, int numrows)
          Get subset of activities model instances assigned to this user
 java.util.Collection getInstancesByProperty(java.lang.String key, java.lang.String value)
          Get Workflow instances from a property
 java.util.Collection getInstancesByPropertyAsPK(java.lang.String key, java.lang.String value)
          Get Workflow instances from a property
 java.util.Collection getInstancesByPropertyByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Get Workflow instances from a property
 java.util.Collection getInstancesByPropertyNames(java.lang.String key, java.lang.String value)
          Get Workflow instances from a property
 java.util.Collection getInstancesByPropertyNamesAsPK(java.lang.String key, java.lang.String value)
          Get Workflow instances from a property
 java.util.Collection getInstancesByPropertyNamesByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Get Workflow instances from a property
 java.util.Collection getInstancesList()
          Get user instances list.
 java.util.Collection getInstancesList(int offset, int numrows)
          Get user instances list.
 java.util.Collection getInstancesListNames()
          Get instances list names for this user.
 java.util.Collection getInstancesListNames(int offset, int numrows)
          Get instances list names for this user.
 int getListCount(java.lang.String projectName, java.lang.String nodeName, java.lang.String type)
          Obtain a count of the various user entities.
 java.util.Collection getModelInstancesTerminated(java.lang.String projectName)
          Get activities names of the model instances terminated by this user
 java.util.Collection getModelInstancesTerminated(java.lang.String projectName, int offset, int numrows)
          Get activities names of the model instances terminated by this user
 java.util.Collection getModelInstancesTodoList(java.lang.String projectName)
          Get activities names of the model instances assigned to this user
 java.util.Collection getModelInstancesTodoList(java.lang.String projectName, int offset, int numrows)
          Get activities names of the model instances assigned to this user
 java.util.Collection getModelList()
          Get user model list.
 java.util.Collection getModelList(int offset, int numrows)
           
 java.util.Collection getModels()
          Get available workflow models.
 java.util.Collection getModelsAsPK()
          Get available workflow models.
 java.util.Collection getModelsByPK(java.util.Collection list, int offset, int numrows)
          Get available workflow models.
 java.util.Collection getModelsLight()
          Get available workflow models.
 java.util.Collection getModelsLightAsPK()
          Get available workflow models.
 java.util.Collection getModelsLightByPK(java.util.Collection list, int offset, int numrows)
          Get available workflow models.
 BnNodeValue getNode(java.lang.String projectName, java.lang.String nodeName)
          Get Node Value from a specific project
 java.util.Collection getProjectInstances(java.lang.String projectName)
          Get Workflow instances of this project
 java.util.Collection getProjectInstancesAsPK(java.lang.String projectName)
          Get Workflow instances of this project
 java.util.Collection getProjectInstancesByPK(java.lang.String projectName, java.util.Collection list, int offset, int numrows)
          Get Workflow instances of this project
 java.util.Collection getProjectInstancesNames(java.lang.String projectName)
          Get workflow instances names of this project
 java.util.Collection getProjectInstancesNamesAsPK(java.lang.String projectName)
          Get workflow instances names of this project
 java.util.Collection getProjectInstancesNamesByPK(java.lang.String projectName, java.util.Collection list, int offset, int numrows)
          Get workflow instances names of this project
 java.util.Collection getProjectList()
          Get user project list.
 java.util.Collection getProjectListNames()
          Get project list names for this user (models/cooperative/instances)
 java.util.Collection getProjectsByProperty(java.lang.String key, java.lang.String value)
          Get Workflow projects from a property
 java.util.Collection getProjectsByPropertyAsPK(java.lang.String key, java.lang.String value)
          Get Workflow projects from a property
 java.util.Collection getProjectsByPropertyByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Get Workflow projects from a property
 java.util.Collection getProjectsByPropertyNames(java.lang.String key, java.lang.String value)
          Get Workflow projects from a property
 java.util.Collection getProjectsByPropertyNamesAsPK(java.lang.String key, java.lang.String value)
          Get Workflow projects from a property
 java.util.Collection getProjectsByPropertyNamesByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Get Workflow projects from a property
 java.util.Collection getTerminatedListAllInstances()
          Obtain terminated user activities for all instances/cooperative projects.
 java.util.Collection getTerminatedListAllInstancesAsPK()
          Obtain a subset of the terminated user activities for all instances/cooperative projects.
 java.util.Collection getTerminatedListAllInstancesByPK(java.util.Collection list, int offset, int numrows)
          Obtain a subset of the terminated user activities for all instances/cooperative projects.
 java.util.Collection getToDoList(java.lang.String projectName)
          Obtain all user activities from specific project (ready and anticipable state)
 java.util.Collection getToDoListAllInstances()
          Obtain todo user activities for all instances/cooperative projects (ready and anticipable state)
 java.util.Collection getToDoListAllInstancesAsPK()
          Obtain todo user activities for all instances/cooperative projects (ready and anticipable state)
 java.util.Collection getToDoListAllInstancesByPK(java.util.Collection list, int offset, int numrows)
          Obtain todo user activities for all instances/cooperative projects (ready and anticipable state)
 java.util.Collection getToDoListAsPK(java.lang.String projectName)
          Obtain all user activities from specific project (ready and anticipable state)
 java.util.Collection getToDoListByActivityProperty(java.lang.String key, java.lang.String value)
          Obtain todo user activities matching with activity property value (ready and anticipable state activities)
 java.util.Collection getToDoListByActivityPropertyAsPK(java.lang.String key, java.lang.String value)
          Obtain todo user activities matching with activity property value (ready and anticipable state activities)
 java.util.Collection getToDoListByActivityPropertyByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Obtain todo user activities matching with activity property value (ready and anticipable state activities)
 java.util.Collection getToDoListByPK(java.lang.String projectName, java.util.Collection list, int offset, int numrows)
          Obtain all user activities from specific project (ready and anticipable state)
 java.util.Collection getToDoListByProperties(int operation, java.util.Hashtable properties)
          Obtain todo user activities matching with project properties (ready and anticipable state activities)
 java.util.Collection getToDoListByPropertiesAsPK(int operation, java.util.Hashtable properties)
          Obtain todo user activities matching with project properties (ready and anticipable state activities)
 java.util.Collection getToDoListByPropertiesByPK(int operation, java.util.Hashtable properties, java.util.Collection list, int offset, int numrows)
          Obtain todo user activities matching with project properties (ready and anticipable state activities)
 java.util.Collection getToDoListByProperty(java.lang.String key, java.lang.String value)
          Obtain todo user activities matching with project property value (ready and anticipable state activities)
 java.util.Collection getToDoListByPropertyAsPK(java.lang.String key, java.lang.String value)
          Obtain todo user activities matching with project property value (ready and anticipable state activities)
 java.util.Collection getToDoListByPropertyByPK(java.lang.String key, java.lang.String value, java.util.Collection list, int offset, int numrows)
          Obtain todo user activities matching with project property value (ready and anticipable state activities)
 java.lang.String getUser()
          Get the user name
 java.util.Collection getUserInstancesProject()
          Get models names which have ongoing instances for this user
 java.util.Collection getUserInstancesProject(int offset, int numrows)
          Get models names which have ongoing instances for this user
 java.util.Collection getUserInstancesProjectNodes(java.lang.String projectName)
          Get ready, anticipable and executing activities for current user instances
 java.util.Collection getUserInstancesProjectNodesAsPK(java.lang.String projectName)
          Get a subset of the ready, anticipable and executing activities for current user instances
 java.util.Collection getUserInstancesProjectNodesByPK(java.lang.String projectName, java.util.Collection list, int offset, int numrows)
          Get a subset of the ready, anticipable and executing activities for current user instances
 java.lang.String getUserJabber()
          Get the user jabber address
 BnUserLightValue getUserLightValue()
          Get the user light value
 java.lang.String getUserMail(java.lang.String userName)
          Get the mail of this user from Bonita database.
 java.lang.String getUserPassword()
          Get the user password
 java.util.Collection getUserProperties()
          Get User properties
 void removeProject(java.lang.String projectName)
          Delete a Workflow project
 void setSessionContext(javax.ejb.SessionContext context)
          Internal Enterprise Java Beans method.
 void setUserMail(java.lang.String userName, java.lang.String mail)
          Set the mail of this user into Bonita database.
 void setUserProperty(java.lang.String key, java.lang.String value)
          Set a property of a user
 void startActivity(java.lang.String projectName, java.lang.String nodeName)
          Tries to start an activity (when activity state is ready or anticipable)
 void terminate(java.lang.String projectName)
          Tries to terminate a project (only when all project activities are terminated)
 void terminateActivity(java.lang.String projectName, java.lang.String nodeName)
          Tries to terminate an activity (when activity state is executing or anticipating)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserSessionBean

public UserSessionBean()
Method Detail

getProjectList

public java.util.Collection getProjectList()
                                    throws hero.util.HeroException
Get user project list. Workflow processes associated to this user (models/cooperative/instances)

Returns:
a Collection of BnProjectLightValue objects - the projects list of the user
Throws:
hero.util.HeroException

getProjectListNames

public java.util.Collection getProjectListNames()
                                         throws hero.util.HeroException
Get project list names for this user (models/cooperative/instances)

Returns:
a String Collection - the projects list names of the user
Throws:
hero.util.HeroException

getInstancesList

public java.util.Collection getInstancesList()
                                      throws hero.util.HeroException
Get user instances list. This method is equivalent to getProjectList but it only returns the current instances of the user.

Returns:
a Collection of BnProjectLightValue objects - the projects list of the user
Throws:
hero.util.HeroException

getInstancesList

public java.util.Collection getInstancesList(int offset,
                                             int numrows)
                                      throws hero.util.HeroException
Get user instances list. This method is equivalent to getProjectList but it only returns the current instances of the user.

Returns:
a Collection of BnProjectLightValue objects - the projects list of the user
Throws:
hero.util.HeroException

getModelList

public java.util.Collection getModelList()
                                  throws hero.util.HeroException
Get user model list. This method is equivalent to getProjectList but it only returns the current models of the user.

Returns:
a Collection of BnProjectLightValue objects - the model list of the user
Throws:
hero.util.HeroException

getModelList

public java.util.Collection getModelList(int offset,
                                         int numrows)
                                  throws hero.util.HeroException
Throws:
hero.util.HeroException

getModels

public java.util.Collection getModels()
                               throws hero.util.HeroException
Get available workflow models. This method will be improved with users restrictions

Returns:
a Collection of BnProjectLightValue objects - the model list to be instantiated
Throws:
hero.util.HeroException

getModelsLight

public java.util.Collection getModelsLight()
                                    throws hero.util.HeroException
Get available workflow models. This method is like getModels() except that no initiatorMapper check is performed.

Returns:
a Collection of BnProjectLightValue objects - the model list
Throws:
hero.util.HeroException

getModelsAsPK

public java.util.Collection getModelsAsPK()
                                   throws hero.util.HeroException
Get available workflow models. This method will be improved with users restrictions

Returns:
a Collection of BnProjectLightValue objects - the model list to be instantiated
Throws:
hero.util.HeroException

getModelsByPK

public java.util.Collection getModelsByPK(java.util.Collection list,
                                          int offset,
                                          int numrows)
                                   throws hero.util.HeroException
Get available workflow models. This method will be improved with users restrictions

Returns:
a Collection of BnProjectLightValue objects - the model list to be instantiated
Throws:
hero.util.HeroException

getModelsLightAsPK

public java.util.Collection getModelsLightAsPK()
                                        throws hero.util.HeroException
Get available workflow models. This method is like getModels() except that no initiatorMapper check is performed.

Returns:
a Collection of BnProjectLightValue objects - the model list
Throws:
hero.util.HeroException

getModelsLightByPK

public java.util.Collection getModelsLightByPK(java.util.Collection list,
                                               int offset,
                                               int numrows)
                                        throws hero.util.HeroException
Get available workflow models. This method is like getModels() except that no initiatorMapper check is performed.

Returns:
a Collection of BnProjectLightValue objects - the model list
Throws:
hero.util.HeroException

getCooperativeList

public java.util.Collection getCooperativeList()
                                        throws hero.util.HeroException
Get user cooperative projects list. This method is equivalent to getProjectList but it only returns the current cooperative projects of the user.

Returns:
a Collection of BnProjectLightValue objects - the cooperative projects list of the user
Throws:
hero.util.HeroException

getCooperativeList

public java.util.Collection getCooperativeList(int offset,
                                               int numrows)
                                        throws hero.util.HeroException
Get user cooperative projects list. This method is equivalent to getProjectList but it only returns the current cooperative projects of the user.

Returns:
a Collection of BnProjectLightValue objects - the cooperative projects list of the user
Throws:
hero.util.HeroException

getInstancesListNames

public java.util.Collection getInstancesListNames()
                                           throws hero.util.HeroException
Get instances list names for this user. This method is equivalent to getProjectListNames but it only returns the current instances of the user.

Returns:
a String Collection - the projects list names of the user
Throws:
hero.util.HeroException

getInstancesListNames

public java.util.Collection getInstancesListNames(int offset,
                                                  int numrows)
                                           throws hero.util.HeroException
Get instances list names for this user. This method is equivalent to getProjectListNames but it only returns the current instances of the user.

Returns:
a String Collection - the projects list names of the user
Throws:
hero.util.HeroException

removeProject

public void removeProject(java.lang.String projectName)
                   throws hero.util.HeroException
Delete a Workflow project

Parameters:
projectName - the name of the project
Throws:
hero.util.HeroException

getToDoList

public java.util.Collection getToDoList(java.lang.String projectName)
                                 throws hero.util.HeroException
Obtain all user activities from specific project (ready and anticipable state)

Parameters:
projectName - the name of the project
Returns:
a String Collection - the list of todo activities of the user for a project
Throws:
hero.util.HeroException

getToDoListAsPK

public java.util.Collection getToDoListAsPK(java.lang.String projectName)
                                     throws hero.util.HeroException
Obtain all user activities from specific project (ready and anticipable state)

Parameters:
projectName - the name of the project
Returns:
a String Collection - the list of todo activities of the user for a project
Throws:
hero.util.HeroException

getToDoListByPK

public java.util.Collection getToDoListByPK(java.lang.String projectName,
                                            java.util.Collection list,
                                            int offset,
                                            int numrows)
                                     throws hero.util.HeroException
Obtain all user activities from specific project (ready and anticipable state)

Parameters:
projectName - the name of the project
Returns:
a String Collection - the list of todo activities of the user for a project
Throws:
hero.util.HeroException

getActivityList

public java.util.Collection getActivityList(java.lang.String projectName)
                                     throws hero.util.HeroException
Obtain all user activities from specific project (executing and anticipating state)

Parameters:
projectName - the name of the project
Returns:
a String Collectio - the list of active activities of the user for a project
Throws:
hero.util.HeroException

getActivityListAsPK

public java.util.Collection getActivityListAsPK(java.lang.String projectName)
                                         throws hero.util.HeroException
Obtain all user activities from specific project (executing and anticipating state)

Parameters:
projectName - the name of the project
Returns:
a String Collectio - the list of active activities of the user for a project
Throws:
hero.util.HeroException

getActivityListByPK

public java.util.Collection getActivityListByPK(java.lang.String projectName,
                                                java.util.Collection list,
                                                int offset,
                                                int numrows)
                                         throws hero.util.HeroException
Obtain all user activities from specific project (executing and anticipating state)

Parameters:
projectName - the name of the project
Returns:
a String Collectio - the list of active activities of the user for a project
Throws:
hero.util.HeroException

getToDoListAllInstances

public java.util.Collection getToDoListAllInstances()
                                             throws hero.util.HeroException
Obtain todo user activities for all instances/cooperative projects (ready and anticipable state)

Returns:
a BnNodeValue Collection - the list of todo activities of the user for all instances
Throws:
hero.util.HeroException

getToDoListAllInstancesAsPK

public java.util.Collection getToDoListAllInstancesAsPK()
                                                 throws hero.util.HeroException
Obtain todo user activities for all instances/cooperative projects (ready and anticipable state)

Returns:
a BnNodeValue Collection - the list of todo activities of the user for all instances
Throws:
hero.util.HeroException

getToDoListAllInstancesByPK

public java.util.Collection getToDoListAllInstancesByPK(java.util.Collection list,
                                                        int offset,
                                                        int numrows)
                                                 throws hero.util.HeroException
Obtain todo user activities for all instances/cooperative projects (ready and anticipable state)

Returns:
a BnNodeValue Collection - the list of todo activities of the user for all instances
Throws:
hero.util.HeroException

getActivityListAllInstances

public java.util.Collection getActivityListAllInstances()
                                                 throws hero.util.HeroException
Obtain executing user activities for all instances/cooperative projects (executing and anticipating state)

Returns:
a BnNodeValue Collection - the list of executing activities ot the user for all instances
Throws:
hero.util.HeroException

getActivityListAllInstancesAsPK

public java.util.Collection getActivityListAllInstancesAsPK()
                                                     throws hero.util.HeroException
Obtain executing user activities for all instances/cooperative projects (executing and anticipating state)

Returns:
a BnNodeValue Collection - the list of executing activities ot the user for all instances
Throws:
hero.util.HeroException

getActivityListAllInstancesByPK

public java.util.Collection getActivityListAllInstancesByPK(java.util.Collection list,
                                                            int offset,
                                                            int numrows)
                                                     throws hero.util.HeroException
Obtain executing user activities for all instances/cooperative projects (executing and anticipating state)

Returns:
a BnNodeValue Collection - the list of executing activities ot the user for all instances
Throws:
hero.util.HeroException

getTerminatedListAllInstances

public java.util.Collection getTerminatedListAllInstances()
                                                   throws hero.util.HeroException
Obtain terminated user activities for all instances/cooperative projects.

Returns:
a BnNodeValue Collection - the list of terminated activities ot the user for all instances
Throws:
hero.util.HeroException

getListCount

public int getListCount(java.lang.String projectName,
                        java.lang.String nodeName,
                        java.lang.String type)
                 throws hero.util.HeroException
Obtain a count of the various user entities.

Returns:
an integer count
Throws:
hero.util.HeroException

getTerminatedListAllInstancesAsPK

public java.util.Collection getTerminatedListAllInstancesAsPK()
                                                       throws hero.util.HeroException
Obtain a subset of the terminated user activities for all instances/cooperative projects.

Returns:
a BnNodeValue Collection - the list of terminated activities ot the user for all instances
Throws:
hero.util.HeroException

getTerminatedListAllInstancesByPK

public java.util.Collection getTerminatedListAllInstancesByPK(java.util.Collection list,
                                                              int offset,
                                                              int numrows)
                                                       throws hero.util.HeroException
Obtain a subset of the terminated user activities for all instances/cooperative projects.

Returns:
a BnNodeValue Collection - the list of terminated activities ot the user for all instances
Throws:
hero.util.HeroException

getToDoListByProperty

public java.util.Collection getToDoListByProperty(java.lang.String key,
                                                  java.lang.String value)
                                           throws hero.util.HeroException
Obtain todo user activities matching with project property value (ready and anticipable state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of todo activities matching to project property value
Throws:
hero.util.HeroException

getToDoListByPropertyAsPK

public java.util.Collection getToDoListByPropertyAsPK(java.lang.String key,
                                                      java.lang.String value)
                                               throws hero.util.HeroException
Obtain todo user activities matching with project property value (ready and anticipable state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of todo activities matching to project property value
Throws:
hero.util.HeroException

getToDoListByPropertyByPK

public java.util.Collection getToDoListByPropertyByPK(java.lang.String key,
                                                      java.lang.String value,
                                                      java.util.Collection list,
                                                      int offset,
                                                      int numrows)
                                               throws hero.util.HeroException
Obtain todo user activities matching with project property value (ready and anticipable state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of todo activities matching to project property value
Throws:
hero.util.HeroException

getToDoListByProperties

public java.util.Collection getToDoListByProperties(int operation,
                                                    java.util.Hashtable properties)
                                             throws hero.util.HeroException
Obtain todo user activities matching with project properties (ready and anticipable state activities)

Parameters:
operation - AND/OR operations are allowed.
properties - Hashtable containing the key/value elements
Returns:
a BnNodeValue Collection - the list of todo activities matching to property value. This method is oriented to administrative workflow (workflow instances) and supports one, two or three properties (key/value pairs). Operation constants values: hero.interfaces.Constants.AND, hero.interfaces.Constants.OR
Throws:
hero.util.HeroException

getToDoListByPropertiesAsPK

public java.util.Collection getToDoListByPropertiesAsPK(int operation,
                                                        java.util.Hashtable properties)
                                                 throws hero.util.HeroException
Obtain todo user activities matching with project properties (ready and anticipable state activities)

Parameters:
operation - AND/OR operations are allowed.
properties - Hashtable containing the key/value elements
Returns:
a BnNodeValue Collection - the list of todo activities matching to property value. This method is oriented to administrative workflow (workflow instances) and supports one, two or three properties (key/value pairs). Operation constants values: hero.interfaces.Constants.AND, hero.interfaces.Constants.OR
Throws:
hero.util.HeroException

getToDoListByPropertiesByPK

public java.util.Collection getToDoListByPropertiesByPK(int operation,
                                                        java.util.Hashtable properties,
                                                        java.util.Collection list,
                                                        int offset,
                                                        int numrows)
                                                 throws hero.util.HeroException
Obtain todo user activities matching with project properties (ready and anticipable state activities)

Parameters:
operation - AND/OR operations are allowed.
properties - Hashtable containing the key/value elements
Returns:
a BnNodeValue Collection - the list of todo activities matching to property value. This method is oriented to administrative workflow (workflow instances) and supports one, two or three properties (key/value pairs). Operation constants values: hero.interfaces.Constants.AND, hero.interfaces.Constants.OR
Throws:
hero.util.HeroException

getToDoListByActivityProperty

public java.util.Collection getToDoListByActivityProperty(java.lang.String key,
                                                          java.lang.String value)
                                                   throws hero.util.HeroException
Obtain todo user activities matching with activity property value (ready and anticipable state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of todo activities matching to activity property value
Throws:
hero.util.HeroException

getToDoListByActivityPropertyAsPK

public java.util.Collection getToDoListByActivityPropertyAsPK(java.lang.String key,
                                                              java.lang.String value)
                                                       throws hero.util.HeroException
Obtain todo user activities matching with activity property value (ready and anticipable state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of todo activities matching to activity property value
Throws:
hero.util.HeroException

getToDoListByActivityPropertyByPK

public java.util.Collection getToDoListByActivityPropertyByPK(java.lang.String key,
                                                              java.lang.String value,
                                                              java.util.Collection list,
                                                              int offset,
                                                              int numrows)
                                                       throws hero.util.HeroException
Obtain todo user activities matching with activity property value (ready and anticipable state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of todo activities matching to activity property value
Throws:
hero.util.HeroException

getActivityListByProperty

public java.util.Collection getActivityListByProperty(java.lang.String key,
                                                      java.lang.String value)
                                               throws hero.util.HeroException
Obtain executing user activities matching with property value (executing and anticipating state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of executing activities matching to property value
Throws:
hero.util.HeroException

getActivityListByPropertyAsPK

public java.util.Collection getActivityListByPropertyAsPK(java.lang.String key,
                                                          java.lang.String value)
                                                   throws hero.util.HeroException
Obtain executing user activities matching with property value (executing and anticipating state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of executing activities matching to property value
Throws:
hero.util.HeroException

getActivityListByPropertyByPK

public java.util.Collection getActivityListByPropertyByPK(java.lang.String key,
                                                          java.lang.String value,
                                                          java.util.Collection list,
                                                          int offset,
                                                          int numrows)
                                                   throws hero.util.HeroException
Obtain executing user activities matching with property value (executing and anticipating state activities)

Parameters:
key - the key of the property
value - the value of the property
Returns:
a BnNodeValue Collection - the list of executing activities matching to property value
Throws:
hero.util.HeroException

getProjectInstancesNames

public java.util.Collection getProjectInstancesNames(java.lang.String projectName)
                                              throws hero.util.HeroException
Get workflow instances names of this project

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of project instances
Throws:
hero.util.HeroException

getProjectInstancesNamesAsPK

public java.util.Collection getProjectInstancesNamesAsPK(java.lang.String projectName)
                                                  throws hero.util.HeroException
Get workflow instances names of this project

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of project instances
Throws:
hero.util.HeroException

getProjectInstancesNamesByPK

public java.util.Collection getProjectInstancesNamesByPK(java.lang.String projectName,
                                                         java.util.Collection list,
                                                         int offset,
                                                         int numrows)
                                                  throws hero.util.HeroException
Get workflow instances names of this project

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of project instances
Throws:
hero.util.HeroException

getProjectInstances

public java.util.Collection getProjectInstances(java.lang.String projectName)
                                         throws hero.util.HeroException
Get Workflow instances of this project

Parameters:
projectName - the name of the project
Returns:
a BnProjectValue Collection - list of project instances
Throws:
hero.util.HeroException

getProjectInstancesAsPK

public java.util.Collection getProjectInstancesAsPK(java.lang.String projectName)
                                             throws hero.util.HeroException
Get Workflow instances of this project

Parameters:
projectName - the name of the project
Returns:
a BnProjectValue Collection - list of project instances
Throws:
hero.util.HeroException

getProjectInstancesByPK

public java.util.Collection getProjectInstancesByPK(java.lang.String projectName,
                                                    java.util.Collection list,
                                                    int offset,
                                                    int numrows)
                                             throws hero.util.HeroException
Get Workflow instances of this project

Parameters:
projectName - the name of the project
Returns:
a BnProjectValue Collection - list of project instances
Throws:
hero.util.HeroException

getInstancesByProperty

public java.util.Collection getInstancesByProperty(java.lang.String key,
                                                   java.lang.String value)
                                            throws hero.util.HeroException
Get Workflow instances from a property

Returns:
a BnProjectValue Collection - list of project instances
Throws:
hero.util.HeroException

getInstancesByPropertyAsPK

public java.util.Collection getInstancesByPropertyAsPK(java.lang.String key,
                                                       java.lang.String value)
                                                throws hero.util.HeroException
Get Workflow instances from a property

Returns:
a BnProjectValue Collection - list of project instances
Throws:
hero.util.HeroException

getInstancesByPropertyByPK

public java.util.Collection getInstancesByPropertyByPK(java.lang.String key,
                                                       java.lang.String value,
                                                       java.util.Collection list,
                                                       int offset,
                                                       int numrows)
                                                throws hero.util.HeroException
Get Workflow instances from a property

Returns:
a BnProjectValue Collection - list of project instances
Throws:
hero.util.HeroException

getInstancesByPropertyNames

public java.util.Collection getInstancesByPropertyNames(java.lang.String key,
                                                        java.lang.String value)
                                                 throws hero.util.HeroException
Get Workflow instances from a property

Returns:
a String Collection - list of project instances
Throws:
hero.util.HeroException

getInstancesByPropertyNamesAsPK

public java.util.Collection getInstancesByPropertyNamesAsPK(java.lang.String key,
                                                            java.lang.String value)
                                                     throws hero.util.HeroException
Get Workflow instances from a property

Returns:
a String Collection - list of project instances
Throws:
hero.util.HeroException

getInstancesByPropertyNamesByPK

public java.util.Collection getInstancesByPropertyNamesByPK(java.lang.String key,
                                                            java.lang.String value,
                                                            java.util.Collection list,
                                                            int offset,
                                                            int numrows)
                                                     throws hero.util.HeroException
Get Workflow instances from a property

Returns:
a String Collection - list of project instances
Throws:
hero.util.HeroException

getProjectsByProperty

public java.util.Collection getProjectsByProperty(java.lang.String key,
                                                  java.lang.String value)
                                           throws hero.util.HeroException
Get Workflow projects from a property

Returns:
a BnProjectValue Collection - list of projects
Throws:
hero.util.HeroException

getProjectsByPropertyAsPK

public java.util.Collection getProjectsByPropertyAsPK(java.lang.String key,
                                                      java.lang.String value)
                                               throws hero.util.HeroException
Get Workflow projects from a property

Returns:
a BnProjectValue Collection - list of projects
Throws:
hero.util.HeroException

getProjectsByPropertyByPK

public java.util.Collection getProjectsByPropertyByPK(java.lang.String key,
                                                      java.lang.String value,
                                                      java.util.Collection list,
                                                      int offset,
                                                      int numrows)
                                               throws hero.util.HeroException
Get Workflow projects from a property

Returns:
a BnProjectValue Collection - list of projects
Throws:
hero.util.HeroException

getProjectsByPropertyNames

public java.util.Collection getProjectsByPropertyNames(java.lang.String key,
                                                       java.lang.String value)
                                                throws hero.util.HeroException
Get Workflow projects from a property

Returns:
a String Collection - list of project names
Throws:
hero.util.HeroException

getProjectsByPropertyNamesAsPK

public java.util.Collection getProjectsByPropertyNamesAsPK(java.lang.String key,
                                                           java.lang.String value)
                                                    throws hero.util.HeroException
Get Workflow projects from a property

Returns:
a String Collection - list of project names
Throws:
hero.util.HeroException

getProjectsByPropertyNamesByPK

public java.util.Collection getProjectsByPropertyNamesByPK(java.lang.String key,
                                                           java.lang.String value,
                                                           java.util.Collection list,
                                                           int offset,
                                                           int numrows)
                                                    throws hero.util.HeroException
Get Workflow projects from a property

Returns:
a String Collection - list of project names
Throws:
hero.util.HeroException

getModelInstancesTodoList

public java.util.Collection getModelInstancesTodoList(java.lang.String projectName)
                                               throws hero.util.HeroException
Get activities names of the model instances assigned to this user

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getModelInstancesTodoList

public java.util.Collection getModelInstancesTodoList(java.lang.String projectName,
                                                      int offset,
                                                      int numrows)
                                               throws hero.util.HeroException
Get activities names of the model instances assigned to this user

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getModelInstancesTerminated

public java.util.Collection getModelInstancesTerminated(java.lang.String projectName)
                                                 throws hero.util.HeroException
Get activities names of the model instances terminated by this user

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getModelInstancesTerminated

public java.util.Collection getModelInstancesTerminated(java.lang.String projectName,
                                                        int offset,
                                                        int numrows)
                                                 throws hero.util.HeroException
Get activities names of the model instances terminated by this user

Parameters:
projectName - the name of the project
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getInstancesActivityTodoList

public java.util.Collection getInstancesActivityTodoList(java.lang.String projectName,
                                                         java.lang.String nodeName)
                                                  throws hero.util.HeroException
Get activities model instances assigned to this user

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a BnNodeLightValue Collection - the values
Throws:
hero.util.HeroException

getInstancesActivityTodoListAsPK

public java.util.Collection getInstancesActivityTodoListAsPK(java.lang.String projectName,
                                                             java.lang.String nodeName)
                                                      throws hero.util.HeroException
Get subset of activities model instances assigned to this user

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a BnNodeLightValue Collection - the values
Throws:
hero.util.HeroException

getInstancesActivityTodoListByPK

public java.util.Collection getInstancesActivityTodoListByPK(java.lang.String projectName,
                                                             java.lang.String nodeName,
                                                             java.util.Collection list,
                                                             int offset,
                                                             int numrows)
                                                      throws hero.util.HeroException
Get subset of activities model instances assigned to this user

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a BnNodeLightValue Collection - the values
Throws:
hero.util.HeroException

getInstancesActivityTerminated

public java.util.Collection getInstancesActivityTerminated(java.lang.String projectName,
                                                           java.lang.String nodeName)
                                                    throws hero.util.HeroException
Get activities model instances terminated by this user

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a BnNodeLightValue Collection - the values
Throws:
hero.util.HeroException

getInstancesActivityTerminatedAsPK

public java.util.Collection getInstancesActivityTerminatedAsPK(java.lang.String projectName,
                                                               java.lang.String nodeName)
                                                        throws hero.util.HeroException
Get subset of activities model instances terminated by this user

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a BnNodeLightValue Collection - the values
Throws:
hero.util.HeroException

getInstancesActivityTerminatedByPK

public java.util.Collection getInstancesActivityTerminatedByPK(java.lang.String projectName,
                                                               java.lang.String nodeName,
                                                               java.util.Collection list,
                                                               int offset,
                                                               int numrows)
                                                        throws hero.util.HeroException
Get subset of activities model instances terminated by this user

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a BnNodeLightValue Collection - the values
Throws:
hero.util.HeroException

getUserInstancesProject

public java.util.Collection getUserInstancesProject()
                                             throws hero.util.HeroException
Get models names which have ongoing instances for this user

Returns:
a String Collection - the names of workflow models
Throws:
hero.util.HeroException

getUserInstancesProject

public java.util.Collection getUserInstancesProject(int offset,
                                                    int numrows)
                                             throws hero.util.HeroException
Get models names which have ongoing instances for this user

Returns:
a String Collection - the names of workflow models
Throws:
hero.util.HeroException

getUserInstancesProjectNodes

public java.util.Collection getUserInstancesProjectNodes(java.lang.String projectName)
                                                  throws hero.util.HeroException
Get ready, anticipable and executing activities for current user instances

Parameters:
projectName - the project name
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getInstanceNodes

public java.util.Collection getInstanceNodes(java.lang.String instanceName,
                                             java.lang.String userName)
                                      throws hero.util.HeroException
Get ready and executing activities for a user instance

Parameters:
instanceName - the project name
userName - the caller's name
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getUserInstancesProjectNodesAsPK

public java.util.Collection getUserInstancesProjectNodesAsPK(java.lang.String projectName)
                                                      throws hero.util.HeroException
Get a subset of the ready, anticipable and executing activities for current user instances

Parameters:
projectName - the project name
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

getUserInstancesProjectNodesByPK

public java.util.Collection getUserInstancesProjectNodesByPK(java.lang.String projectName,
                                                             java.util.Collection list,
                                                             int offset,
                                                             int numrows)
                                                      throws hero.util.HeroException
Get a subset of the ready, anticipable and executing activities for current user instances

Parameters:
projectName - the project name
Returns:
a String Collection - the names of activities
Throws:
hero.util.HeroException

startActivity

public void startActivity(java.lang.String projectName,
                          java.lang.String nodeName)
                   throws hero.util.HeroException
Tries to start an activity (when activity state is ready or anticipable)

Parameters:
projectName - the name of the project
nodeName - the name of the node
Throws:
hero.util.HeroException

terminateActivity

public void terminateActivity(java.lang.String projectName,
                              java.lang.String nodeName)
                       throws hero.util.HeroException
Tries to terminate an activity (when activity state is executing or anticipating)

Parameters:
projectName - the name of the project
nodeName - the name of the node
Throws:
hero.util.HeroException

cancelActivity

public void cancelActivity(java.lang.String projectName,
                           java.lang.String nodeName)
                    throws hero.util.HeroException
Tries to cancel an activity (when activity is executing or anticipating)

Parameters:
projectName - the name of the project
nodeName - the name of the node
Throws:
hero.util.HeroException

terminate

public void terminate(java.lang.String projectName)
               throws hero.util.HeroException
Tries to terminate a project (only when all project activities are terminated)

Parameters:
projectName - the name of the project
Throws:
hero.util.HeroException

getNode

public BnNodeValue getNode(java.lang.String projectName,
                           java.lang.String nodeName)
                    throws hero.util.HeroException
Get Node Value from a specific project

Parameters:
projectName - the name of the project
nodeName - the name of the node
Returns:
a NodeValue object - get node information
Throws:
hero.util.HeroException

getUser

public java.lang.String getUser()
Get the user name

Returns:
a String - get user name

getUserLightValue

public BnUserLightValue getUserLightValue()
                                   throws hero.util.HeroException
Get the user light value

Returns:
a BnUserLightValue object - get user information
Throws:
hero.util.HeroException

setUserMail

public void setUserMail(java.lang.String userName,
                        java.lang.String mail)
                 throws hero.util.HeroException
Set the mail of this user into Bonita database.

Parameters:
userName - the name of the user
Throws:
hero.util.HeroException

getUserMail

public java.lang.String getUserMail(java.lang.String userName)
                             throws hero.util.HeroException
Get the mail of this user from Bonita database.

Parameters:
userName - the name of the user
Throws:
hero.util.HeroException

getUserPassword

public java.lang.String getUserPassword()
                                 throws hero.util.HeroException
Get the user password

Returns:
a String - get user password
Throws:
hero.util.HeroException

getUserJabber

public java.lang.String getUserJabber()
                               throws hero.util.HeroException
Get the user jabber address

Returns:
a String - get user jabber address
Throws:
hero.util.HeroException

getUserProperties

public java.util.Collection getUserProperties()
                                       throws hero.util.HeroException
Get User properties

Returns:
a BnUserPropertyValue Collection - list of user properties
Throws:
hero.util.HeroException

setUserProperty

public void setUserProperty(java.lang.String key,
                            java.lang.String value)
                     throws hero.util.HeroException
Set a property of a user

Parameters:
key - the key of the property
value - the name of the property
Throws:
hero.util.HeroException

deleteUserProperty

public void deleteUserProperty(java.lang.String key)
                        throws hero.util.HeroException
Delete a property of a user

Parameters:
key - the key of the property
Throws:
hero.util.HeroException

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Creates the User Session Bean. This method is the first one to invoke in order to use UserSession API. If the user is not authorized this method throws an exception.

Throws:
javax.ejb.CreateException

setSessionContext

public void setSessionContext(javax.ejb.SessionContext context)
Internal Enterprise Java Beans method.

Specified by:
setSessionContext in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Internal Enterprise Java Beans method.

Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Internal Enterprise Java Beans method.

Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Internal Enterprise Java Beans method.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean