/**
  * Validates type of model that triggered the flow
  */
 public function validate(&$params = array(), $flowId = null)
 {
     $model = $params['model'];
     $modelName = get_class($model);
     // ensure that model can be associated with workflows
     if (!$model instanceof X2Model) {
         return array(false, Yii::t('studio', "Processes are not associated with records of this type"));
     } elseif (!$model->supportsWorkflow) {
         return array(false, Yii::t('studio', "{recordName} are not associated with processes", array('{recordName}' => ucfirst(X2Model::getRecordName($modelName)))));
     }
     return parent::validate($params, $flowId);
 }