Skip to content

Starting batch processing

POST

The request body contains a list of criteria (which were used to select contracts) and a list of processes.

Process is a set of documents executed in a specific order for each contract that falls under the sample of this process. Each document is associated with an operation that applies to this contract. That is, the process is the logic of executing certain documents that create operations for each contract.

Obtaining the necessary data and information for starting batch processing and step-by-step instructions for it:

  1. Finding the required process type identifier is performed using the method " Obtaining available process types " and its decryption from the directory " Process types "(address bar parameter).

  2. Getting a list of entities for filtering a selection of contracts (The value of the "object" parameter is passed in the request body in the criteria in the "entity" field ).

  3. Getting entity fields for filtering a selection of contracts (The value of the "object" parameter is passed in the request body in the criteria in the "field" field ).

  4. Selection of contracts for batch processing . The selection can use criteria for filtering. If they are not used, then an empty collection [] is passed in the request body and contracts will be returned without filtering applied to them. The selection of contracts for processing by the process is incorporated into the logic of the batch processing process and it is recommended to use it for the method described in the next step.

-> 5. Starting batch processing . When passing the query parameter select-contracts with the value true, before starting a complex process (batch processing), the method itself preselects contracts by filters (criteria) passed in the request body. With this approach, the previous step of selecting contracts is skipped as unnecessary.

For the convenience of working with batch processing, criteria (filters) can be prepared once and used. (see steps 1-3)

Parameters

Path Parameters

date*

Date and time in YYYY-MM-DDThh: mm: ss format, for example 2016-05-11T03: 00: 00. Address bar parameter

Type
string
Required
processTypeId*

Process type identifier . Address bar parameter

Type
integer
Required
Format
"int64"

Query Parameters

future-date

This parameter is only used for the Calculation of Future Interest process (ID 1014344). The field contains the future date in the YYYY-MM-DD format, on which interest should be calculated. Additional address bar parameter

Type
string
Format
"date"
line-violation

Out of sequence. This parameter allows you to break the sequence for the process. This is necessary when you need to start a process in the past. An additional parameter of the address bar, in the address bar is passed as follows: https://core.brainysoft.ru:9025/bs-core/main/processes/execute/process-type-id/101439/date/2016-05-11T03: 00: 00? Line-violation = true

Type
boolean
select-contracts

This parameter can be used in order to select the contracts under which the complex process will be launched before starting a complex process. To do this, you need to pass this parameter with the value true and set the necessary filters in the criterions collection (see description below) by which the selection of contracts will be made. The step with calling the method " Selecting contracts for batch processing " when passing this parameter with the value true and specifying filters is skipped for unnecessary. Additional address bar parameter

Type
boolean
Default
false

Request Body

application/json
object
object[]

Criteria by which batch processing is started. For example, by last name, maturity date or department. If the select-contracts parameter is not passed or is passed with the value false, then this collection is used to save these criteria in the logs of complex processes launch (this information is then displayed in the report on the launch of complex processes)

Entity

Field

First entity value for criterion

Second entity value for criterion

object
object[]

Collection selected by the method " Selecting contracts for batch processing "

Format"int64"
object
Format"int64"
Format"int64"

Responses

OK

*/*
object

If the element was successfully removed, then this parameter returns an empty string

Upon successful deletion of an element in the directory, the status "ok" is returned. Otherwise, an error is returned

Valid values"error""ok"

Returns the date + time (kernel) in unix timestamp format in milliseconds

Format"int64"