Workflow API

Workflow API enables you to perform the following operations:

  • Instance creation
  • Get an instance information
  • Getting the list of available commands
  • Command execution
  • Getting the list of available states to set
  • Set State
  • Process existence
  • Single instance deletion
  • Multiple instance deletion
  • Inbox folder
  • Outbox folder
  • Inbox folder recalc
  • Get a Form by BusinessFlow

Each request requires the following URL format: /workflowapi/{operation}/{id}. Also, you might set operation and id as query parameters.

For example the following HTTP requests are equal:

/workflowapi/createinstance/00000000-0000-0000-0000-000000000000 /workflowapi/createinstance?processId=00000000-0000-0000-0000-000000000000 /workflowapi?operation=createinstance&processId=00000000-0000-0000-0000-000000000000

OpenAPI 2.0 (Swagger) workflow server description

Response

Workflow Server sends the following response to any request submitted to the Workflow API methods.

{ "success": true/false, "data": "", "error": "", "message": "" }

Instance creation

Creates the instance of the process. Please note that the parameters in query will be passed to the IWorkflowGenerator instance. In most cases you don't need it. If you want to pass initial parameters to the process, use a POST query and specify these parameters as form data.

URL: /workflowapi/createinstance/{processId}

Parameters:

schemeCode String Required Code of workflow scheme
identityId String Not required User's identifier
impersonatedIdentityId String Not required Deputy's identifier
schemeParameters JSON Not required Parameters for creating a scheme.
parameters JSON Not required Initial process parameters. Use a POST query and specify these parameters as form data.

Get instance information

URL: /workflowapi/getinstanceinfo/{processId}

Parameters:

None

Getting the list of available commands

Returns a list of available commands for the current state of the process and known user Id.

URL: /workflowapi/getavailablecommands/{processId}

Parameters:

identityid String Not required User's identifier
impersonatedIdentityId String Not required Deputy's identifier

Command execution

This call will execute the command. If you want to pass command parameters to the process, use a POST query and specify these parameters as form data.

URL: /workflowapi/executecommand/{processId}

Parameters:

command String Required Command name
identityid String Not required User's identifier
impersonatedIdentityId String Not required Deputy's identifier
parameters JSON Not required Use a POST query and specify these parameters as form data.

Getting the list of available states to set

Returns the list of available states, that can be set through the SetState function.

URL: /workflowapi/getavailablestatetoset/{processId}

Parameters:

None

Set state

This call will set state for the process.

URL: /workflowapi/setstate/{processId}

Parameters:

state String Required State name
identityid String Not required User's identifier
impersonatedIdentityId String Not required Deputy's identifier
parameters JSON Not required Use a POST query and specify these parameters as form data.

Process existence

Check if process exists

URL: /workflowapi/isexistprocess/{processId}

Parameters:

None

Single instance deletion

Deletes a single instance of the process.

URL: /workflowapi/deleteinstance/{processId}

Parameters:

None

Multiple instances deletion

Deletes multiple instances of the processes.

URL: /workflowapi/deleteinstances/

Parameters:

processids Array of GUID Required Ids of processes to be deleted

Inbox folder

Return a list of inbox items

URL: /workflowapi/inbox

Parameters:

identityid String Not required User's identifier
processid Guid Not required Process's identifier

Outbox folder

Return a list of outbox items

URL: /workflowapi/outbox

Parameters:

identityid String Not required User's identifier
processid Guid Not required Process's identifier

Recalc Inbox folder

Return a list of inbox items

URL: /workflowapi/inboxrecalc

Parameters:

processids Array of Guid Not required Process's identifiers

Get a Form by BusinessFlow

Return a form according to the BusinessFlow and Workflow State.

URL: /workflowapi/getformbyflow/{name}

Parameters:

processid Guid Not required Process's identifier
identityid String Not required User's identifier
Top