I
I
IvanovIvanIvanych2020-08-03 11:53:18
Bitrix24
IvanovIvanIvanych, 2020-08-03 11:53:18

How to populate a BP variable using REST?

Is there a REST method that can populate a BP related variable? If there is, what is it called, and if not, what is the best way to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Paimurzin, 2020-08-03
@rusellsystems

here is an example of how I interacted with a business process from a script and passed the deal ID through bizproc.workflow.start ,

$queryUrl = 'https://'.SITENAME.'/rest/1/'.WEB_HOOK.'/bizproc.workflow.start';
      $queryData = http_build_query(
        array(
          'TEMPLATE_ID'=>$businessProccessID_deals,
          'DOCUMENT_ID'=>array("crm","CCrmDocumentDeal",$DEAL_ID),
        )
       );

A
Andrey Nikolaev, 2020-08-08
@gromdron

No, there is no such REST method.
For the boxed version of Bitrix24, you can write your own BP action or extend REST methods
. What options are there in the cloud Bitrix24?
- Through its business process action.
Make your action BP, in which to return the necessary information in it.
This information is stored in a variable.
- If the BP is running on an entity
(Not recommended) change the value of the entity directly
- If the BP uses a universal list
You can change the values ​​of the universal list. For example, 1 instance of a BP on a deal creates 1 record in the CA and works with it.
As you understand, the most preferred option is to write your own BP action (you need to create a local application) and store the return value in a variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question