private static function ImportTemplateChecker($arActivity, $user) { $arErrors = CBPActivity::CallStaticMethod($arActivity["Type"], "ValidateProperties", array($arActivity["Properties"], $user)); if (count($arErrors) > 0) { $m = ""; foreach ($arErrors as $er) { $m .= $er["message"] . ". "; } throw new Exception($m); return false; } return true; }
<?php require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"; CModule::IncludeModule('bizproc'); global $APPLICATION; if (!check_bitrix_sessid()) { die; } if (!CBPDocument::CanUserOperateDocumentType(CBPCanUserOperateOperation::CreateWorkflow, $GLOBALS["USER"]->GetID(), $_REQUEST['document_type'])) { die; } CUtil::DecodeUriComponent($_REQUEST); $activityType = $_REQUEST['activity']; $runtime = CBPRuntime::GetRuntime(); $runtime->StartRuntime(); $arActivityDescription = $runtime->GetActivityDescription($activityType); if ($arActivityDescription == null) { die("Bad activity type!" . htmlspecialcharsbx($activityType)); } $runtime->IncludeActivityFile($activityType); $isHtml = !empty($_REQUEST['content_type']) && $_REQUEST['content_type'] == 'html'; if ($isHtml) { $APPLICATION->ShowAjaxHead(); } $res = CBPActivity::CallStaticMethod($activityType, "getAjaxResponse", array($_REQUEST)); echo $isHtml ? $res : CUtil::PhpToJSObject($res); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
public static function ShowTaskForm($arTask, $userId, $userName = "", $arRequest = null) { return CBPActivity::CallStaticMethod( $arTask["ACTIVITY"], "ShowTaskForm", array( $arTask, $userId, $userName, $arRequest ) ); }
style="display:none"<?php } ?> id="id_activity_name"> <td align="right" width="40%"><?php echo GetMessage("BP_ACT_SET_ID_ROW"); ?> </td> <td width="60%"><input type="text" name="activity_id" value="<?php echo htmlspecialcharsbx($activity_id); ?> " size="50"></td> </tr> <?php $z = CBPActivity::CallStaticMethod($activityType, "GetPropertiesDialog", array(array(MODULE_ID, ENTITY, $_POST['document_type']), $activityName, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $_POST["postback"] == "Y" ? $_POST : null, $popupWindow->GetFormName(), $popupWindow, $currentSiteId)); echo $z; ?> </table> <script> setTimeout("document.getElementById('bpastitle').focus();", 100); </script> <input type="hidden" name="save" value="Y" /> <input type="hidden" name="postback" value="Y" /> <?php $popupWindow->EndContent(); $popupWindow->StartButtons(); $popupWindow->ShowStandardButtons(); $popupWindow->EndButtons(); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_js.php";
public static function getTaskControls($arTask) { return CBPActivity::CallStaticMethod($arTask["ACTIVITY"], "getTaskControls", array($arTask)); }