Incoming Webhooks

Overview

WorkflowGen features an incoming webhook application that allows users to interact with WorkflowGen from external sources by exchanging JSON payloads using HTTP POST requests. The application supports multiple types of operations, such as creating a new request, completing an action, and some process deployment operations like creating a new process from an XPDL.

Technical requirements

In addition to the standard WorkflowGen installation, the following components are required:

For information on the installation procedure, see the WorkflowGen Technical Guide.

Configuration

Maximum query content length

The maximum query content length for incoming webhooks can be set by configuring the maxAllowedContentLength property in the WorkflowGen web.config file. The following example shows how to configure this property as 1 MB (note that the value should always be specified in bytes, so the value in the example is 1,024,000 bytes). The default value is 30,000,000 bytes.

<system.webServer> 
    <security> 
        <requestFiltering> 
            <requestLimits maxAllowedContentLength="1024000" /> 
        </requestFiltering> 
    </security> 
</system.webServer>

Input file allowed folders

You can configure the local or remote folder paths where files used by FILE type parameters are located using the Input file allowed folders setting In the Webhooks section on the Configuration Panel Integration tab. (Alternately, you can add the folder names separated by commas to the HooksInputFileAllowedFolders parameter in the WorkflowGen web.config file.)

When using file uploads, you don't need to include the original file folder.

To disallow input file allowed, leave this field empty (or the parameter undefined). To allow certain folders only, enter comma-separated values according to the table below:

Value

Description

Empty

No folders allowed

*

All folders allowed

c:\*

All folders on drive c:

c:\Inetpub\*

All subfolders in a specific folder

c:\Inetpub\folder*

All c:\Inetpub folders whose names start with folder 📌 Examples:

  • c:\Inetpub\folder1

  • c:\Inetpub\folder1\abc

  • c:\Inetpub\folder2

c:\Inetpub\folder2\abc\def

Specific folder only

Input file allowed HTTP URLs

You can configure allowed HTTP URLs for input files using the Input file allowed HTTP URLs setting in the Webhooks section on the Control Panel Integration tab. (Alternately, you can add the folder names separated by commas to the HooksInputFileAllowedHttpUrls parameter in the WorkflowGen web.config file.)

To disallow file uploads using HTTP and/or HTTPS URLs, leave the field empty (or the parameter undefined). To allow certain URLs only, enter comma-separated values according to the table below:

Value

Description

Empty

No HTTP or HTTPS URLs allowed

*

All HTTP and HTTPS URLs allowed

https://*

HTTPS URLs only

http://*

HTTP URLs only

http://mydomain/*

HTTP from a specific domain only

http://mydomain/folder/*

HTTP from a specific folder only

http://mydomain/folder*

All files and folders whose names start with folder 📌 Examples:

  • http://mydomain/folderfile.jpg

  • http://mydomain/folder/file.jpg

  • http://mydomain/folder2/file.jpg

http://mydomain/folder/file.jpg

Specific file only

Maximum input file size

In the Webhooks section on the Integration tab in the Administration Module Configuration Panel, enter the maximum input file size in kilobytes in the Maximum input file size (kB) field.

Alternately, you can set the maximum input file content size in kilobytes as the value of the HooksMaxInputFileSize parameter in the WorkflowGen web.config file.

Maximum input file content size

When working with FILE type parameters content encoded in base64, you must enter the maximum input file content size in kilobytes in the Maximum input file content size (kB) field in the Webhooks section on the Integration tab in the Administration Module Configuration Panel.

Alternately, you can set the maximum input file content size in kilobytes as the value of the HooksMaxInputFileContentSize parameter in the WorkflowGen web.config file.

FILE type data content is only recommended for small files under 1 MB.

Performance tuning

WorkflowGen is installed with the following default webhooks settings (located under iisnode in \wfgen\hooks\web.config):

nodeProcessCountPerApplication="1"
maxConcurrentRequestsPerProcess="1024"

With these settings, only one node.exe instance will handle HTTP requests. This should be sufficient in most cases, but you can optimize performance if needed by adjusting these values based on the number of potential concurrent requests.

Creating an incoming webhook application

To create a new incoming webhook application in your WorkflowGen application, click the Add Application button on the Applications page. Then, choose Incoming webhook from the Application type drop-down list, enter the Name and Description, and click Save.

The Applications page will now display your incoming webhook application information, including the application URL. This is the URL you should use to send WorkflowGen incoming webhooks. The last component of this URL corresponds to a token that WorkflowGen will use to identify your incoming webhooks.

You should fill in the Impersonate username textbox with the WorkflowGen username you use to perform your desired operations. Be aware that your impersonated user must have your asked-operation-required rights to complete the action; if not, you will receive a security error on your response payload. As well, if the impersonate username is not set, the workflow engine service default identity will be used (as defined in the Security section on the Integration tab in the Configuration Panel).

  • The generated URL and its associated token must remain private and not exposed to end-users in client-side (in JavaScript, for example). You should treat the token with the same level of security as you would a password.

  • If the token used in the incoming webhook URL is missing or invalid, a 404 status code will be returned. If the associated user is invalid, archived, or inactive, a 403 status code will be returned. In both cases, the response will contain a descriptive error message.

Sending data in JSON

The incoming webhook application receives your HTTP POST request payload formatted as a JSON object.

Using the URL provided, you can post HTTP requests from external applications (e.g. Postman) to WorkflowGen in order to execute the available operations in your WorkflowGen application. For operations that require you to provide an object ID, the object ID value can be retrieved by using the GraphQL API. In most cases, object numbers can be used instead of IDs in operation payloads.

In case of an error, you will get a response payload providing error details such as:

{
  "error": "Advantys.Workflow.ServiceFacade: CreateRequest error: A process ID or name is required"
}

Curl example

The requests should respect the structure shown in this example, where operation refers to the name of the operation to execute, and args contains the input node that groups all of the request parameters to perform the operation.

To create a new request, the processName parameter is required. The processVersion parameter is optional and is used to find the correct process you want to use to create your request.

Request payload:

curl -u yourusername -X POST -H "Content-Type: application/json" -d '{
  "operation": "createRequest",
  "args": {
    "input": {
      "processName": "2_LEVELS_APPROVAL",
      "processVersion": 1
    }
  }
}' http://localhost/wfgen/hooks/yourtoken

Response payload:

The response payload will be structured as follows:

{
  "clientMutationId": null,
  "requestId": "UmVxdWVzdDoxNzI4",
  "number": 10,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Parameters

Parameter

Description

processName

Process name (required)

processVersion

Process version, used to find the correct process you want to use to create the request

clientMutationId

This parameter will be null if the request creator did not define it in the request payload

requestId

ID of newly created request

number

Number of newly created request

onBehalfOf

This parameter contains the delegator ID; however, if the request was not created in delegation mode, its value will be null

onBehalfOfUserName

This parameter contains the delegator username; however, if the request was not created in delegation mode, its value will be null

OpenAPI v2 endpoints

As of version 7.17.0, incoming webhooks now offer a new endpoint that supports the OpenAPI v2 specification for operation definitions and another endpoint for operation execution. This allows for seamless integration with other OpenAPI-ready solutions such as Swagger, Microsoft Flow, Azure Logic Apps and Postman.

Webhook operation definitions

Use this endpoint to retrieve webhook operation definitions based on the OpenAPI v2 specification (in JSON format).

URI: /wfgen/hooks/openapi/v2

Webhook operation execution

Use this endpoint to execute a webhook operation using HTTP POST, replacing :operation with the name of the incoming webhook operation (e.g. createRequest).

URI: /wfgen/hooks/operations/:operation

Required parameters

  • :operation: Name of the incoming webhook operation defined in the URI ✏️ Note: The operation name is not required inside the request payload.

  • x-wfgen-hooktoken: Webhook token value specified in the HTTP request header, which is the same token value as used in a classic incoming webhooks URL

Other required or optional parameters specific to the webhook operation might be needed.

Request operations

Create a new request

To create a new request from the webhooks API, make sure that sub-process mode is enabled with public access on the target process. (See the Process form section in the WorkflowGen Administration Guide for more information.)

Request payload:

{
  "operation": "createRequest",
  "args": {
    "input": {
      "processName": "2_LEVELS_APPROVAL",
      "processVersion": 1
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "requestId": "UmVxdWVzdDoxNzI4",
  "number": 1728,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

A parameter's array can be included in the createRequest operation payload. Be aware that a data with the same name and data type must previously exist in the process for each parameter in the array to store the parameter's value. The following example shows how to send parameters corresponding to the four supported data types (TEXT, NUMERIC, DATETIME, and FILE).

Request payload:

{
  "operation": "createRequest",
  "args": {
    "input": {
      "processName": "2_LEVELS_APPROVAL",
      "processVersion": 1,
      "parameters": [
        {
          "name": "TEXT",
          "textValue": "My text parameter"
        },
        {
          "name": "NUMERIC",
          "numericValue": 5
        },
        {
          "name": "DATE",
          "dateTimeValue": "2017-02-23T20:46:00Z"
        },
        {
          "name": "FILE", 
          "fileValue": {
            "name": "TestFile.txt",
            "contentType": "text/plain",
            "size": 616,
            "url": "file:///c:/TestFile.txt",
            "updatedAt": "2017-02-21T15:06:38Z"
          }
        }
      ]
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "requestId": "UmVxdWVzdDoxNzY1",
  "number": 1765,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

processName

String

Process name (required)

processVersion

Int

Process version, used to find the correct process you want to use to create the request

clientMutationId

String

Client mutation identifier

isTest

Boolean

Indicates if the process is in test

onBehalfOf

Base64-encoded string

User identifier that is used by the user to perform the mutation on behalf of another person, with the pattern [User:1] where 1 is the user identifier from the database

processId

Base64-encoded string

Process identifier with the pattern [Process:1] where 1 is the process identifier from the database

parameters

Array

Array of parameters (see Parameter definitions)

Update a request dataset

A request dataset context can be updated by adding a parameter array. In this case a request number or a request ID should be provided.

This operation requires users to have system access to perform it. This can be configured in the System operations allowed users field under Security on the Integration tab in the Configuration Panel.

Request payloads:

{
  "operation": "updateRequestDataset",
  "args": {
    "input": {
      "number": 1750,
      "parameters": [
        {
          "name": "NEW_PARAMETER",
          "textValue": "My parameter"
        }
      ]
    }
  }
}
{
  "operation": "updateRequestDataset",
  "args": {
    "input": {
      "id": "UmVxdWVzdDoxMDAw",
      "parameters": [
        {
          "name": "NEW_PARAMETER",
          "textValue": "My parameter"
        }
      ]
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "requestId": "UmVxdWVzdDoxNzIx",
  "parameters": [
    {
      "name": "NEW_PARAMETER",
      "textValue": "My parameter"
    }
  ]
}

For more information on FILE parameter manipulations when sent within incoming webhook payloads, see the File upload section.

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

number

Int

Request number

id

Base64-encoded string

Request identifier with the pattern [Request:1] where 1 is the request identifier from the database

parameters

Array

Array of parameters (see Parameter definitions)

Cancel a request

You can cancel a request by using the request number or the request ID.

Request payloads:

{
  "operation": "cancelRequest",
  "args": {
    "input": {
      "number": 1728
    }
  }
}
{
  "operation": "cancelRequest",
  "args": {
    "input": {
      "id": "UmVxdWVzdDoxNzI4"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "requestId": "UmVxdWVzdDoxNzI4",
  "number": 1728,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

number

Int

Request number

id

Base64-encoded string

Request identifier with the pattern [Request:1] where 1 is the request identifier from the database

notifyParticipant

Boolean

Indicates if participant members have to be notified

onBehalfOf

Base64-encoded string

User identifier that is used by the user to perform the mutation on behalf of another person, with the pattern [User:1] where 1 is the user identifier from the database

Delete a request

A request can be deleted by using the request number or the request ID.

Request payloads:

{
  "operation": "deleteRequest",
  "args": {
    "input": {
      "number": 1728
    }
  }
}
{
  "operation": "deleteRequest",
  "args": {
    "input": {
      "id": "UmVxdWVzdDoxNzI4"
    }
  }
}

Response payload:

{
  "clientMutationId": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

id

Base64-encoded string

Request identifier with the pattern [Request:1] where 1 is the request identifier from the database

number

Int

Request number

Action operations

Complete an action

To complete an action, provide the request number and the action number, or the action ID.

Request payloads:

{
  "operation": "completeAction",
  "args": {
    "input": {
      "requestNumber": 1765,
      "number": 1,
      "parameters": [
        {
          "name": "NEW_PARAMETER",
          "textValue": "My parameter"
        }
      ]
    }
  }
}
{
  "operation": "completeAction",
  "args": {
    "input": {
      "id": "QWN0aW9uOjE3NTktLS0x"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionId": "QWN0aW9uOjE3NTktLS0x",
  "number": 1,
  "requestNumber": 1759,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

To complete an action, a parameter array can be included in the request payload arguments.

Request payload:

{
  "operation": "completeAction",
  "args": {
    "input": {
      "requestNumber": 1765,
      "number": 1,
      "parameters": [
        {
          "name": "NEW_PARAMETER",
          "direction": "IN",
          "type": "TEXT",
          "textValue": "My parameter"
        }
      ]
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionId": "QWN0aW9uOjE3NjUtLS0x",
  "number": 1,
  "requestNumber": 1765,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

requestNumber

Int

Request number

number

Int

Action number

activityName

String

Activity name

clientMutationId

String

Client mutation identifier

isTest

Boolean

Indicates if the process is in test

onBehalfOf

Base64-encoded string

User identifier that is used by the user to perform the mutation on behalf of another person, with the pattern [User:1] where 1 is the user identifier from the database

id

Base64-encoded string

Action identifier with the pattern [Action:1---2] where 1 is the request identifier from the database and 2 is the action identifier from the database

parameters

Array

Array of parameters (see Parameter definitions)

Complete a form action

Request payload:

{
  "operation": "completeFormAction",
  "args": {
    "input": {
      "requestNumber": 1765,
      "number": 1,
      "parameters": [
        {
          "name": "NEW_PARAMETER",
          "textValue": "My parameter"
        }
      ]
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionId": "QWN0aW9uOjE3NjUtLS0x",
  "number": 1,
  "requestNumber": 1765,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

activityName

String

Activity name

id

Base64-encoded string

Action identifier with the pattern [Action:1---2] where 1 is the request identifier from the database and 2 is the action identifier from the database

number

Int

Action number

onBehalfOf

Base64-encoded string

User identifier used by the user to perform the mutation on behalf of another person with the pattern [User:1] where 1 is the user identifier from the database

parameters

Array

Array of parameters (see Parameter definitions)

requestNumber

Int

Request number

Cancel an action

To cancel an action, provide the request number and the action number, or the action ID. The following conditions must be met:

  • The viewer and the user (if they don't share the same identity, as in delegation mode) must have access to the request.

  • The action must be open.

  • The action must have a cancel or default exception defined in the transition.

  • The viewer is:

    • an administrator or process folder manager OR

    • a supervisor with cancellation rights OR

    • the action assignee.

Request payloads:

{
  "operation": "cancelAction",
  "args": {
    "input": {
      "requestNumber": 1759,
      "number": 2
    }
  }
}
{
  "operation": "cancelAction",
  "args": {
    "input": {
      "id": "QWN0aW9uOjEwMDAtLS0x"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionId": "QWN0aW9uOjE3NTktLS0y",
  "number": 2,
  "requestNumber": 1759,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

exception: {

message

source

String

Exception:

  • Exception message

  • Exception source

id

Base64-encoded string

Action identifier with the pattern [Action:1---2] where 1 is the request identifier from the database and 2 is the action identifier from the database

number

Int

Action number

onBehalfOf

Base64-encoded string

User identifier used by the user to perform the mutation on behalf of another person with the pattern [User:1] where 1 is the user identifier from the database

requestNumber

Int

Request number

type

Cancellation type:

  • CANCEL: Cancellation exception

  • ERROR: Error exception

Cancel a request's actions by name

All of the actions with the same name in a request can be cancelled at the same time by using their name in this operation payload. The following conditions are met:

  • The viewer and the user (if they do not share the same identity, as in delegation mode) must have access to the request.

  • The action must be open.

  • The action must have a cancel or default exception defined in the transition.

  • The viewer is:

    • an administrator or a process folder manager OR

    • a supervisor with cancellation rights OR

    • the action assignee.

Request payload:

{
  "operation": "cancelRequestActionsByName",
  "args": {
    "input": {
      "requestNumber": 4399,
      "activityName": "Initiates"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionIds": [
    "QWN0aW9uOjQzOTktLS0x",
    "QWN0aW9uOjQzOTktLS0y",
    "QWN0aW9uOjQzOTktLS0z"
  ],
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

activityName

String

Activity name

clientMutationId

String

Client mutation identifier

exception: {

message

source

String

Exception:

  • Exception message

  • Exception source

onBehalfOf

Base64-encoded string

User identifier used by the user to perform the mutation on behalf of another person with the pattern [User:1] where 1 is the user identifier from the database

requestNumber

Int

Request number

type

Cancellation type:

  • CANCEL: Cancellation exception

  • ERROR: Error exception

Assign an action

To assign an action, provide the request number and the action number, or the action ID; you must also provide the assigneeUserName or the assigneeId.

Request payloads:

{
  "operation": "assignAction",
  "args": {
    "input": {
      "requestNumber": 1751,
      "number": 2,
      "assigneeUserName": "johnsmith"
    }
  }
}
{
  "operation": "assignAction",
  "args": {
    "input": {
      "id": "QWN0aW9uOjEwMDAtLS0x",
      "assigneeId": "QXNzaWduZWU6MQ=="
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionId": "QWN0aW9uOjE3NTEtLS0y",
  "number": 2,
  "requestNumber": 1751,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

assigneeId

Base64-encoded string

User identifier of the person assigned to the action with the pattern [User:1] where 1 is the user identifier from the database

clientMutationId

String

Client mutation identifier

id

Base64-encoded string

Action identifier with the pattern [Action:1---2] where 1 is the request identifier from the database and 2 is the action identifier from the database

number

Int

Action number

onBehalfOf

Base64-encoded string

User identifier used by the user to perform the mutation on behalf of another person with the pattern [User:1] where 1 is the user identifier from the database

requestNumber

Int

Request number

Cancel an action assignment

To cancel an action assignment, you should provide the request number and the action number, or the action ID.

Request payloads:

{
  "operation": "cancelActionAssignment",
  "args": {
    "input": {
      "requestNumber": 1751,
      "number": 2
    }
  }
}
{
  "operation": "cancelActionAssignment",
  "args": {
    "input": {
      "id": "QWN0aW9uOjEwMDAtLS0x"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "actionId": "QWN0aW9uOjE3NTEtLS0y",
  "number": 2,
  "requestNumber": 1751,
  "onBehalfOf": null,
  "onBehalfOfUserName": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

id

Base64-encoded string

Action identifier with the pattern [Action:1---2] where 1 is the request identifier from the database and 2 is the action identifier from the database

number

Int

Action number

onBehalfOf

Base64-encoded string

User identifier used by the user to perform the mutation on behalf of another person with the pattern [User:1] where 1 is the user identifier from the database

requestNumber

Int

Request number

End-user operations

Create a new favorite

The incoming webhook application lets users add processes and views to their favorites lists using the process or view IDs.

Request payload:

{
  "operation": "createFavorite",
  "args": {
    "input": {
      "itemId": "UHJvY2VzczoxMTA="
    }
  }
}

The above code will create a favorite using the process or view description, but adding a custom description is also possible, as shown in the following example:

Request payload:

{
  "operation": "createFavorite",
  "args": {
    "input": {
      "itemId": "UHJvY2VzczoxMTA=",
      "description": "My custom description"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "favoriteId": "RmF2b3JpdGU6MTQ="
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

description

String

Favorite description

itemId

Base64-encoded string

Favorite item identifier with the pattern [Favorite:1] where 1 is the favorite identifier from the database

Update a favorite

The incoming webhook application lets users update an existing favorite process or view by using its favorite ID.

Request payload:

{
  "operation": "updateFavorite",
  "args": {
    "input": {
      "id": "RmF2b3JpdGU6MTQ=",
      "description": "Updated description"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "favoriteId": "RmF2b3JpdGU6MTQ="
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

description

String

Favorite description

itemId

Base64-encoded string

Favorite item identifier with the pattern [Favorite:1] where 1 is the favorite identifier from the database

Delete a favorite

The incoming webhook application lets users delete an existing favorite process or view from their favorites list by using its favorites ID.

Request payload:

{
  "operation": "deleteFavorite",
  "args": {
    "input": {
      "id": "RmF2b3JpdGU6MTQ="
    }
  }
}

Response payload:

{
  "clientMutationId": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

itemId

Base64-encoded string

Favorite item identifier with the pattern [Favorite:1] where 1 is the favorite identifier from the database

Add a comment

The incoming webhook application lets users add comments to requests.

Request payload:

{
  "operation": "addComment",
  "args": {
    "input": {
      "subjectId": "UmVxdWVzdDo0MzY1",
      "message": "This is my comment"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "commentId": "Q29tbWVudDo0MzY1LS0tMg=="
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

message

String

New comment message

subjectId

Base64-encoded string

Identifier of the object to which the comment with be added with the pattern [Request:1] where 1 is the request identifier from the database

Update a comment

Users can update comments if they are administrators, process manager of the process or process supervisor, or standard users who are members of the process participants, have write permissions, and are the comment author.

Request payload:

 {
    "operation": "updateComment",
    "args": {
    "input": {
      "id": "Q29tbWVudDo0MzY1LS0tMg==",
      "message": "This is my updated comment"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "commentId": "Q29tbWVudDo0MzY1LS0tMg=="
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

id

Base64-encoded string

Comment identifier with the pattern [Comment:1---2] where 1 is the request identifier from the database and 2 is the comment identifier from the database

message

String

Updated comment message

Remove a comment

The incoming webhook application lets users remove comments from requests.

Request payload:

{
  "operation": "removeComment",
  "args": {
    "input": {
      "id": "Q29tbWVudDo0MzY1LS0tMg=="
    }
  }
}

Response payload:

{
  "clientMutationId": null
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

id

Base64-encoded string

Comment identifier with the pattern [Comment:1---2] where 1 is the request identifier from the database and 2 is the comment identifier from the database

Category operations

Create a new category

Only administrators can create a category.

Request payload:

{
  "operation": "createCategory",
  "args": {
    "input": {
      "name": "Human resources",
      "description": "Human resources category"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "categoryId": "Q2F0ZWdvcnk6Mg=="
}

Properties

Property

Type

Description

clientMutationid

String

Client mutation identifier

description

String

Category description

name

String

Category name

Update a category

Only administrators can update a category.

Request payload:

{
  "operation": "updateCategory",
  "args": {
    "input": {
      "id":  "Q2F0ZWdvcnk6Mg==",
      "name": "My category updated name"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "categoryId": "Q2F0ZWdvcnk6Mg=="
}

Properties

Property

Type

Description

clientMutationid

String

Client mutation identifier

description

String

Category description

id

String

Category identifier with the pattern [Category:1] where 1 is the category identifier from the database

name

String

Category name

Delete a category

Only administrators can delete a category.

Request payload:

{
  "operation": "deleteCategory",
  "args": {
    "input": {
      "id":  "Q2F0ZWdvcnk6Mg=="
    }
  }
}

Response payload:

{
  "clientMutationId": null
}

Properties

Property

Type

Description

clientMutationid

String

Client mutation identifier

id

String

Category identifier with the pattern [Category:1] where 1 is the category identifier from the database

Process folder operations

Create a new process folder

Only administrators can create a process folder.

Request payload:

{
  "operation": "createProcessFolder",
  "args": {
    "input": {
      "name": "Human Resources processes folder",
      "description": "Human Resources processes folder",
      "managerId": "R2xvYmFsUGFydGljaXBhbnQ6MQ=="
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "processFolderId": "UHJvY2Vzc0ZvbGRlcjoz"
}

Properties

Property

Type

Description

clientMutationid

String

Client mutation identifier

description

String

Process folder description

name

String

Process folder name

managerId

Base64-encoded string

Process folder manager identifier with the pattern [GlobalParticipant:1] where 1 is the global participant identifier from the database

Update a process folder

Only administrators and the process folder manager can update a process folder.

Request payload:

{
  "operation": "updateProcessFolder",
  "args": {
    "input": {
      "id": "UHJvY2Vzc0ZvbGRlcjoz",
      "name": "Updated process folder name"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "processFolderId": "UHJvY2Vzc0ZvbGRlcjoz"
}

Properties

Property

Type

Description

clientMutationid

String

Client mutation identifier

description

String

Process folder description

id

Base64-encoded string

Process folder identifier with the pattern [ProcessFolder:1] where 1 is the process folder identifier from the database

name

String

Process folder name

managerId

Base64-encoded string

Process folder manager identifier with the pattern [GlobalParticipant:1] where 1 is the global participant identifier from the database

Delete a process folder

Only administrators can delete a process folder.

Request payload:

{
  "operation": "deleteProcessFolder",
  "args": {
    "input": {
      "id":  "UHJvY2Vzc0ZvbGRlcjoz"
    }
  }
}

Response payload:

{
  "clientMutationId": null
}

Properties

Property

Type

Description

clientMutationid

String

Client mutation identifier

id

Base64-encoded string

Process folder identifier with the pattern [ProcessFolder:1] where 1 is the process folder identifier from the database

Process operations

Create a new process

This operation creates a process from the process properties. The process name, description, and folder identifier or name are required.

Request payloads:

{
  "operation": "createProcess",
  "args": {
    "input": {
      "description": "My new process",
      "folderName": "DEFAULT",
      "name": "My new process"
    }
  }
}
{
  "operation": "createProcess",
  "args": {
    "input": {
      "fromProcessId": "UHJvY2Vzczoy"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "processId": "UHJvY2Vzczoy"
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

accessLevel

Process access level:

  • PRIVATE

  • PUBLIC

categoryNames

String

Process categories

description

String

Process description

folderId

Base64-encoded string

Process folder identifier with the pattern [ProcessFolder:1] where 1 is the process folder identifier from the database

folderName

String

Process folder name

fromProcessId

Base64-encoded string

Process identifier used in new version creation with the pattern [Process:1] where 1 is the process identifier from the database

helpEmail

String

Process help information email

helpText

String

Process help information text

helpUrl

URI

Process help information URL

isActionDataArchived

Boolean

Indicates if action's associated data is archived when a request is closed

isBuiltInForm

Boolean

Indicates if form management is built-in

isDatabaseStorageForFiles

Boolean

Indicates if file content is stored in the database

isSubProcess

Boolean

Indicates if sub-process mode is enabled

leadTime

Int

Process lead time

leadTimeUnit

Process lead time duration unit:

  • YEARS

  • MONTHS

  • DAYS

  • HOURS

  • MINUTES

  • SECONDS

leadTimeUseWorkingDays

Boolean

Indicates if working days/hours are used to compute the lead time

notifyRequesterOnClosure

Boolean

Indicates if the requester is notified upon request closure

name

String

Process name

notifyRequesterOnClosure

Boolean

Indicates if the requester is notified upon request closure

state

Process state:

  • DEV

  • TEST

  • ACTIVE

  • ARCHIVE

Create a new process from an XPDL

A process can be created from its XPDL definition.

Request payload:

{
  "operation": "createProcessFromXpdl",
  "args": {
    "input": {
      "addNewParticipantsAsGlobal": false,
      "addSelfToParticipant": true,
      "description": "My new process",
      "folderName": "DEFAULT",
      "name": "My new process",
      "xpdl": {
        "contentType": "text/xml",
        "name": "process.xml",
        "size": 123,
        "updatedAt": "2017-03-15T15:02:00Z",
        "url": "file:///c:/temp/process.xml"
      }
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "processId": "UHJvY2Vzczoy"
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

addNewParticipantsAsGlobal

Boolean

Specifies whether or not to import process participants as global participants (can only be used by users with an administrator profile)

addGlobalParticipantAssociations

Boolean

Specifies whether or not to import global participant associations

addSelfToParticipant

Boolean

Specifies whether or not to add the current user to process participants

folderId

Base64-encoded string

Process folder identifier with the pattern [ProcessFolder:1] where 1 is the process folder identifier from the database

folderName

String

Process folder name

fromProcessId

Base64-encoded string

Process identifier used when creating a new version with the pattern [Process:1] where 1 is the process identifier from the database

name

String

Process name

newVersionIfExists

Boolean

Creates a new version if the process already exists

state

Process state:

  • DEV

  • TEST

  • ACTIVE

  • ARCHIVE

useVersionNumber

Boolean

Specifies whether or not to import the process version number from the process definition

xpdl

FileInput

Process definition in XPDL format

Update a process

This operation updates process properties from the process identifier.

Request payload:

{
  "operation": "updateProcess",
  "args": {
    "input": {
      "id": "UHJvY2Vzczoy",
      "name": "New name"
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "processId": "UHJvY2Vzczoy"
}

Properties

Property

Type

Description

clientMutationId

String

Client mutation identifier

accessLevel

Process access level:

  • PRIVATE

  • PUBLIC

categoryNames

String

Process categories

description

String

Process description

folderId

Base64-encoded string

Process folder identifier with the pattern [ProcessFolder:1] where 1 is the process folder identifier from the database

folderName

String

Process folder name

helpEmail

String

Process help information email

helpText

String

Process help information text

helpUrl

URI

Process help information URL

id

Base64-encoded string

Process identifier with the pattern [Process:1] where 1 is the process identifier from the database

isActionDataArchived

Boolean

Indicates if action's associated data is archived when a request is closed

isBuiltInForm

Boolean

Indicates if form management is built-in

isDatabaseStorageForFiles

Boolean

Indicates if file content is stored in the database

isSubProcess

Boolean

Indicates if sub-process mode is enabled

leadTime

Int

Process lead time

leadTimeUnit

Process lead time duration unit:

  • YEARS

  • MONTHS

  • DAYS

  • HOURS

  • MINUTES

  • SECONDS

leadTimeUseWorkingDays

Boolean

Indicates if working days/hours are used to compute the lead time

notifyRequesterOnClosure

Boolean

Indicates if the requester is notified upon request closure

name

String

Process name

notifyRequesterOnClosure

Boolean

Indicates if the requester is notified upon request closure

state

Process state:

  • DEV

  • TEST

  • ACTIVE

  • ARCHIVE

Update a process from an XPDL

A process can be updated from its XPDL definition. The .xml file is uploaded by using the multipart file upload feature as shown below.

Request payload:

{
  "operation": "updateProcessFromXpdl",
  "args": {
    "input": {
      "id": "UHJvY2Vzczoy",
      "xpdl": {
        "contentType": "text/xml",
        "name": "process.xml",
        "size": 123,
        "updatedAt": "2017-03-15T15:02:00Z",
        "url": "file:///c:/temp/process.xml"
      }
    }
  }
}

Response payload:

{
  "clientMutationId": null,
  "processId": "UHJvY2Vzczoy"
}