I
I
Ilya2021-09-16 12:55:25
Bitrix24
Ilya, 2021-09-16 12:55:25

How to get business process variables using Bitrix24 REST API?

Good day.

I am writing a local application for the cloud version of Bitrix24. In it, I created an application action (via bizproc.activity.add) that should collect the data entered during the business process using the "Request additional information" block into a specific report format.
The action works as it should, but I can't get a list of business process variables in a remote script. Active googling only suggested using PHP methods , but as far as I understand, these methods are for the boxed version, not the cloud one.$rootActivity->GetVariable("Manager");

Right now, I only have the idea to create a file before the application action and write all the variables to it, but this does not seem like a good idea (if only because I did not find a template for outputting all variables at once, and listing each of them is bad for scaling).

Thanks in advance for your reply.

[edit] Typos, formatting

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2021-09-20
@kozhilya

The action works as it should, but I can't get a list of business process variables in a remote script.

In your action, you can get the parameters and variables of the business process template only if, when registering the action, declare the parameters of the BP action and explicitly pass them to your handler.
Those. if you need a variable value, add it when registering bizproc.activity.add.
If you want to change it: add values ​​to the output and add a block for changing variables after your action.
There are no other possibilities.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question