Answer the question
In order to leave comments, you need to log in
How to start a business process from another business process?
I can’t understand how it is possible to start one BP after the completion of another, and in general how it should work at all, is it possible to somehow transfer data to the fields of a business process and run it using PHP code?
I found such a link, but apparently I’m writing something wrong:
https://dev.1c-bitrix.ru/learning/course/index.php... I
also used this documentation.
https://dev.1c-bitrix.ru/api_help/bizproc/bizproc_...
Something seems to have worked out for me, but the data from the first bp is not transferred to the second. I
used this code in the PHP code
block CBPDocument::StartWorkflow(
581, //BP template ID (taken from url before template)
array("bizproc", "BizprocDocument", {{element ID}}),
array("NAME"=>"Name1", "TESTTEKSTOVOEPOLE"=>"TestText"), // this data is not transferred to the fields of the second BP
$ arErrors
);
UPD:
Understood.
It was necessary to first insert the block "Creating a list element" , just in it you can select the BP that you want to run, the fields of this BP are immediately filled. And then we insert the block "Starting a business process for the specified document" and in it in the form "Insert value" in the add. in the results we find the ID that we received in "Creating a list item"
Answer the question
In order to leave comments, you need to log in
Create a global variable
Just write data there and that's it
To start a BP from a BP, use the Start business process activity
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question