Difference between revisions of "OKMWorkflow"
From OpenKM Documentation
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | __TOC__ | |
Methods related to workflow creation and management. | Methods related to workflow creation and management. | ||
− | |||
== void registerProcessDefinition(String token, byte[] pda) == | == void registerProcessDefinition(String token, byte[] pda) == | ||
Line 78: | Line 77: | ||
'''Throws''' | '''Throws''' | ||
* ''ParseException'' If there is an error parsing the forms.xml file. | * ''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. | ||
+ | |||
+ | == runProcessDefinition(String token, long processDefinitionId, String uuid, List<FormElement> vars) == | ||
+ | Run a process definition to create a process instance: begins a worflow process. | ||
+ | |||
+ | '''Parameters''' | ||
+ | * ''token'' The session authorization token. | ||
+ | * ''processDefinitionId'' Process definition identifier. | ||
+ | * ''uuid'' Node identifier associated with the created process instance. | ||
+ | * ''vars'' A list of form elements with variable definitions. | ||
+ | |||
+ | '''Returns''' | ||
+ | * The created process instance. | ||
+ | |||
+ | '''Throws''' | ||
* ''RepositoryException'' If there is a general repository error. | * ''RepositoryException'' If there is a general repository error. | ||
* ''DatabaseException'' If there is a general database error. | * ''DatabaseException'' If there is a general database error. | ||
* ''WorkflowException'' If there is any workflow engine error. | * ''WorkflowException'' If there is any workflow engine error. |
Latest revision as of 17:09, 16 January 2012
Contents
- 1 void registerProcessDefinition(String token, byte[] pda)
- 2 void deleteProcessDefinition(String token, long processDefinitionId)
- 3 ProcessDefinition getProcessDefinition(String token, long processDefinitionId)
- 4 getProcessDefinitionImage(String token, long processDefinitionId, String node)
- 5 getProcessDefinitionForms(String token, long processDefinitionId)
- 6 runProcessDefinition(String token, long processDefinitionId, String uuid, List<FormElement> vars)
Methods related to workflow creation and management.
void registerProcessDefinition(String token, byte[] pda)
Login into the repository and gets a token with user info for future API invocations
Parameters
- token - The session authorization token.
- pda - Byte array where process definition can be readed.
Returns
- None.
Throws
- 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.
void deleteProcessDefinition(String token, long processDefinitionId)
Delete a previously registered process definition.
Parameters
- token The session authorization token.
- processDefinitionId Process definition identifier.
Returns
- None.
Throws
- RepositoryException If there is a general repository error.
- DatabaseException If there is a general database error.
- WorkflowException If there is any workflow engine error.
ProcessDefinition getProcessDefinition(String token, long processDefinitionId)
Gets a process definition from the engine by the identifier.
Parameters
- token The session authorization token.
- processDefinitionId Process definition identifier.
Returns
- The process definition object.
Throws
- RepositoryException If there is a general repository error.
- DatabaseException If there is a general database error.
- WorkflowException If there is any workflow engine error.
getProcessDefinitionImage(String token, long processDefinitionId, String node)
Get a visual representation of the process definition.
Parameters
- token The session authorization token.
- processDefinitionId Process definition identifier.
- node Mark the designed node as active, if not null.
Returns
- A byte array with the image in JPG format.
Throws
- RepositoryException If there is a general repository error.
- DatabaseException If there is a general database error.
- WorkflowException If there is any workflow engine error.
getProcessDefinitionForms(String token, long processDefinitionId)
Obtain a map with the forms defined in the process definition.
Parameters
- token The session authorization token.
- processDefinitionId Process definition identifier.
Returns
- A map with the fields of each process definition form.
Throws
- 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.
runProcessDefinition(String token, long processDefinitionId, String uuid, List<FormElement> vars)
Run a process definition to create a process instance: begins a worflow process.
Parameters
- token The session authorization token.
- processDefinitionId Process definition identifier.
- uuid Node identifier associated with the created process instance.
- vars A list of form elements with variable definitions.
Returns
- The created process instance.
Throws
- RepositoryException If there is a general repository error.
- DatabaseException If there is a general database error.
- WorkflowException If there is any workflow engine error.