/**
  * On long running deamons i've seen a lost resource. This checks the resource and creates it if needed.
  *
  */
 protected static function ensure()
 {
     if (is_resource(self::$uuidobject)) {
         return true;
     }
     if (!iHRIS_Module_UUID_Map::hasUUID()) {
         return false;
     }
     uuid_create(&self::$uuidobject);
     if (!is_resource(self::$uuidobject)) {
         return false;
     }
     return true;
 }
 public static function generate_uuid($form)
 {
     if (!$form instanceof I2CE_Form) {
         return false;
     }
     $site_module = 'ihris';
     I2CE::getConfig()->setIfIsSet($site_module, '/config/site/module');
     $name = $site_module . ':' . $form->getNameID();
     return iHRIS_Module_UUID_Map::v3(self::NAMESPACE_UUID, $name);
 }