true, 'nonavbar' => true, 'currentapp' => $currentApplication, 'enable_network_class' => true, 'enable_contacts_class' => true, 'enable_nextmatchs_class' => true); require_once dirname(__FILE__) . '/../../header.inc.php'; require dirname(__FILE__) . '/../setup/setup.inc.php'; /* DO NOT USE require_once */ $GLOBALS['phpgw_info']['apps']['workflow'] = $setup_info['workflow']; $row = $GLOBALS['workflow']['workflowObjects']->getDBExpresso()->Link_ID->query('SELECT config_value FROM phpgw_config WHERE config_app = ? AND config_name = ?', array('phpgwapi', 'files_dir'))->fetchRow(); $_SESSION['phpgw_info']['workflow']['vfs_basedir'] = ($row !== false) ? $row['config_value'] : '/home/expressolivre'; $_SESSION['phpgw_info']['workflow']['phpgw_api_inc'] = PHPGW_API_INC; $_SESSION['phpgw_info']['workflow']['account_id'] = $GLOBALS['phpgw_info']['user']['account_id']; $_SESSION['phpgw_info']['workflow']['server']['webserver_url'] = $GLOBALS['phpgw_info']['server']['webserver_url']; require_once PHPGW_API_INC . '/functions.inc.php'; require_once 'engine/class.ajax_config.inc.php'; require_once 'engine/class.ajax_ldap.inc.php'; require_once 'engine/config.ajax.inc.php'; $GLOBALS['ajax']->ldap = new ajax_ldap(); /* definição de algumas constantes */ define('PHPGW_TEMPLATE_DIR', ExecMethod('phpgwapi.phpgw.common.get_tpl_dir', 'phpgwapi')); $_SERVER['DOCUMENT_ROOT'] = PHPGW_SERVER_ROOT; } /** * Prepara o ambiente disponibilizado pelo Workflow para um dado processo * @return void * @access public */ public function prepareProcessEnvironment($processID) { require_once GALAXIA_LIBRARY . '/src/common/WfRuntime.php'; require_once PHPGW_SERVER_ROOT . '/workflow/inc/local/functions/local.functions.php'; $runtime = new WfRuntime($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); $runtime->loadProcess($processID); /* GLOBALS */ $GLOBALS['workflow']['wf_runtime'] = &$runtime; $GLOBALS['workflow']['wf_normalized_name'] = $runtime->process->getNormalizedName(); } } ?>