Java Doc for ProjectSessionBean.java in  » Workflow-Engines » bonita-v3.1 » hero » session » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » bonita v3.1 » hero.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   hero.session.ProjectSessionBean

ProjectSessionBean
public class ProjectSessionBean implements SessionBean,EventConstants(Code)
Project Session Bean is an stateful session bean that provides the interface for workflow process definition. By means of this API we can create workflow processes, project activities, transitions between activities , users and roles, properties, hooks, external agents...

A Bonita Workflow process is composed by the activities (nodes) and the connections between these activities (edges). For each project, the administrator/s set the list of responsibles to execute these activites (users and roles). In the same way, the Project Session Bean API offers a great number of functionalities for working with activities behaviors (hooks) and workflow relevant data (properties).

This API can be used on different contexts depending on the needs of your application, so you can instantiate an existing project in order to perform set, get, update and remove operations, you can create a new workflow project (by instantiating a project that does not exists), you can clone an existing project or creates a new workflow instante of a project. The following lines shows a sample code to use this API in your application:


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

import hero.interfaces.ProjectSessionLocalHome;
import hero.interfaces.ProjectSessionLocal;
import hero.interfaces.ProjectSessionHome;
import hero.interfaces.ProjectSession;
import hero.interfaces.ProjectSessionUtil;

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

Like this if you want to use local interfaces:

ProjectSessionLocalHome projecth = (ProjectSessionLocalHome)hero.interfaces.ProjectSessionUtil.getLocalHome();
ProjectSessionLocal projectsession = projecth.create();

or like this if you use remote interfaces:

ProjectSessionHome userh = (ProjectSessionHome)hero.interfaces.ProjectSessionUtil.getHome();
ProjectSession projectsession = projecth.create();


- If you want to use Project Session API for a specific project, you have to init this project.

Depending of the workflow process type you want, use:

projectsession.initProject("yourProject"); // for cooperative projects

or
projectsession.initModel("yourProject"); // for workflow models

- In order to clone an existing project, you have to call the initProject method:

projectsession.initProject("Project","CloneProject");

- If you want to instantiate a project, you have to do the following:

projectsession.instantiateProject("Project");

Now you can use Project Session methods...
author:
   Miguel Valdes




Method Summary
public  voidactiveProcess()
    
public  voidaddAgent(String name)
    
public  StringaddAgentEdge(String in, String out)
    
public  voidaddEdge(String name, String in, String out)
     Add an edge to the project.
public  StringaddEdge(String in, String out)
     Add an edge between two nodes of the project [in] ---- [out].
public  voidaddHook(String hookName, String eventName, int hookType)
     Add hook to project.
public  voidaddInitiatorMapper(String mapperName, int mapperType)
     Add/Update a mapper for the INITIATOR role.
public  voidaddInterHook(String hookName, String eventName, int hookType, String value)
     Add interhook to the project.
public  voidaddIteration(String from, String to, String condition)
     Add a new iteration between two nodes.
public  voidaddNode(String name, int nodeType)
     Add a node to the project.
public  voidaddNodeHook(String nodeName, String hookName, String eventName, int hookType)
     Add hook to a node.
public  voidaddNodeInterHook(String nodeName, String hookName, String eventName, int hookType, String value)
     Add interhook to a node.
public  voidaddNodePerformerAssign(String nodeName, String performerAssignName, int performerAssignType, String propertyName)
     Add/Update an existing performerAssign to the node.
public  voidaddNodeSubProcess(String name, String projectName)
     Add a subProcess node to the project.
public  voidaddNodeSubProcess(String name, String projectName, String projectVersion)
     Add a subProcess node to the project.
public  voidaddRole(String roleName, String description)
     Add a role to the project.
public  voidaddRoleMapper(String roleName, String mapperName, int mapperType)
     Add/Update an existing mapper to the role.
public  voidaddUser(String userName)
    
public  voidcheckModelDefinition()
     Checks if the project model is correctly defined.
public  booleancontainsUser(String userName)
    
public  voidcopyEdge(String nodeName, BnNodeLocal inNode, BonitaEdgeValue edge)
     Copy node edge.
public  voidcopyIteration(String from, String to, String condition)
     Internal method used in processes instantiation.
public  voidcopyNode(String nodeName, BonitaNodeValue node)
     Copy node.
public  voiddeleteEdge(String name)
     Delete an edge to the project.
public  voiddeleteHook(String hookName)
     Detete a hook.
public  voiddeleteInterHook(String interHookName)
     Detete a interHook of this project.
public  voiddeleteIteration(String from, String to)
     Delete an iteration between two nodes.
public  voiddeleteNode(String name)
     Delete a node from the project.
public  voiddeleteNodeHook(String nodeName, String hookName)
     Delete a node hook.
public  voiddeleteNodeInterHook(String nodeName, String interHookName)
     Delete a node interHook.
public  voiddeleteNodeProperty(String nodeName, String key)
     Delete a property of a node.
public  voiddeleteProperty(String key)
     Delete a property of the project.
public  voiddeleteRole(String roleName)
     Delete a role (and the Role mapper if it exists).
public  voiddeleteRoleMapper(String roleName)
     Delete a role mapper.
public  voiddeleteSubProcessNode(String name, String version)
     Delete a node with type subProcess from the project.
public  voidedgeDeletion(BnEdgeLocal ed)
    
public  voidejbActivate()
     Internal Enterprise Java Beans method.
public  voidejbCreate()
     Creates the Project Session Bean.
public  voidejbPassivate()
     Internal Enterprise Java Beans method.
public  voidejbPostCreate(String oldProject, String newProject)
     Internal Enterprise Java Beans method.
public  voidejbRemove()
     Internal Enterprise Java Beans method.
public  voidexecuteOnReadyHook()
     Executes the OnReady hook associated to the first activities of the process (those ones for which there is no ingoing transitions).
public  voidexecuteProcessHook()
     Executes the OnInstatiate hook associated to this process.
public  booleanexistingProject(String projectName)
     Test if the project with projectName name exists.
public  booleanexistingProject(String projectName, String projectVersion)
     Test if the project with projectName and projectVersion name exists.
public  BnAgentEdgeValuegetAgentEdgeValue(String name)
    
public  BnAgentValuegetAgentValue(String name)
     Get the Agent Value.
public  CollectiongetAllUsers()
     Return all registered users.
public  StringgetCaller()
    
public  ArrayListgetChoices(String value, Collection possibleValues)
     Get the list of choices into the value of the enumerated property .
public  StringgetCreator()
     Get creator of the project.
public  BnProjectValuegetDetails()
     Get the ProjectValue (historique).
public  StringgetEdgeCondition(String edge)
     Get the edge Condition.
public  StringgetEdgeInNode(String edgeName)
     Get edge in node.
public  StringgetEdgeOutNode(String edgeName)
     Get edge out node.
public  BnEdgeValuegetEdgeValue(String name)
     Get the edge value.
public  CollectiongetEdgesNames()
    
public  CollectiongetHooks()
     Get hooks of the project.
public  StringgetInterHookValue(String hook)
     Get the inter hook value script.
public  CollectiongetInterHooks()
     Get Interactive hooks of the project.
public  CollectiongetIterationConditions(String from)
     Get iterations conditions
We can have more than 1 iteration starting in the same node.
public  booleangetIterationExist(String from)
    
public  booleangetIterationExist(String from, String to)
    
public  Object[]getIterations()
     Get ALL project iterations.
public  CollectiongetIterations(String from)
     Get nodes destinations of this iteration.
public  BnProjectLightValuegetLightDetails()
     Get the ProjectLightValue.
public  StringgetName()
    
public  booleangetNodeAnticipable(String name)
     Returns if the node is set to be executed in anticipated mode.
public  StringgetNodeDeadline(String nodeName)
     Get node deadline.
public  CollectiongetNodeDeadlines(String nodeName)
     Get collection of absolute deadlines for the node.
public  StringgetNodeDescription(String name)
     Get the node description.
public  StringgetNodeExecutor(String name)
     Get the node executor.
public  CollectiongetNodeHooks(String nodeName)
     Get Node hooks of the project.
public  CollectiongetNodeInEdges(String name)
    
public  BnNodeInterHookValuegetNodeInterHook(String nodeName, String interHook)
    
public  StringgetNodeInterHookValue(String node, String hook)
     Get the node hook value.
public  CollectiongetNodeInterHooks(String nodeName)
    
public  BnNodeLightValuegetNodeLightValue(String name)
     Get the node Light Value.
public  CollectiongetNodeOutEdges(String name)
    
public  BnNodePerformerAssignValuegetNodePerformerAssign(String nodeName)
     Get performer assign of this node.
public  CollectiongetNodeProperties(String nodeName)
     Get Node properties.
public  BnNodePropertyValuegetNodeProperty(String nodeName, String key)
     Get Node property value.
public  CollectiongetNodeRelativeDeadlines(String nodeName)
     Get collection of relative deadlines for the node.
public  BnRoleLocalgetNodeRole(String nodeName)
     Get node role.
public  StringgetNodeRoleName(String nodeName)
     Get node role name.
public  intgetNodeState(String name)
     Get the state of the node.
public  intgetNodeType(String name)
     Get the type of the node.
public  BnNodeValuegetNodeValue(String name)
     Get the node Value.
public  Object[]getNodes()
     Get the project nodes.
public  CollectiongetNodesNames()
    
public  StringgetParent()
    
public  StringgetProjectNameOfInstance(String instanceName)
    
public  CollectiongetProperties()
     Get properties of the project.
public  CollectiongetPropertiesKey()
     Get properties key of the project.
public  BnProjectPropertyValuegetProperty(String key)
     Get property value of the project.
public  CollectiongetRoleMappers()
     Get role mappers of the project.
public  BnRoleValuegetRoleValue(String roleName)
    
public  CollectiongetRoles()
    
public  CollectiongetRolesNames()
    
public  CollectiongetRolesValue()
    
public  StringgetStatus()
     Get status of the project.
public  CollectiongetStrutsEdges()
     Get the StrutsEdges.
public  StrutsNodeValuegetStrutsNode(String nodeName)
     Get the StrutsNode.
public  CollectiongetStrutsNodeEdges(String nodeName)
     Get the Edges of the Node.
public  CollectiongetStrutsNodes()
     Get the StrutsNodes.
public  StringgetType()
     Get type of the project.
public  CollectiongetUserRoles(String userName)
     Get all user roles.
public  CollectiongetUserRolesInProject(String userName)
     Get user roles in the current project.
public  CollectiongetUserRolesInProjectNames(String userName)
     Get user roles in project names.
public  CollectiongetUsers()
     Get all users of the project.
public  CollectiongetUsersRole(String roleName)
     Get users matching with given role in the current project.
public  StringgetVersion()
    
public  voidhideProcess()
     Hide a workflow process (model/cooperative).
public  voidhookEvent(String nodeName, String event)
     Execute a node hook.
public  StringimportInstance(BonitaProjectValue pv, String instance, String version, Hashtable initProperties)
     Import Project instance.
public  voidimportProject(String projectName, String projectVersion)
    
public  voidimportProject(String projectName, String projectVersion, String prefix)
    
public  voidinitModel(String modelName)
     Creates a workflow process model or Init the Project Session Bean for this model.
public  voidinitModelWithVersion(String modelName, String modelVersion)
     Creates a workflow process model or Init the Project Session Bean for this model.
public  voidinitProject(String projectName)
     Creates a cooperative workflow or creates a pointer to the Project Session Bean for this cooperative/instance element.
public  voidinitProject(String oldProject, String newProject)
     init the Project Session Bean (clone project).You have to call this method after "create" call.
public  voidinitProjectWithVersion(String oldProject, String oldVersion, String newProject)
     init the Project Session Bean (clone project).You have to call this method after "create" call.
public  StringinstantiateProject(String project, Hashtable initProperties)
     Project instance.
public  StringinstantiateProject(String project, String version, Hashtable initProperties)
     Project instance.
public  StringinstantiateProject(String project)
     Project instance.
public  StringinstantiateProject(String project, String version)
     Project instance.
public  booleanisAdminOfProject()
    
public  booleanisTerminated()
    
public  booleanisUserInNodeRole(String nodeName)
    
public  voidpropagateNodeProperties(String nodeName)
     Propagate node properties.
public  voidpropagatesParentProperties(String node)
    
public  voidpropagatesSubProcessProperties(BnNodeLocal node)
     Propagate subProcess properties to subProcess activity.
public  voidremoveNodePerformerAssign(String nodeName)
    
public  voidsetAgentEdgeState(BnAgentEdgeLocal agentEdge, int state)
    
public  voidsetAgentState(BnAgentLocal agent, int state)
    
public  voidsetCaller(String user)
    
public  voidsetEdgeCondition(String edge, String condition)
     Set the edge condition.
public  voidsetEdgeState(BnEdgeLocal edge, int state)
    
public  voidsetEditNode(String node, String role, String description, long deadline)
     Set edit node changes.
public  voidsetInterHookValue(String hook, String value)
     Set the hook value.
public  voidsetLogLevel(String level)
     Set a log level of the actual project.
public  voidsetNodeAnticipable(String name)
     Set the node in anticipable mode.
public  voidsetNodeAutomatic(String name)
     Set the node in automatic mode.
public  voidsetNodeDeadline(String name, long date)
     Set the node deadline.
public  voidsetNodeDeadlines(String name, Collection co)
     Set a collection of deadlines for the node.
public  voidsetNodeDescription(String name, String description)
     Set the node description.
public  voidsetNodeExecutor(String name)
     Set the name of the node executor.
public  voidsetNodeInterHookValue(String node, String hook, String value)
     Set the node hook value.
public  voidsetNodeProperty(String nodeName, String key, String value, boolean propagate)
     Set a property of a node.
public  voidsetNodeProperty(String nodeName, String key, String value)
     Set a property of a node.
public  voidsetNodePropertyPossibleValues(String nodeName, String key, Collection values)
     Set property possible values for a specific node.
public  voidsetNodeRelativeDeadline(String name, long date)
     Set the node relative deadline.
public  voidsetNodeRelativeDeadlines(String name, Collection co)
     Set a collection of relativeDeadlines for the node.
public  voidsetNodeRole(String name, String role)
     Sets the role of an activity.
public  voidsetNodeState(BnNodeLocal node, int state)
     Set the node state.
public  voidsetNodeTraditional(String name)
     Set the node in traditional mode.
public  voidsetNodeType(String name, int type)
     Set the node type.
public  voidsetNodesReady()
     Set all initial roles to ready if node does not has in edges.
public  voidsetProperty(String key, String value)
     Set a property of the project.
public  voidsetPropertyPossibleValues(String key, Collection values)
     Set property possible values.
public  voidsetSessionContext(javax.ejb.SessionContext context)
     Internal Enterprise Java Beans method.
public  voidsetTraceLevel(String level)
     Set a trace level of the actual project.
public  voidsetUserRole(String userName, String roleName)
     Set a role to this user.
public  voidunDeployProcess()
     Undeploy a workflow process (model/cooperative).
public  voidunsetUser(String userName)
    
public  voidunsetUserRole(String userName, String roleName)
     Unset a user role in this project.
public  voidupdateNodePropertyPossibleValues(String nodeName, String key, Collection values, Collection defaultValues)
     This method allows users to change dynamically the possible values defined for this property.
public  voidupdatePropertyPossibleValues(String key, Collection values, Collection defaultValues)
     This method allows users to change dynamically the possible values defined for this property.



Method Detail
activeProcess
public void activeProcess() throws HeroException(Code)
Active a workflow process (model/cooperative)
Parameters:
  name - the name of the workflow process
throws:
  HeroException -



addAgent
public void addAgent(String name) throws HeroException(Code)
Add an Agent to the Project
Parameters:
  name - The name of the Agent to add to the project
throws:
  HeroException -



addAgentEdge
public String addAgentEdge(String in, String out) throws HeroException(Code)
Add an AgentEdge to the Project [in] ---- [out]
Parameters:
  in - the name of the in Agent
Parameters:
  out - the name of the out Node
throws:
  HeroException -



addEdge
public void addEdge(String name, String in, String out) throws HeroException(Code)
Add an edge to the project. Creates a transition between two nodes by specifying the name of this edge. No more implemented
Parameters:
  name - the name ot the edge
throws:
  HeroException -



addEdge
public String addEdge(String in, String out) throws HeroException(Code)
Add an edge between two nodes of the project [in] ---- [out]. This operation refresh the out node state. If new edge forms a cycle an exception is throwed.
Parameters:
  in - the name of the in Node
Parameters:
  out - the name of the out Node
throws:
  HeroException -



addHook
public void addHook(String hookName, String eventName, int hookType) throws HeroException(Code)
Add hook to project. Add an existing hook file to the project. This hook type uses a Java file loaded at run time. The hookName represents the class java file to be loaded by the system at run time. These classes must be in the application server classpath to be correctly executed.
The possible values of the argumets are:

eventName:
hero.interfaces.Constants.Pj.ONINSTANTIATE

hero.interfaces.Constants.Pj.ONTERMINATE


Parameters:
  hookName - the name of the hook
Parameters:
  eventName - the event
Parameters:
  hookType - the type
throws:
  HeroException -



addInitiatorMapper
public void addInitiatorMapper(String mapperName, int mapperType) throws HeroException(Code)
Add/Update a mapper for the INITIATOR role. This type of mapper use a Java file loaded at run time.
Parameters:
  mapperName - the name of the mapper
Parameters:
  mapperType - the type of the mapper
throws:
  HeroException -



addInterHook
public void addInterHook(String hookName, String eventName, int hookType, String value) throws HeroException(Code)
Add interhook to the project. Creates new hook associated to all project activites. See the ProjectSessionBean.addNodeInterHook(String,String,String,int,String) addNodeInterHook method in order to identify arguments values.
Parameters:
  hookName - the name of the hook
Parameters:
  eventName - the name of the event
Parameters:
  hookType - the type of the hook
Parameters:
  script - the value of the script
throws:
  HeroException -



addIteration
public void addIteration(String from, String to, String condition) throws HeroException(Code)
Add a new iteration between two nodes. This methods sets an iteration which is stopped when the lastNode property "iterate" is false.
Parameters:
  from - the name of the first node
Parameters:
  to - the name of the last node
throws:
  HeroException -



addNode
public void addNode(String name, int nodeType) throws HeroException(Code)
Add a node to the project. This method creates a node with the corresponding node type and assign to it the hero.interfaces.Constants.InitialRole role.

Possible node types are:

hero.interfaces.Constants.Nd.AND_JOIN_NODE // Manual and join node
hero.interfaces.Constants.Nd.OR_JOIN_NODE // Manual or join node
hero.interfaces.Constants.Nd.AND_JOIN_AUTOMATIC_NODE // Automatic and join node
hero.interfaces.Constants.Nd.OR_JOIN_AUTOMATIC_NODE // Automatic or join node

Parameters:
  name - The name of the node to add to the project
Parameters:
  nodeType - The type of the node to add to the project
throws:
  HeroException -



addNodeHook
public void addNodeHook(String nodeName, String hookName, String eventName, int hookType) throws HeroException(Code)
Add hook to a node. Add an existing hook file to the node. This type of hook use a Java file loaded at run time. The hookName represents the class java file to be loaded by the system at run time. These classes must be in the application server classpath to be correctly executed.
The possible values of the arguments are:

eventName:
hero.interfaces.Constants.Nd.BEFORESTART
hero.interfaces.Constants.Nd.AFTERSTART
hero.interfaces.Constants.Nd.BEFORETERMINATE
hero.interfaces.Constants.Nd.AFTERTERMINATE
hero.interfaces.Constants.Nd.ONCANCEL
hero.interfaces.Constants.Nd.ANTICIPATE

hero.interfaces.Constants.Nd.ONDEADLINE

hero.interfaces.Constants.Nd.ONREADY



hookType:
hero.interfaces.Constants.Hook.JAVA

hero.interfaces.Constants.Hook.BSINTERACTIVE


Parameters:
  nodeName - the name of the node
Parameters:
  hookName - the name of the hook
Parameters:
  eventName - the name of the event
Parameters:
  hookType - the type of the hook
throws:
  HeroException -



addNodeInterHook
public void addNodeInterHook(String nodeName, String hookName, String eventName, int hookType, String value) throws HeroException(Code)
Add interhook to a node. Set a new hook to this node by setting the eventName, hookType and script values.

The possible values of the argumets are:

eventName:
hero.interfaces.Constants.Nd.BEFORESTART
hero.interfaces.Constants.Nd.AFTERSTART
hero.interfaces.Constants.Nd.BEFORETERMINATE
hero.interfaces.Constants.Nd.AFTERTERMINATE
hero.interfaces.Constants.Nd.ONCANCEL
hero.interfaces.Constants.Nd.ANTICIPATE

hero.interfaces.Constants.Nd.ONDEADLINE

hero.interfaces.Constants.Nd.ONREADY

hookType:
hero.hook.Hook.BSINTERACTIVE

script:
The beanshell source code associated to this hook.

The following sample code illustrates how to use this method:

...
String script = "import hero.interfaces.*;\n"
+ "import hero.interfaces.BnNodeLocal;\n"
+ "beforeStart (Object b,Object n) {\n\n\n"
+ "System.out.println(\"Hook Test\");\n"
+ "}";
yourProjectSessionInstance.addNodeInterHook("NodeName","Hook_Name",Constants.Nd.BEFORESTART,hero.hook.Hook.BSINTERACTIVE,script);
Parameters:
  nodeName - the name of the node
Parameters:
  hookName - the name of the hook
Parameters:
  eventName - the name of the event
Parameters:
  hookType - the type of the hook
Parameters:
  script - the value of the script
throws:
  HeroException -



addNodePerformerAssign
public void addNodePerformerAssign(String nodeName, String performerAssignName, int performerAssignType, String propertyName) throws HeroException(Code)
Add/Update an existing performerAssign to the node. This type of performerAssign use a Java file loaded at run time.
Parameters:
  nodeName - the name of the node
Parameters:
  performerAssignName - the name of the performerAssign
Parameters:
  performerAssignType - the type of the performerAssign
throws:
  HeroException -



addNodeSubProcess
public void addNodeSubProcess(String name, String projectName) throws HeroException(Code)
Add a subProcess node to the project. This method creates the subProject from an existing project and creates the node associated to it. The type of created node is hero.interfaces.Constants.Nd.SUB_PROCESS_NODE
Parameters:
  name - The name of the node to add to the project
Parameters:
  projectName - the name of the subProcess
throws:
  HeroException -



addNodeSubProcess
public void addNodeSubProcess(String name, String projectName, String projectVersion) throws HeroException(Code)
Add a subProcess node to the project. This method creates the subProject from an existing project and creates the node associated to it. The type of created node is hero.interfaces.Constants.Nd.SUB_PROCESS_NODE
Parameters:
  name - The name of the node to add to the project
Parameters:
  projectName - the name of the subProcess
Parameters:
  projectVersion - the version of the subProcess
throws:
  HeroException -



addRole
public void addRole(String roleName, String description) throws HeroException(Code)
Add a role to the project. Creates a role within this project. The role is specific of this project
Parameters:
  name - the name of the role
Parameters:
  description - the description of the role
throws:
  HeroException -



addRoleMapper
public void addRoleMapper(String roleName, String mapperName, int mapperType) throws HeroException(Code)
Add/Update an existing mapper to the role. This type of mapper use a Java file loaded at run time.
Parameters:
  roleName - the name of the role
Parameters:
  mapperName - the name of the mapper
Parameters:
  mapperType - the type of the mapper
throws:
  HeroException -



addUser
public void addUser(String userName) throws HeroException(Code)
Add a user to this project (This user must exist at bonita database)
Parameters:
  userName - The name of the user to associate to the project
throws:
  HeroException -



checkModelDefinition
public void checkModelDefinition() throws HeroException(Code)
Checks if the project model is correctly defined.
throws:
  HeroException -



containsUser
public boolean containsUser(String userName) throws HeroException(Code)
Test if the project contains this user
Parameters:
  userName - The name of the user to associate to the project boolean - true is the user belongs to the project
throws:
  HeroException -



copyEdge
public void copyEdge(String nodeName, BnNodeLocal inNode, BonitaEdgeValue edge) throws HeroException(Code)
Copy node edge. Internal method used in processes instantiation.
Parameters:
  name - of the new node
Parameters:
  inNode - the BnNodeLocal in node object of the new node.
Parameters:
  edge - the BnEdgeLocal edge object from the project model.



copyIteration
public void copyIteration(String from, String to, String condition) throws HeroException(Code)
Internal method used in processes instantiation.
Parameters:
  from -
Parameters:
  to -
Parameters:
  condition -
throws:
  HeroException -



copyNode
public void copyNode(String nodeName, BonitaNodeValue node) throws HeroException(Code)
Copy node. Internal method used in processes instantiation.
Parameters:
  name - of the new node
Parameters:
  node - the BnNodeLocal object of the copied node.
Parameters:
  inNode - the BnNodeLocal in node object of the new node.



deleteEdge
public void deleteEdge(String name) throws HeroException(Code)
Delete an edge to the project. If out node of this edge is in executing, terminated or cancelled state, the method throws an execption.
Parameters:
  name - the name ot the edge
throws:
  HeroException -



deleteHook
public void deleteHook(String hookName) throws HeroException(Code)
Detete a hook. Delete a Java or aTCL hook of this project.
Parameters:
  hookName - the name of the hook
throws:
  HeroException -



deleteInterHook
public void deleteInterHook(String interHookName) throws HeroException(Code)
Detete a interHook of this project. This method deletes this hook from all projects nodes.
Parameters:
  hookName - the name of the hook
throws:
  HeroException -



deleteIteration
public void deleteIteration(String from, String to) throws HeroException(Code)
Delete an iteration between two nodes.
Parameters:
  from - the name of the first node
Parameters:
  to - the name of the last node
throws:
  HeroException -



deleteNode
public void deleteNode(String name) throws HeroException(Code)
Delete a node from the project. If this node is in executing state, the method throws an execption
Parameters:
  name - the name of the edge
throws:
  HeroException -



deleteNodeHook
public void deleteNodeHook(String nodeName, String hookName) throws HeroException(Code)
Delete a node hook. Delete a Java or a TCL hook of this node.
Parameters:
  nodeName - the name of the node
Parameters:
  hookName - the name
throws:
  HeroException -



deleteNodeInterHook
public void deleteNodeInterHook(String nodeName, String interHookName) throws HeroException(Code)
Delete a node interHook.
Parameters:
  nodeName - the name of the node
Parameters:
  hookName - the name of the interHook
throws:
  HeroException -



deleteNodeProperty
public void deleteNodeProperty(String nodeName, String key) throws HeroException(Code)
Delete a property of a node. Deletes the node property associated to this key
Parameters:
  nodeName - the name of the node
Parameters:
  key - the key of the property
throws:
  HeroException -



deleteProperty
public void deleteProperty(String key) throws HeroException(Code)
Delete a property of the project. Deletes the project property associated to this key.
Parameters:
  key - the key of the property
throws:
  HeroException -



deleteRole
public void deleteRole(String roleName) throws HeroException(Code)
Delete a role (and the Role mapper if it exists).
Parameters:
  roleName - the name of the node
Parameters:
  roleName - name
throws:
  HeroException -



deleteRoleMapper
public void deleteRoleMapper(String roleName) throws HeroException(Code)
Delete a role mapper.
Parameters:
  roleName - the name of the node
Parameters:
  roleName - name
throws:
  HeroException -



deleteSubProcessNode
public void deleteSubProcessNode(String name, String version) throws HeroException(Code)
Delete a node with type subProcess from the project. If this node is in executing state, the method throws an execption
Parameters:
  name - the name of the edge
throws:
  HeroException -



edgeDeletion
public void edgeDeletion(BnEdgeLocal ed) throws HeroException(Code)
Actually deletes an edge and restore the state of the outgoing node Not a business method



ejbActivate
public void ejbActivate()(Code)
Internal Enterprise Java Beans method.



ejbCreate
public void ejbCreate() throws CreateException(Code)
Creates the Project Session Bean. This method is the first one to invoke in order to use ProjectSession API. If the user is not authorized this method throws an exception.
throws:
  CreateException -



ejbPassivate
public void ejbPassivate()(Code)
Internal Enterprise Java Beans method.



ejbPostCreate
public void ejbPostCreate(String oldProject, String newProject) throws CreateException, RemoteException(Code)
Internal Enterprise Java Beans method.



ejbRemove
public void ejbRemove()(Code)
Internal Enterprise Java Beans method.



executeOnReadyHook
public void executeOnReadyHook() throws HeroException(Code)
Executes the OnReady hook associated to the first activities of the process (those ones for which there is no ingoing transitions). This method must only be called after a workflow model is instantiated.



executeProcessHook
public void executeProcessHook() throws HeroException(Code)
Executes the OnInstatiate hook associated to this process. This method can only be called before a workflow model is instantiated.
throws:
  HeroException -



existingProject
public boolean existingProject(String projectName) throws HeroException(Code)
Test if the project with projectName name exists.
Parameters:
  projectName - project name
throws:
  HeroException -



existingProject
public boolean existingProject(String projectName, String projectVersion) throws HeroException(Code)
Test if the project with projectName and projectVersion name exists.
Parameters:
  projectName - project name
Parameters:
  projectName - project name
throws:
  HeroException -



getAgentEdgeValue
public BnAgentEdgeValue getAgentEdgeValue(String name) throws HeroException(Code)
Get the AgentEdge Value
Parameters:
  name - the name of the BnAgentEdge BnAgentEdgeValue object - agentEdge data.
throws:
  HeroException -



getAgentValue
public BnAgentValue getAgentValue(String name) throws HeroException(Code)
Get the Agent Value.
Parameters:
  name - the name of the Agent BnAgentValue object - agent data.
throws:
  HeroException -



getAllUsers
public Collection getAllUsers() throws HeroException(Code)
Return all registered users. Get user names of Bonita System String Collection - all user names
throws:
  HeroException -



getCaller
public String getCaller()(Code)
Local method
throws:
  HeroException -



getChoices
public ArrayList getChoices(String value, Collection possibleValues) throws HeroException(Code)
Get the list of choices into the value of the enumerated property .
Parameters:
  value - the value of the enumerated property
Parameters:
  possiblesValues - collection of the enumerated property Collection of choices of the enumerated property into the value
throws:
  HeroException -



getCreator
public String getCreator() throws HeroException(Code)
Get creator of the project. The user that created the project String - project creator
throws:
  HeroException -



getDetails
public BnProjectValue getDetails() throws HeroException(Code)
Get the ProjectValue (historique). Returns project information: project attributes, nodes, edges, hooks, properties... BnProjectValue object - project data
throws:
  HeroException -



getEdgeCondition
public String getEdgeCondition(String edge) throws HeroException(Code)
Get the edge Condition. This condition is evaluated at run-time in order to perform activity transition. This condition follows the beanshell syntax (Lightweight Scripting for Java).

Parameters:
  edge - the edge/transition name String - edge condition
throws:
  HeroException -



getEdgeInNode
public String getEdgeInNode(String edgeName) throws HeroException(Code)
Get edge in node. Returns the name of in node
Parameters:
  edgeName - the name ot the edge String - the name of in node
throws:
  HeroException -



getEdgeOutNode
public String getEdgeOutNode(String edgeName) throws HeroException(Code)
Get edge out node. Returns the name of out node
Parameters:
  edgeName - the name ot the edge String - the name of out node
throws:
  HeroException -



getEdgeValue
public BnEdgeValue getEdgeValue(String name) throws HeroException(Code)
Get the edge value.
Parameters:
  name - the name of the edge BnEdgeValue object - edge data.
throws:
  HeroException -



getEdgesNames
public Collection getEdgesNames() throws HeroException(Code)
Get all edges names of the project String Collection - all edges names of the project
throws:
  HeroException -



getHooks
public Collection getHooks() throws HeroException(Code)
Get hooks of the project. Method to get the list of Java or TCL hooks of the project Collection of BnProjectHooksValue - all project hook
throws:
  HeroException -



getInterHookValue
public String getInterHookValue(String hook) throws HeroException(Code)
Get the inter hook value script. This method returns the hook script associated to all project nodes.
Parameters:
  hook - hook name String - script associated to this hook
throws:
  HeroException -



getInterHooks
public Collection getInterHooks() throws HeroException(Code)
Get Interactive hooks of the project. Returns hooks assigned to project nodes. Collection of ProjectInterHookValue - project inter hooks
throws:
  HeroException -



getIterationConditions
public Collection getIterationConditions(String from) throws HeroException(Code)
Get iterations conditions
We can have more than 1 iteration starting in the same node. Collection - collection of conditions that starts in node from
throws:
  HeroException -



getIterationExist
public boolean getIterationExist(String from) throws HeroException(Code)
Verifies if this node starts one iteration or more iterations boolean
throws:
  HeroException -



getIterationExist
public boolean getIterationExist(String from, String to) throws HeroException(Code)
Verifies if an iteration exist between both nodes boolean
throws:
  HeroException -



getIterations
public Object[] getIterations() throws HeroException(Code)
Get ALL project iterations. Collection of BnIterationLightValue - all project iterations
throws:
  HeroException -



getIterations
public Collection getIterations(String from) throws HeroException(Code)
Get nodes destinations of this iteration.
We can have more than 1 iteration starting in the same node. Collection
throws:
  HeroException -



getLightDetails
public BnProjectLightValue getLightDetails() throws HeroException(Code)
Get the ProjectLightValue. Returns the basic project information: project attributes (without relationships) BnProjectLightValue object - project data
throws:
  HeroException -



getName
public String getName() throws HeroException(Code)
Get ProjectName String - project name
throws:
  HeroException -



getNodeAnticipable
public boolean getNodeAnticipable(String name) throws HeroException(Code)
Returns if the node is set to be executed in anticipated mode.
Parameters:
  name - name of the node boolean - if anticipable node is set to this node.
throws:
  HeroException -



getNodeDeadline
public String getNodeDeadline(String nodeName) throws HeroException(Code)
Get node deadline. Activity deadline is the lastest date in which the activity must be finished.
Parameters:
  nodeName - The name of the node String - deadline of this node
throws:
  HeroException -



getNodeDeadlines
public Collection getNodeDeadlines(String nodeName) throws HeroException(Code)
Get collection of absolute deadlines for the node. Activity deadline is the lastest date in which the activity must be finished.
Parameters:
  nodeName - The name of the node Collection - collection of deadlines of this node
throws:
  HeroException -



getNodeDescription
public String getNodeDescription(String name) throws HeroException(Code)
Get the node description. Node description represents, explicity, execution related information of this task.
Parameters:
  name - of the node String - description of the node
throws:
  HeroException -



getNodeExecutor
public String getNodeExecutor(String name) throws HeroException(Code)
Get the node executor. Get the name of the user which is executing the activity.
Parameters:
  name - the name of the node String - the user executor of this node
throws:
  HeroException -



getNodeHooks
public Collection getNodeHooks(String nodeName) throws HeroException(Code)
Get Node hooks of the project. Get hooks of the node. Method to get the list of Java or TCL hooks of the node.
Parameters:
  nodeName - the name of the node Collection of BnNodeHookValue - all node hooks
throws:
  HeroException -



getNodeInEdges
public Collection getNodeInEdges(String name) throws HeroException(Code)
Get all in edges of the node
Parameters:
  name - the name ot the node String Collection - get in edges of the node
throws:
  HeroException -



getNodeInterHook
public BnNodeInterHookValue getNodeInterHook(String nodeName, String interHook) throws HeroException(Code)
Get Node inter hook of the project
Parameters:
  nodeName - the name of the node
Parameters:
  interHook - name of the hooks BnNodeInterHookValue object - node hook data
throws:
  HeroException -



getNodeInterHookValue
public String getNodeInterHookValue(String node, String hook) throws HeroException(Code)
Get the node hook value. This method returns the hook script associated to this node
Parameters:
  name - the name of the node
Parameters:
  hook - hookName of the node String - script associated to this hook
throws:
  HeroException -



getNodeInterHooks
public Collection getNodeInterHooks(String nodeName) throws HeroException(Code)
Get Interactive Node hooks of the project
Parameters:
  nodeName - the name of the node Collection of BnNodeInterHookValue objects - all node hooks
throws:
  HeroException -



getNodeLightValue
public BnNodeLightValue getNodeLightValue(String name) throws HeroException(Code)
Get the node Light Value. Returns node basic information.
Parameters:
  name - the name of the Node BnNodeLightValue object - agentEdge data.
throws:
  HeroException -



getNodeOutEdges
public Collection getNodeOutEdges(String name) throws HeroException(Code)
Get all out edges of the node
Parameters:
  name - the name ot the node String Collection - get out edges of the node
throws:
  HeroException -



getNodePerformerAssign
public BnNodePerformerAssignValue getNodePerformerAssign(String nodeName) throws HeroException(Code)
Get performer assign of this node. BnNodePerformerAssignValue of this node
Parameters:
  nodeName - the name of the node
throws:
  HeroException -



getNodeProperties
public Collection getNodeProperties(String nodeName) throws HeroException(Code)
Get Node properties. Get a list of pair key/value properties associated to the node.
Parameters:
  nodeName - the name of the node Collection of BnNodePropertyValue objects - all node properties
throws:
  HeroException -



getNodeProperty
public BnNodePropertyValue getNodeProperty(String nodeName, String key) throws HeroException(Code)
Get Node property value. Get a pair key/value properties associated to the node.
Parameters:
  nodeName - the name of the node
Parameters:
  key - Property key BnNodePropertyValue object - node property data
throws:
  HeroException -



getNodeRelativeDeadlines
public Collection getNodeRelativeDeadlines(String nodeName) throws HeroException(Code)
Get collection of relative deadlines for the node. Activity deadline is the lastest date in which the activity must be finished.
Parameters:
  nodeName - The name of the node Collection - collection of deadlines of this node
throws:
  HeroException -



getNodeRole
public BnRoleLocal getNodeRole(String nodeName) throws HeroException(Code)
Get node role. Returns the role information.
Parameters:
  nodeName - The name of the node BnRoleLocal object - the role data
throws:
  HeroException -



getNodeRoleName
public String getNodeRoleName(String nodeName) throws HeroException(Code)
Get node role name. Obtains the role name of this node.
Parameters:
  nodeName - The name of the node String - the role name of this node
throws:
  HeroException -



getNodeState
public int getNodeState(String name) throws HeroException(Code)
Get the state of the node. The possible states for a node are:

hero.interfaces.Constants.Nd.INITIAL
hero.interfaces.Constants.Nd.READY
hero.interfaces.Constants.Nd.DEAD
hero.interfaces.Constants.Nd.ANTICIPABLE
hero.interfaces.Constants.Nd.ANTICIPATING
hero.interfaces.Constants.Nd.EXECUTING
hero.interfaces.Constants.Nd.TERMINATED

Parameters:
  name - of the node int - The state of the node
throws:
  HeroException -



getNodeType
public int getNodeType(String name) throws HeroException(Code)
Get the type of the node. Possibles node types are:

hero.interfaces.Constants.Nd.AND_JOIN_NODE
hero.interfaces.Constants.Nd.OR_JOIN_NODE
hero.interfaces.Constants.Nd.AND_JOIN_AUTOMATIC_NODE
hero.interfaces.Constants.Nd.OR_JOIN_AUTOMATIC_NODE

Parameters:
  name - of the node int - The type of the node
throws:
  HeroException -



getNodeValue
public BnNodeValue getNodeValue(String name) throws HeroException(Code)
Get the node Value. Returns node information.
Parameters:
  name - the name of the Node BnNodeValue object - node data.
throws:
  HeroException -



getNodes
public Object[] getNodes() throws HeroException(Code)
Get the project nodes. Returns project nodes data. Array of StrutsNodeValue - all project nodes
throws:
  HeroException -



getNodesNames
public Collection getNodesNames() throws HeroException(Code)
Get all node names of the project String Collection - all node names
throws:
  HeroException -



getParent
public String getParent() throws HeroException(Code)
Get the parent project of this project String - the parent project of this project
throws:
  HeroException -



getProjectNameOfInstance
public String getProjectNameOfInstance(String instanceName) throws HeroException(Code)
Get the project name of this instance
Parameters:
  instanceName - the name of the instance String - the project name
throws:
  HeroException -



getProperties
public Collection getProperties() throws HeroException(Code)
Get properties of the project. A property is a pair key/value representing workflow relevant data. This method obtains properties of the project. Collection of ProjectPropertyValue - all project properties
throws:
  HeroException -



getPropertiesKey
public Collection getPropertiesKey() throws HeroException(Code)
Get properties key of the project. A property is a pair key/value representing workflow relevant data. This methods obtains properties key of the project. Collection of String - all project properties
throws:
  HeroException -



getProperty
public BnProjectPropertyValue getProperty(String key) throws HeroException(Code)
Get property value of the project. Get a pair key/value properties associated to this project.
Parameters:
  key - Property key BnProjectPropertyValue object - property data
throws:
  HeroException -



getRoleMappers
public Collection getRoleMappers() throws HeroException(Code)
Get role mappers of the project. Collection of BnRoleMapperValue - all role mappers
throws:
  HeroException -



getRoleValue
public BnRoleValue getRoleValue(String roleName) throws HeroException(Code)
Get the value of this role in the project BnRoleValue - role of the project
throws:
  HeroException -



getRoles
public Collection getRoles() throws HeroException(Code)
Get all roles of the project Collection of BnRoleLocal objects - roles of the project
throws:
  HeroException -



getRolesNames
public Collection getRolesNames() throws HeroException(Code)
Get all roles names of the project String Collection - roles names of this projects
throws:
  HeroException -



getRolesValue
public Collection getRolesValue() throws HeroException(Code)
Get all roles values of the project Collection of BnRoleValue objects - roles of the project
throws:
  HeroException -



getStatus
public String getStatus() throws HeroException(Code)
Get status of the project. Active/Hidden String - project status
throws:
  HeroException -



getStrutsEdges
public Collection getStrutsEdges() throws HeroException(Code)
Get the StrutsEdges. Returns project edges information with a specific java bean structure (useful in struts web applications). Collection of StrutsEdgeValue - all project edges
throws:
  HeroException -



getStrutsNode
public StrutsNodeValue getStrutsNode(String nodeName) throws HeroException(Code)
Get the StrutsNode. Returns node information with a specific java bean structure (useful in struts web applications).
Parameters:
  nodeName - the name of the Node BnStrutsNodeValue object - node data.
throws:
  HeroException -



getStrutsNodeEdges
public Collection getStrutsNodeEdges(String nodeName) throws HeroException(Code)
Get the Edges of the Node. Returns node edges information with a specific java bean structure (useful in struts web applications).
Parameters:
  nodeName - the name of the Node Collection of StrutsEdgeValue - all node edges
throws:
  HeroException -



getStrutsNodes
public Collection getStrutsNodes() throws HeroException(Code)
Get the StrutsNodes. Returns nodes information with a specific java bean structure (useful in struts web applications). Collection of StrutsNodeValue - all project nodes
throws:
  HeroException -



getType
public String getType() throws HeroException(Code)
Get type of the project. Cooperative/Model/Instance String - project type
throws:
  HeroException -



getUserRoles
public Collection getUserRoles(String userName) throws HeroException(Code)
Get all user roles. This method returns all the roles for this user in differents projects.
Parameters:
  userName - The name of the user Collection of BnRoleValue objects - roles of the user in differents projects
throws:
  HeroException -



getUserRolesInProject
public Collection getUserRolesInProject(String userName) throws HeroException(Code)
Get user roles in the current project. Returns the roles of this user in the current project.
Parameters:
  userName - The name of the user Collection of BnRoleValue objects - roles of the user in this project
throws:
  HeroException -



getUserRolesInProjectNames
public Collection getUserRolesInProjectNames(String userName) throws HeroException(Code)
Get user roles in project names. Returns the role names of the user in the current project
Parameters:
  userName - The name of the user String Collection - role names of this user in the current project
throws:
  HeroException -



getUsers
public Collection getUsers() throws HeroException(Code)
Get all users of the project. Obtains the user names of the project String Collection - user names in project
throws:
  HeroException -



getUsersRole
public Collection getUsersRole(String roleName) throws HeroException(Code)
Get users matching with given role in the current project.
Parameters:
  roleName - The name of the role Collection of String - users matching with this role
throws:
  HeroException -



getVersion
public String getVersion() throws HeroException(Code)
Get ProjectVersion String - project version
throws:
  HeroException -



hideProcess
public void hideProcess() throws HeroException(Code)
Hide a workflow process (model/cooperative). This method also clean the associated cache to this model.
Parameters:
  name - the name of the workflow process
throws:
  HeroException -



hookEvent
public void hookEvent(String nodeName, String event) throws HeroException(Code)
Execute a node hook.
Parameters:
  nodeName - the name of the node
Parameters:
  event - the event
throws:
  HeroException -



importInstance
public String importInstance(BonitaProjectValue pv, String instance, String version, Hashtable initProperties) throws HeroException(Code)
Import Project instance. Import all the nodes, hooks, properties,edges and users of a project instant to the current project
Parameters:
  projectname - the name of the project
Parameters:
  instance - the instance name of the project
throws:
  HeroException -



importProject
public void importProject(String projectName, String projectVersion) throws HeroException(Code)
Import all the nodes, hooks and edges of a project to the current project
Parameters:
  projectname - the name of the project
throws:
  HeroException -



importProject
public void importProject(String projectName, String projectVersion, String prefix) throws HeroException(Code)
Import all the nodes, hooks, properties and edges of a project to the current project
Parameters:
  projectname - the name of the project
Parameters:
  prefix - the prefix of names for the project
throws:
  HeroException -



initModel
public void initModel(String modelName) throws HeroException(Code)
Creates a workflow process model or Init the Project Session Bean for this model. You have to call this method after "create" call. After that all methods of ProjectSession API are available.
Parameters:
  modelName - model name
throws:
  HeroException -



initModelWithVersion
public void initModelWithVersion(String modelName, String modelVersion) throws HeroException(Code)
Creates a workflow process model or Init the Project Session Bean for this model. You have to call this method after "create" call. After that all methods of ProjectSession API are available.
Parameters:
  modelName - model name
Parameters:
  modelVersion - model version
throws:
  HeroException -



initProject
public void initProject(String projectName) throws HeroException(Code)
Creates a cooperative workflow or creates a pointer to the Project Session Bean for this cooperative/instance element. You have to call this method after "create" call. After that all methods of ProjectSession API are available.
Parameters:
  projectName - project name
throws:
  HeroException -



initProject
public void initProject(String oldProject, String newProject) throws CreateException(Code)
init the Project Session Bean (clone project).You have to call this method after "create" call. After that the project is cloned and all methods of ProjectSession API are available.
throws:
  HeroException -
Parameters:
  oldProject - the name of the project to clone
Parameters:
  newProject - the name of the project clone.
throws:
  CreateException -



initProjectWithVersion
public void initProjectWithVersion(String oldProject, String oldVersion, String newProject) throws CreateException(Code)
init the Project Session Bean (clone project).You have to call this method after "create" call. After that the project is cloned and all methods of ProjectSession API are available.
throws:
  HeroException -
Parameters:
  oldProject - the name of the project to clone
Parameters:
  oldVersion - the version of the project to clone
Parameters:
  newProject - the name of the project clone.
throws:
  CreateException -



instantiateProject
public String instantiateProject(String project, Hashtable initProperties) throws CreateException(Code)
Project instance. You have to call this method after "create" call. After that you have an instance of the project and all methods of ProjectSession API are available.
Parameters:
  project - the name of the project to instance String - the name of the project instance Hashtable - default value for properties defined at process level
throws:
  CreateException -



instantiateProject
public String instantiateProject(String project, String version, Hashtable initProperties) throws CreateException(Code)
Project instance. You have to call this method after "create" call. After that you have an instance of the project and all methods of ProjectSession API are available.
Parameters:
  project - the name of the project to instance
Parameters:
  version - the version of the project to instance String - the name of the project instance Hashtable - default value for properties defined at process level
throws:
  CreateException -



instantiateProject
public String instantiateProject(String project) throws CreateException(Code)
Project instance. You have to call this method after "create" call. After that you have an instance of the project and all methods of ProjectSession API are available.
Parameters:
  project - the name of the project to instance String - the name of the project instance
throws:
  CreateException -



instantiateProject
public String instantiateProject(String project, String version) throws CreateException(Code)
Project instance. You have to call this method after "create" call. After that you have an instance of the project and all methods of ProjectSession API are available.
Parameters:
  project - the name of the project to instance
Parameters:
  version - the version of the project to instance String - the name of the project instance
throws:
  CreateException -



isAdminOfProject
public boolean isAdminOfProject() throws HeroException(Code)
Verifies whether the user is admin of this project/instance
throws:
  CreateException -



isTerminated
public boolean isTerminated()(Code)
Test if projects nodes are terminated boolean - the result of the test
throws:
  HeroException -



isUserInNodeRole
public boolean isUserInNodeRole(String nodeName) throws HeroException(Code)
Returns whether the user belongs to the activity role
Parameters:
  nodeName - the name of the node
throws:
  CreateException -



propagateNodeProperties
public void propagateNodeProperties(String nodeName) throws HeroException(Code)
Propagate node properties. Propagates all node properties to connected nodes.
Parameters:
  nodeName - the name of the Node
throws:
  HeroException -



propagatesParentProperties
public void propagatesParentProperties(String node) throws HeroException(Code)
Propagate subProcess activity properties to subProcess
Parameters:
  node - the name of the node
throws:
  HeroException -



propagatesSubProcessProperties
public void propagatesSubProcessProperties(BnNodeLocal node) throws HeroException(Code)
Propagate subProcess properties to subProcess activity.
Parameters:
  node - the name of the node
throws:
  HeroException -



removeNodePerformerAssign
public void removeNodePerformerAssign(String nodeName) throws HeroException, EJBException, RemoveException(Code)
Remove the performer assign defined for this node
Parameters:
  nodeName - the name of the node
throws:
  HeroException -
throws:
  RemoveException -
throws:
  EJBException -



setAgentEdgeState
public void setAgentEdgeState(BnAgentEdgeLocal agentEdge, int state) throws HeroException(Code)
Set the agentEdge state
Parameters:
  agentEdge - bean of the BnAgentEdge new state of the BnAgentEdge
throws:
  HeroException -



setAgentState
public void setAgentState(BnAgentLocal agent, int state) throws HeroException(Code)
Set the agent state
Parameters:
  agent - bean of the Agent new state of the Agent
throws:
  HeroException -



setCaller
public void setCaller(String user)(Code)
Local method
throws:
  HeroException -



setEdgeCondition
public void setEdgeCondition(String edge, String condition) throws HeroException(Code)
Set the edge condition. This condition is evaluated at run-time in order to perform activity transition. To set the condition you have to use beanshell language (Lightweight Scripting for Java).
The next line illustrates the use of setEdgeCondition method:

...
String condition = "partial_status.equals(\"ok\")";
yourProjectSessionInstance.setEdgeCondition("edgeName",condition);

The engine evaluates on the fly the condition by using the If statement. In the previous sample, if the value of the property "partial_status" is equals to "ok" the result of this condition is true.
Parameters:
  edge - edge name
Parameters:
  condition - condition of the edge
throws:
  HeroException -



setEdgeState
public void setEdgeState(BnEdgeLocal edge, int state) throws HeroException(Code)
Set the edge state
Parameters:
  bean - of the edge new state of the edge
throws:
  HeroException -



setEditNode
public void setEditNode(String node, String role, String description, long deadline) throws HeroException(Code)
Set edit node changes. Only for GraphEditor client
Parameters:
  name - of the node
Parameters:
  role - of the node
Parameters:
  description - of the node
Parameters:
  deadline - of the node



setInterHookValue
public void setInterHookValue(String hook, String value) throws HeroException(Code)
Set the hook value. This value is the new hook script associated to all project nodes
Parameters:
  hook - hookName of the node
Parameters:
  value - new script value of this hook
throws:
  HeroException -



setLogLevel
public void setLogLevel(String level) throws HeroException(Code)
Set a log level of the actual project.
Parameters:
  level - the log level
throws:
  HeroException -



setNodeAnticipable
public void setNodeAnticipable(String name) throws HeroException(Code)
Set the node in anticipable mode.
Parameters:
  name - the name of the node
throws:
  HeroException -



setNodeAutomatic
public void setNodeAutomatic(String name) throws HeroException(Code)
Set the node in automatic mode. The responsible of the activity execution is now the engine.
Parameters:
  name - the name of the node
throws:
  HeroException -



setNodeDeadline
public void setNodeDeadline(String name, long date) throws HeroException(Code)
Set the node deadline. Activity deadline is the lastest date in which the activity must be finished.
Parameters:
  name - the name of the node
Parameters:
  date - date of the deadline
throws:
  HeroException -



setNodeDeadlines
public void setNodeDeadlines(String name, Collection co) throws HeroException(Code)
Set a collection of deadlines for the node. Activity deadline is the lastest date in which the activity must be finished.
Parameters:
  name - the name of the node
Parameters:
  co - collection of dates of the deadline
throws:
  HeroException -



setNodeDescription
public void setNodeDescription(String name, String description) throws HeroException(Code)
Set the node description. Node description represents, explicity, execution related information of this task.
Parameters:
  name - the name of the node
Parameters:
  descriptio - description of the node
throws:
  HeroException -



setNodeExecutor
public void setNodeExecutor(String name) throws HeroException(Code)
Set the name of the node executor. Set the name of the user which is executing the activity.
Parameters:
  name - the name of the node
throws:
  HeroException -



setNodeInterHookValue
public void setNodeInterHookValue(String node, String hook, String value) throws HeroException(Code)
Set the node hook value.
Parameters:
  name - name of the node
Parameters:
  hook - hookName of the node
Parameters:
  value - new script value of this hook
throws:
  HeroException -



setNodeProperty
public void setNodeProperty(String nodeName, String key, String value, boolean propagate) throws HeroException(Code)
Set a property of a node. A property is a pair key/value representing workflow relevant data. By using propagate argument we can specify if we want to propagate this property.
Parameters:
  nodeName - the name of the node
Parameters:
  key - the key of the property
Parameters:
  value - the name of the property
Parameters:
  propagate - if it is a propagation property
throws:
  HeroException -



setNodeProperty
public void setNodeProperty(String nodeName, String key, String value) throws HeroException(Code)
Set a property of a node. A property is a pair key/value representing workflow relevant data. With this method the property is propagated within others nodes.
Parameters:
  nodeName - the name of the node
Parameters:
  key - the key of the property
Parameters:
  value - the name of the property
throws:
  HeroException -



setNodePropertyPossibleValues
public void setNodePropertyPossibleValues(String nodeName, String key, Collection values) throws HeroException(Code)
Set property possible values for a specific node. Values argument represent the values which are accepted as possible property values.
Parameters:
  nodeName - the name of the node
Parameters:
  key - property key
Parameters:
  values - possible values
throws:
  HeroException -



setNodeRelativeDeadline
public void setNodeRelativeDeadline(String name, long date) throws HeroException(Code)
Set the node relative deadline. Activity deadline is the lastest date in which the activity must be finished.
Parameters:
  name - the name of the node
Parameters:
  date - date of the deadline
throws:
  HeroException -



setNodeRelativeDeadlines
public void setNodeRelativeDeadlines(String name, Collection co) throws HeroException(Code)
Set a collection of relativeDeadlines for the node.
Parameters:
  name - the name of the node
Parameters:
  co - collection of dates of the deadline
throws:
  HeroException -



setNodeRole
public void setNodeRole(String name, String role) throws HeroException(Code)
Sets the role of an activity. Changes the role of this activity
Parameters:
  name - the name of the activity
Parameters:
  role - the name of the role
throws:
  HeroException -



setNodeState
public void setNodeState(BnNodeLocal node, int state) throws HeroException(Code)
Set the node state. Set start date of this node when starts the execution and the end date when node is terminated.
Parameters:
  name - name of the node
Parameters:
  state - new state of the node
throws:
  HeroException -



setNodeTraditional
public void setNodeTraditional(String name) throws HeroException(Code)
Set the node in traditional mode. When a node is traditional the anticipable attribute is false. This method must be used if you want to execute this activity in a traditional model.
Parameters:
  name - name of the node
throws:
  HeroException -



setNodeType
public void setNodeType(String name, int type) throws HeroException(Code)
Set the node type. Change the current type of the node (if node is not executing).

Possibles node types are:
hero.interfaces.Constants.Nd.AND_JOIN_NODE
hero.interfaces.Constants.Nd.OR_JOIN_NODE
hero.interfaces.Constants.Nd.AND_JOIN_AUTOMATIC_NODE
hero.interfaces.Constants.Nd.OR_JOIN_AUTOMATIC_NODE

Parameters:
  name - the name of the node
throws:
  HeroException -



setNodesReady
public void setNodesReady() throws HeroException(Code)
Set all initial roles to ready if node does not has in edges.
throws:
  HeroException -



setProperty
public void setProperty(String key, String value) throws HeroException(Code)
Set a property of the project. A property is a pair key/value representing workflow relevant data. This methods creates a new property that can be accessed from all activites of the project.
Parameters:
  key - the key of the property
Parameters:
  value - the name of the property
throws:
  HeroException -



setPropertyPossibleValues
public void setPropertyPossibleValues(String key, Collection values) throws HeroException(Code)
Set property possible values. Values argument represent the values which are accepted as possible property values.
Parameters:
  key - property key
Parameters:
  values - possible values
throws:
  HeroException -



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



setTraceLevel
public void setTraceLevel(String level) throws HeroException(Code)
Set a trace level of the actual project.
Parameters:
  level - the trace level
throws:
  HeroException -



setUserRole
public void setUserRole(String userName, String roleName) throws HeroException(Code)
Set a role to this user. This role is assigned to the user in the context of the actual project.
Parameters:
  userName - the name of the user
Parameters:
  roleName - the name of the role
throws:
  HeroException -



unDeployProcess
public void unDeployProcess() throws HeroException(Code)
Undeploy a workflow process (model/cooperative). This method does not clean the associated cache to this model.
Parameters:
  name - the name of the workflow process
throws:
  HeroException -



unsetUser
public void unsetUser(String userName) throws HeroException(Code)
Unset a user for this project
Parameters:
  userName - The name of the user
throws:
  HeroException -



unsetUserRole
public void unsetUserRole(String userName, String roleName) throws HeroException(Code)
Unset a user role in this project.
Parameters:
  userName - name of the user
Parameters:
  roleName - name of the role
throws:
  HeroException -



updateNodePropertyPossibleValues
public void updateNodePropertyPossibleValues(String nodeName, String key, Collection values, Collection defaultValues) throws HeroException(Code)
This method allows users to change dynamically the possible values defined for this property. Only used for enumeration types. A default value is mandatory for this method.
Parameters:
  nodeName - the name of the node
Parameters:
  key - property key
Parameters:
  values - possible values
Parameters:
  defaultValues - Collection of default values
throws:
  HeroException -



updatePropertyPossibleValues
public void updatePropertyPossibleValues(String key, Collection values, Collection defaultValues) throws HeroException(Code)
This method allows users to change dynamically the possible values defined for this property. Only used for enumeration types. A default value is mandatory for this method.
Parameters:
  key - property key
Parameters:
  values - possible values
Parameters:
  defaultValues - Collection of default values
throws:
  HeroException -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.