11 public function requestAction(array $documentType,
string $activity, array $params)
15 $documentType = \CBPHelper::ParseDocumentId($documentType);
17 ->validateString(
'activity')
18 ->getPureValues()[
'activity'];
20 $dirtyParams = $params;
24 ->validateRequire(
'form_name')
25 ->validateString(
'form_name')
26 ->validateEnum(
'public_mode', [
'Y',
''])
27 ->setDefault(
'public_mode',
'')
30 $params = array_merge($dirtyParams, $pureParams);
37 $user = $this->getCurrentUser();
40 !\CBPDocument::CanUserOperateDocumentType(
41 \CBPCanUserOperateOperation::CreateWorkflow,
51 $runtime = \CBPRuntime::GetRuntime();
52 $runtime->StartRuntime();
54 $activityDescription = $runtime->GetActivityDescription($activity);
55 if (!$activityDescription)
57 $this->
addError(
new Error(
"Bad activity type!" . htmlspecialcharsbx($activity)));
61 $runtime->IncludeActivityFile($activity);
63 return \CBPActivity::CallStaticMethod(