A
A
Alexey Imsha2019-02-04 18:41:36
Bitrix24
Alexey Imsha, 2019-02-04 18:41:36

How to programmatically launch a business process in a Bitrix 24 box?

I use the code
$runtime = \CBPRuntime::GetRuntime();
$documentID = [
'iblock',
$CIBlockElement['ID'],
];
$ww = $runtime->CreateWorkflow($bizProcID, $documentID);
$ww->Start();
I always get the error Argument 'documentId' is not defined.
How to correctly write $documentId for an infoblock?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Julia Bedrosova, 2019-02-04
@aleximsha

She wrote on her blog: bedrosova.blogspot.com/2015/05/24_19.html
$documentId = CBPVirtualDocument::CreateDocument(
0,
array(
"IBLOCK_ID" => 27,
"NAME" => "Create Notification",
"CREATED_BY " => "user_".$GLOBALS["USER"]->GetID(),
)
);
There should not be a number, but an object.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question