public class OKMWorkflow extends Object implements WorkflowModule
Modifier and Type | Method and Description |
---|---|
void |
addProcessInstanceVariable(String token,
long processInstanceId,
String name,
Object value) |
void |
addTaskInstanceComment(String token,
long taskInstanceId,
String message) |
void |
addTaskInstanceVariable(String token,
long taskInstanceId,
String name,
Object value) |
void |
addTokenComment(String token,
long tokenId,
String message) |
void |
deleteProcessDefinition(String token,
long processDefinitionId)
Delete a previously registered process definition.
|
void |
deleteProcessInstance(String token,
long processInstanceId) |
void |
deleteProcessInstanceVariable(String token,
long processInstanceId,
String name) |
void |
deleteTaskInstanceVariable(String token,
long taskInstanceId,
String name) |
void |
endProcessInstance(String token,
long processInstanceId) |
void |
endTaskInstance(String token,
long taskInstanceId,
String transitionName) |
void |
endToken(String token,
long tokenId) |
List<ProcessDefinition> |
findAllProcessDefinitions(String token)
Get list of registered process definitions
|
List<ProcessDefinition> |
findAllProcessDefinitionVersions(String token,
String name)
Get list of registered process definitions versions
|
ProcessDefinition |
findLastProcessDefinition(String token,
String name)
Get last version of a given process definition.
|
List<ProcessDefinition> |
findLatestProcessDefinitions(String token)
Get list of registered process definitions.
|
List<TaskInstance> |
findPooledTaskInstances(String token) |
List<ProcessInstance> |
findProcessInstances(String token,
long processDefinitionId) |
List<TaskInstance> |
findTaskInstances(String token,
long processInstanceId) |
List<TaskInstance> |
findUserTaskInstances(String token) |
static OKMWorkflow |
getInstance() |
ProcessDefinition |
getProcessDefinition(String token,
long processDefinitionId)
Gets a process definition from the engine by the identifier.
|
Map<String,List<FormElement>> |
getProcessDefinitionForms(String token,
long processDefinitionId)
Obtain a map with the forms defined in the process definition.
|
byte[] |
getProcessDefinitionImage(String token,
long processDefinitionId,
String node)
Get a visual representation of the process definition.
|
ProcessInstance |
getProcessInstance(String token,
long processInstanceId) |
TaskInstance |
getTaskInstance(String token,
long taskInstanceId) |
Token |
getToken(String token,
long tokenId) |
void |
registerProcessDefinition(String token,
InputStream is)
Register a new process definition in the workflow engine.
|
void |
resumeProcessInstance(String token,
long processInstanceId) |
void |
resumeTaskInstance(String token,
long taskInstanceId) |
void |
resumeToken(String token,
long tokenId) |
ProcessInstance |
runProcessDefinition(String token,
long processDefinitionId,
String uuid,
List<FormElement> variables)
Run a process definition to create a process instance: begins a worflow process.
|
ProcessInstance |
sendProcessInstanceSignal(String token,
long processInstanceId,
String transitionName) |
Token |
sendTokenSignal(String token,
long tokenId,
String transitionName) |
void |
setTaskInstanceActorId(String token,
long taskInstanceId,
String actorId) |
void |
setTaskInstanceValues(String token,
long taskInstanceId,
String transitionName,
List<FormElement> values) |
void |
setTokenNode(String token,
long tokenId,
String nodeName) |
void |
startTaskInstance(String token,
long taskInstanceId) |
void |
suspendProcessInstance(String token,
long processInstanceId) |
void |
suspendTaskInstance(String token,
long taskInstanceId) |
void |
suspendToken(String token,
long tokenId) |
public static OKMWorkflow getInstance()
public void registerProcessDefinition(String token, InputStream is) throws ParseException, RepositoryException, DatabaseException, WorkflowException, IOException
WorkflowModule
registerProcessDefinition
in interface WorkflowModule
token
- The session authorization token.is
- Input stream where process definition can be read.ParseException
- If there is an error parsing the forms.xml file.RepositoryException
- If there is a general repository error.DatabaseException
- If there is a general database error.WorkflowException
- If there is any workflow engine error.IOException
public void deleteProcessDefinition(String token, long processDefinitionId) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
deleteProcessDefinition
in interface WorkflowModule
token
- The session authorization token.processDefinitionId
- Process definition identifier.RepositoryException
- If there is a general repository error.DatabaseException
- If there is a general database error.WorkflowException
- If there is any workflow engine error.public ProcessDefinition getProcessDefinition(String token, long processDefinitionId) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
getProcessDefinition
in interface WorkflowModule
token
- The session authorization token.processDefinitionId
- Process definition identifier.RepositoryException
- If there is a general repository error.DatabaseException
- If there is a general database error.WorkflowException
- If there is any workflow engine error.public byte[] getProcessDefinitionImage(String token, long processDefinitionId, String node) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
getProcessDefinitionImage
in interface WorkflowModule
token
- The session authorization token.processDefinitionId
- Process definition identifier.node
- Mark the designed node as active, if not null.RepositoryException
- If there is a general repository error.DatabaseException
- If there is a general database error.WorkflowException
- If there is any workflow engine error.public Map<String,List<FormElement>> getProcessDefinitionForms(String token, long processDefinitionId) throws ParseException, RepositoryException, DatabaseException, WorkflowException
WorkflowModule
getProcessDefinitionForms
in interface WorkflowModule
token
- The session authorization token.processDefinitionId
- Process definition identifier.ParseException
- If there is an error parsing the forms.xml file.RepositoryException
- If there is a general repository error.DatabaseException
- If there is a general database error.WorkflowException
- If there is any workflow engine error.public ProcessInstance runProcessDefinition(String token, long processDefinitionId, String uuid, List<FormElement> variables) throws WorkflowException, AccessDeniedException, RepositoryException, DatabaseException
WorkflowModule
runProcessDefinition
in interface WorkflowModule
token
- The session authorization token.processDefinitionId
- Process definition identifier.uuid
- Node identifier associated with the created process instance.variables
- A list of form elements with variable definitions.WorkflowException
- If there is any workflow engine error.RepositoryException
- If there is a general repository error.DatabaseException
- If there is a general database error.AccessDeniedException
public ProcessInstance sendProcessInstanceSignal(String token, long processInstanceId, String transitionName) throws RepositoryException, DatabaseException, WorkflowException
sendProcessInstanceSignal
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void endProcessInstance(String token, long processInstanceId) throws RepositoryException, DatabaseException, WorkflowException
endProcessInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void deleteProcessInstance(String token, long processInstanceId) throws RepositoryException, DatabaseException, WorkflowException
deleteProcessInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<ProcessInstance> findProcessInstances(String token, long processDefinitionId) throws RepositoryException, DatabaseException, WorkflowException
findProcessInstances
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<ProcessDefinition> findAllProcessDefinitions(String token) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
findAllProcessDefinitions
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<ProcessDefinition> findLatestProcessDefinitions(String token) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
findLatestProcessDefinitions
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public ProcessDefinition findLastProcessDefinition(String token, String name) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
findLastProcessDefinition
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<ProcessDefinition> findAllProcessDefinitionVersions(String token, String name) throws RepositoryException, DatabaseException, WorkflowException
WorkflowModule
findAllProcessDefinitionVersions
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public ProcessInstance getProcessInstance(String token, long processInstanceId) throws RepositoryException, DatabaseException, WorkflowException
getProcessInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void suspendProcessInstance(String token, long processInstanceId) throws RepositoryException, DatabaseException, WorkflowException
suspendProcessInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void resumeProcessInstance(String token, long processInstanceId) throws RepositoryException, DatabaseException, WorkflowException
resumeProcessInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void addProcessInstanceVariable(String token, long processInstanceId, String name, Object value) throws RepositoryException, DatabaseException, WorkflowException
addProcessInstanceVariable
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void deleteProcessInstanceVariable(String token, long processInstanceId, String name) throws RepositoryException, DatabaseException, WorkflowException
deleteProcessInstanceVariable
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<TaskInstance> findUserTaskInstances(String token) throws RepositoryException, DatabaseException, WorkflowException
findUserTaskInstances
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<TaskInstance> findPooledTaskInstances(String token) throws RepositoryException, DatabaseException, WorkflowException
findPooledTaskInstances
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public List<TaskInstance> findTaskInstances(String token, long processInstanceId) throws RepositoryException, DatabaseException, WorkflowException
findTaskInstances
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void setTaskInstanceValues(String token, long taskInstanceId, String transitionName, List<FormElement> values) throws RepositoryException, DatabaseException, WorkflowException
setTaskInstanceValues
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void addTaskInstanceComment(String token, long taskInstanceId, String message) throws RepositoryException, DatabaseException, WorkflowException
addTaskInstanceComment
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public TaskInstance getTaskInstance(String token, long taskInstanceId) throws RepositoryException, DatabaseException, WorkflowException
getTaskInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void setTaskInstanceActorId(String token, long taskInstanceId, String actorId) throws RepositoryException, DatabaseException, WorkflowException
setTaskInstanceActorId
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void addTaskInstanceVariable(String token, long taskInstanceId, String name, Object value) throws RepositoryException, DatabaseException, WorkflowException
addTaskInstanceVariable
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void deleteTaskInstanceVariable(String token, long taskInstanceId, String name) throws RepositoryException, DatabaseException, WorkflowException
deleteTaskInstanceVariable
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void startTaskInstance(String token, long taskInstanceId) throws RepositoryException, DatabaseException, WorkflowException
startTaskInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void endTaskInstance(String token, long taskInstanceId, String transitionName) throws RepositoryException, DatabaseException, WorkflowException
endTaskInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void suspendTaskInstance(String token, long taskInstanceId) throws RepositoryException, DatabaseException, WorkflowException
suspendTaskInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void resumeTaskInstance(String token, long taskInstanceId) throws RepositoryException, DatabaseException, WorkflowException
resumeTaskInstance
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public Token getToken(String token, long tokenId) throws RepositoryException, DatabaseException, WorkflowException
getToken
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void addTokenComment(String token, long tokenId, String message) throws RepositoryException, DatabaseException, WorkflowException
addTokenComment
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void suspendToken(String token, long tokenId) throws RepositoryException, DatabaseException, WorkflowException
suspendToken
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void resumeToken(String token, long tokenId) throws RepositoryException, DatabaseException, WorkflowException
resumeToken
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public Token sendTokenSignal(String token, long tokenId, String transitionName) throws RepositoryException, DatabaseException, WorkflowException
sendTokenSignal
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void setTokenNode(String token, long tokenId, String nodeName) throws RepositoryException, DatabaseException, WorkflowException
setTokenNode
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
public void endToken(String token, long tokenId) throws RepositoryException, DatabaseException, WorkflowException
endToken
in interface WorkflowModule
RepositoryException
DatabaseException
WorkflowException
Copyright © 2015. All Rights Reserved.