com.silverpeas.processManager.ejb
Class ProcessManagerBmEJB
java.lang.Object
com.silverpeas.processManager.ejb.ProcessManagerBmEJB
- All Implemented Interfaces:
- ProcessManagerBm
public class ProcessManagerBmEJB
- extends Object
- implements ProcessManagerBm
Method Summary |
String |
createProcess(String componentId,
String userId,
String fileName,
byte[] fileContent)
Create a process instance for a specific workflow component, by a specific user using one role
of thoose defined in a given workflow definition. |
String |
createProcess(String componentId,
String userId,
String userRole,
Map<String,? extends Serializable> metadata)
Create a process instance for a specific workflow component, by a specific user using one role
of thoose defined in a given workflow definition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ROLE
public static final String DEFAULT_ROLE
- Default role for creating workflow processes.
- See Also:
- Constant Field Values
ProcessManagerBmEJB
public ProcessManagerBmEJB()
createProcess
public String createProcess(String componentId,
String userId,
String fileName,
byte[] fileContent)
throws ProcessManagerException
- Create a process instance for a specific workflow component, by a specific user using one role
of thoose defined in a given workflow definition. The contents of a file is passed in as a
single parameter. This file is uploaded into the process data and stored in the first field of
the file type.
- Specified by:
createProcess
in interface ProcessManagerBm
- Parameters:
componentId
- the ID of the component which defines the workflow (must be a workflow
component).userId
- the current user ID.fileName
- the name of the file being pushed during process creation.fileContent
- the full content of the file being pushed during process creation (as an
array of bytes).
- Returns:
- the instance ID of the newly started process
- Throws:
ProcessManagerException
createProcess
public String createProcess(String componentId,
String userId,
String userRole,
Map<String,? extends Serializable> metadata)
throws ProcessManagerException
- Create a process instance for a specific workflow component, by a specific user using one role
of thoose defined in a given workflow definition.
Some information may be specified that will fill in the creation form of the new process
instance. Such data should be placed into a map structure of key-value pairs where keys are the
name of the intended fields of the creation form and values are strins (text fields), dates
(date fields), colelctions of strings, collections of dates, or a single FileContent
object.
FileContent
are used to pass in as an argument a complete file of binary data, loaded
into memory.
- Specified by:
createProcess
in interface ProcessManagerBm
- Parameters:
componentId
- the ID of the component which defines the workflow (must be a workflow
component).userId
- the current user ID.userRole
- the role of the user while creating the process instance (this role must have
been defined in the workflow process definition).metadata
- a map of all input metadata, coming with the file and describing it. The key is
expected to be the name of a field in the process form definition (with specification of the
type name of the field), and the value must be the value to put into this field (it may be a
collection of value if the field is multivaluated, else only the first value is considered).
- Returns:
- the instance ID of the newly started process
- Throws:
ProcessManagerException
Copyright © 2016 Silverpeas. All Rights Reserved.