OKMWorkflow

From OpenKM Documentation
Revision as of 16:59, 15 September 2010 by Pavila (talk | contribs)

Jump to: navigation, search

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.