Inheritance: extends BaseActiveRecordVersioned
 /**
  * @throws \CException
  */
 protected function setCurrentSet()
 {
     if (!$this->set) {
         $firm_id = $this->firm->id;
         $status_id = $this->episode ? $this->episode->episode_status_id : 1;
         $workflow = new models\OphCiExamination_Workflow_Rule();
         $this->set = $workflow->findWorkflowCascading($firm_id, $status_id)->getFirstStep();
         $this->mandatoryElements = $this->set->MandatoryElementTypes;
     }
 }
 public function actionDeleteWorkflowRules()
 {
     if (is_array(@$_POST['workflowrules'])) {
         foreach ($_POST['workflowrules'] as $rule_id) {
             if ($rule = models\OphCiExamination_Workflow_Rule::model()->findByPk($rule_id)) {
                 if (!$rule->delete()) {
                     throw new \Exception('Unable to delete workflow rule: ' . print_r($rule->getErrors(), true));
                 }
             }
         }
     }
     echo '1';
 }