Documentation

Processes

rpa.type.*

Class Description Available from version
rpa.type.get({id: number}) Passes information about the process by its ID. Parameter:
  • id - process ID

Response:
{
    "type": {
        "id":1,
        "title":"Process name",
        "image":"list",
        "createdBy":1,
        "settings":[],
        "permissions":[
            {
                "id":"1",
                "entity":"TYPE",
                "entityId":"1",
                "accessCode":"UA",
                "action":"ITEMS_CREATE",
                "permission":"X"
            }
        ]
    }
}
  • title - process name
  • image - icon ID from list
  • createdBy - user ID, who created the process
  • settings - set of process settings
  • permissions - set of access permission settings for this process
rpa.type.list({select: ?[] = ['*'], order: ?{} = null, filter: ?{} = null, start: ?number = 0}) Method returns array of processes with their fields.
{
    "types": [
        {},
        {}
    ]
}
Parameters:
  • select - array of fields to be displayed. Displays all fields by default
  • order - list for sorting, where key - field, and value - ASC or DESC
  • filter - list for filtering
  • start - start for pagewise navigation
rpa.type.add({fields: {}}) The method creates new process and returns data similar to rpa.type.get response data. fields - list with process fields:
  • fields[title] - process name (required)
  • fields[image] - image for process from list
  • fields[settings] - list with arbitrary set of process settings
  • fields[permissions] - array with access permissions to this process

Important! Query must contain access permissions for process update


Example of query

This query creates new process under the name "My process". All users can create items for this process. Only user with ID 1 can modify this process settings

{
    "fields": {
        "title": "My process",
        "image": "list",
        "permissions": [
            {
                "accessCode": "UA",
                "permission": "X",
                "action": "ITEMS_CREATE"
            },
            {
                "accessCode": "U1",
                "permission": "X",
                "action": "MODIFY"
            },
        ]
    }
}
rpa.type.update({id: number, fields: {}}) Method updates the process with id and returns data in response, similar to response to a query rpa.type.get. Parameters:
  • id - process ID
  • fields - list with process fields. Fully similar to set from method rpa.type.add
rpa.type.delete({id: number}) Method deletes the process. Parameters:
  • id - process ID

User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2020, «Bitrix Inc.», 2020