5 use \Bitrix\Bizproc\Debugger\Mixins\WriterDebugTrack;
16 if (preg_match(
"#[^a-zA-Z0-9_]#",
$code))
18 throw new Exception(
"Activity '" .
$code .
"' is not valid");
21 $classname =
'CBP' .
$code;
23 return new $classname(
$data);
38 $runtime = CBPRuntime::GetRuntime();
39 $runtime->IncludeActivityFile(
$code);
41 if (preg_match(
"#[^a-zA-Z0-9_]#",
$code))
43 throw new Exception(
"Activity '" .
$code .
"' is not valid");
46 $classname =
'CBP'.$code;
48 return call_user_func_array(
array($classname,
$method), $arParameters);
53 $documentService = CBPRuntime::getRuntime()->getDocumentService();
62 : $documentService->getFieldInputValue($parameterDocumentType, $property, $fieldName,
$request,
$errors)
65 if ($isBetweenOperator)
67 $property[
'Multiple'] =
false;
69 $value1 = $documentService->getFieldInputValue(
70 $parameterDocumentType,
72 $fieldName .
'_greater_then',
77 $value2 = $documentService->getFieldInputValue(
78 $parameterDocumentType,
80 $fieldName .
'_less_then',
85 $value = [$value1 ??
'', $value2 ??
''];
96 $result->setData([
'value' => $value]);
103 $documentService = $rootActivity->workflow->getRuntime()->getDocumentService();
104 $documentType = $rootActivity->getDocumentType();
106 if (!is_array($property))
108 return $documentService->getFieldTypeObject($documentType, [
'Type' =>
'string']);
111 $fieldType = $documentService->getFieldTypeObject($documentType, $property);
114 $fieldType = $documentService->getFieldTypeObject($documentType, [
'Type' =>
'string']);
122 if ($this->condition ==
null || !is_array($this->condition) ||
count($this->condition) <= 0)
132 if (!isset($this->condition[0]) || !is_array($this->condition[0]))
140 return empty(
$condition[3]) ? static::CONDITION_JOINER_AND : static::CONDITION_JOINER_OR;
151 if (in_array(
$condition[
'operator'], [
'!empty',
'empty']))
153 $formattedValue =
'';
157 $multiple = $fieldType->isMultiple();
158 $fieldType->setMultiple(
true);
159 $formattedValue = $fieldType->formatValue(
$condition[
'value']);
160 $fieldType->setMultiple($multiple);
167 'value' => $formattedValue
169 'joiner' =>
$condition[
'joiner'] === static::CONDITION_JOINER_OR ?
'OR' :
'AND',
170 'fieldValue' =>
$condition[
'valueToCheck'] ? $fieldType->formatValue(
$condition[
'valueToCheck']) :
null,
171 'result' => $results[$index] ?
'Y' :
'N',
175 $toLog = array_merge([
'result' =>
$result ?
'Y' :
'N'], $toLog);
178 $id = $this->writeDebugTrack(
181 $ownerActivity->executionStatus,
182 $ownerActivity->executionResult,
188 return [$toLog, $id];
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
static createInstance($code, $data)
evaluate(CBPActivity $ownerActivity)
static getConditionFieldInputValue(string $operator, $parameterDocumentType, $property, $fieldName, $request)
collectUsages(CBPActivity $ownerActivity)
const CONDITION_JOINER_OR
static validateProperties($value=null, CBPWorkflowTemplateUser $user=null)
static callStaticMethod($code, $method, $arParameters=array())
const CONDITION_JOINER_AND
getFieldTypeObject(CBPActivity $rootActivity, $property)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"