Created
May 25, 2020 16:46
-
-
Save BedrosovaYulia/846be88e371147b7f714566de4270b12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/log.txt"); | |
AddMessage2Log($arMessageFields, "my_module_id"); | |
CModule::IncludeModule('bizproc'); | |
$documentId = CBPVirtualDocument::CreateDocument( | |
0, | |
array( | |
"IBLOCK_ID" => 17, | |
"NAME" => $arMessageFields['SUBJECT'], | |
"CREATED_BY" => "user_1", | |
"PROPERTY_BODY"=>$arMessageFields['BODY'], | |
"PROPERTY_EMAIL"=>$arMessageFields['FIELD_FROM'] | |
) | |
); | |
print($documentId); | |
$arErrorsTmp = array(); | |
$wfId = CBPDocument::StartWorkflow( | |
9, | |
array("bizproc", "CBPVirtualDocument", $documentId), | |
array_merge(array(), array("TargetUser" => "user_1")), | |
$arErrorsTmp | |
); | |
AddMessage2Log($arErrorsTmp, "my_module_id"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment