43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
|
|
<?php
|
||
|
|
/*+***********************************************************************************
|
||
|
|
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||
|
|
* ("License"); You may not use this file except in compliance with the License
|
||
|
|
* The Original Code is: vtiger CRM Open Source
|
||
|
|
* The Initial Developer of the Original Code is vtiger.
|
||
|
|
* Portions created by vtiger are Copyright (C) vtiger.
|
||
|
|
* All Rights Reserved.
|
||
|
|
*************************************************************************************/
|
||
|
|
global $root_directory;
|
||
|
|
require_once($root_directory."/modules/Workflow2/autoload_wf.php");
|
||
|
|
|
||
|
|
class Settings_Workflow2_BPMNExport_View extends Settings_Vtiger_Index_View {
|
||
|
|
|
||
|
|
protected function preProcessTplName(Vtiger_Request $request) {
|
||
|
|
return 'VT7/BPMNMenuStart.tpl';
|
||
|
|
}
|
||
|
|
|
||
|
|
public function process(Vtiger_Request $request) {
|
||
|
|
|
||
|
|
$workflowId = $request->get('workflow');
|
||
|
|
|
||
|
|
$adb = \PearDatabase::getInstance();
|
||
|
|
|
||
|
|
$viewer = $this->getViewer($request);
|
||
|
|
|
||
|
|
$workflow = new \Workflow\Main($workflowId);
|
||
|
|
$bpmn = new Workflow\BPMN\Exporter($workflow);
|
||
|
|
$bpmn->getXML();
|
||
|
|
exit();
|
||
|
|
|
||
|
|
$viewer->assign('WINDOWMODE', true);
|
||
|
|
$viewer->assign('READONLY', true);
|
||
|
|
|
||
|
|
$viewer->assign('BPMNContent', '');
|
||
|
|
|
||
|
|
$GLOBALS['csrf']['frame-breaker'] = false;
|
||
|
|
|
||
|
|
$viewer->view('VT7/BPMNView.tpl', 'Settings:Workflow2');
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|