public static function ValidateProperties($value = null, CBPWorkflowTemplateUser $user = null)
 {
     $arErrors = array();
     if ($user == null || !$user->IsAdmin()) {
         $arErrors[] = array("code" => "perm", "message" => GetMessage("BPCC_NO_PERMS"));
     }
     return array_merge($arErrors, parent::ValidateProperties($value, $user));
 }
 public static function GetPropertiesDialogValues($documentType, $activityName, &$arWorkflowTemplate, &$arWorkflowParameters, &$arWorkflowVariables, $arCurrentValues, &$arErrors)
 {
     $runtime = CBPRuntime::GetRuntime();
     $arActivities = $runtime->SearchActivitiesByType("condition");
     if (!array_key_exists($arCurrentValues["condition_type"], $arActivities)) {
         $arErrors[] = array("code" => "", "message" => GetMessage("BPWA_INVALID_CONDITION_TYPE"));
         return false;
     }
     $condition = CBPActivityCondition::CallStaticMethod($arCurrentValues["condition_type"], "GetPropertiesDialogValues", array($documentType, $arWorkflowTemplate, $arWorkflowParameters, $arWorkflowVariables, $arCurrentValues, &$arErrors));
     if ($condition != null) {
         $arCurrentActivity =& CBPWorkflowTemplateLoader::FindActivityByName($arWorkflowTemplate, $activityName);
         //if (!is_array($arCurrentActivity["Properties"]))
         $arCurrentActivity["Properties"] = array();
         $arCurrentActivity["Properties"][$arCurrentValues["condition_type"]] = $condition;
         return true;
     }
     return false;
 }