Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -2609,7 +2609,7 @@ class G
|
||||
* @param integer $permission
|
||||
* @return void
|
||||
*/
|
||||
public static function uploadFile ($file, $path, $nameToSave, $permission = 0660)
|
||||
public static function uploadFile ($file, $path, $nameToSave, $permission = 0755)
|
||||
{
|
||||
try {
|
||||
if ($file == '') {
|
||||
@@ -3618,7 +3618,7 @@ class G
|
||||
* @param $pattern pattern to filter some especified files
|
||||
* @return <array> array containing the recursive glob results
|
||||
*/
|
||||
public function rglob($pattern = '*', $flags = 0, $path = '')
|
||||
public static function rglob($pattern = '*', $flags = 0, $path = '')
|
||||
{
|
||||
$paths = glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);
|
||||
$files = glob($path.$pattern, $flags);
|
||||
|
||||
@@ -2584,8 +2584,14 @@ class Processes
|
||||
* @return boolean
|
||||
*/
|
||||
public function serializeProcess ($sProUid = '')
|
||||
{
|
||||
return serialize($this->getWorkflowData($sProUid));
|
||||
}
|
||||
|
||||
public function getWorkflowData($sProUid = '')
|
||||
{
|
||||
$oProcess = new Process();
|
||||
$oData = new StdClass();
|
||||
$oData->process = $this->getProcessRow( $sProUid, false );
|
||||
$oData->tasks = $this->getTaskRows( $sProUid );
|
||||
$oData->routes = $this->getRouteRows( $sProUid );
|
||||
@@ -2619,7 +2625,7 @@ class Processes
|
||||
//$oJSON = new Services_JSON();
|
||||
//krumo ( $oJSON->encode($oData) );
|
||||
//return $oJSON->encode($oData);
|
||||
return serialize( $oData );
|
||||
return $oData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,4 +41,25 @@ class BpmnBound extends BaseBpmnBound
|
||||
|
||||
return BpmnBoundPeer::doSelectOne($c);
|
||||
}
|
||||
|
||||
public static function getAll($prjUid = null, $start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn("BPMN_BOUND.*");
|
||||
|
||||
if (! is_null($prjUid)) {
|
||||
$c->add(BpmnBoundPeer::PRJ_UID, $prjUid, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$rs = BpmnBoundPeer::doSelectRS($c);
|
||||
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$bounds = array();
|
||||
|
||||
while ($rs->next()) {
|
||||
$bounds[] = $changeCaseTo !== CASE_UPPER ? array_change_key_case($rs->getRow(), CASE_LOWER) : $rs->getRow();
|
||||
}
|
||||
|
||||
return $bounds;
|
||||
}
|
||||
} // BpmnBound
|
||||
|
||||
@@ -24,6 +24,27 @@ class BpmnDiagram extends BaseBpmnDiagram
|
||||
return BpmnDiagramPeer::doSelect($c);
|
||||
}
|
||||
|
||||
public static function getAll($prjUid = null, $start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn("BPMN_DIAGRAM.*");
|
||||
|
||||
if (! is_null($prjUid)) {
|
||||
$c->add(BpmnDiagramPeer::PRJ_UID, $prjUid, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$rs = BpmnDiagramPeer::doSelectRS($c);
|
||||
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$diagrams = array();
|
||||
|
||||
while ($rs->next()) {
|
||||
$diagrams[] = $changeCaseTo !== CASE_UPPER ? array_change_key_case($rs->getRow(), CASE_LOWER) : $rs->getRow();
|
||||
}
|
||||
|
||||
return $diagrams;
|
||||
}
|
||||
|
||||
// Overrides
|
||||
|
||||
public function toArray($type = BasePeer::TYPE_FIELDNAME)
|
||||
|
||||
@@ -64,7 +64,7 @@ class BpmnFlow extends BaseBpmnFlow
|
||||
return BpmnFlowPeer::doSelect($c);
|
||||
}
|
||||
|
||||
public static function getAll($prjUid = null, $start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
|
||||
public static function getAll($prjUid = null, $start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER, $decodeState = true)
|
||||
{
|
||||
//TODO implement $start, $limit and $filter
|
||||
$c = new Criteria('workflow');
|
||||
@@ -80,7 +80,9 @@ class BpmnFlow extends BaseBpmnFlow
|
||||
|
||||
while ($rs->next()) {
|
||||
$flow = $rs->getRow();
|
||||
$flow["FLO_STATE"] = @json_decode($flow["FLO_STATE"], true);
|
||||
if ($decodeState) {
|
||||
$flow["FLO_STATE"] = @json_decode($flow["FLO_STATE"], true);
|
||||
}
|
||||
//$flow["FLO_IS_INMEDIATE"] = $flow["FLO_IS_INMEDIATE"] == 1 ? true : false;
|
||||
$flow = $changeCaseTo !== CASE_UPPER ? array_change_key_case($flow, CASE_LOWER) : $flow;
|
||||
|
||||
|
||||
@@ -24,6 +24,26 @@ class BpmnProcess extends BaseBpmnProcess
|
||||
return BpmnProcessPeer::doSelect($c);
|
||||
}
|
||||
|
||||
public static function getAll($prjUid = null, $start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn("BPMN_PROCESS.*");
|
||||
|
||||
if (! is_null($prjUid)) {
|
||||
$c->add(BpmnProcessPeer::PRJ_UID, $prjUid, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
$rs = BpmnProcessPeer::doSelectRS($c);
|
||||
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$processes = array();
|
||||
while ($rs->next()) {
|
||||
$processes[] = $changeCaseTo !== CASE_UPPER ? array_change_key_case($rs->getRow(), CASE_LOWER) : $rs->getRow();
|
||||
}
|
||||
|
||||
return $processes;
|
||||
}
|
||||
|
||||
|
||||
// Overrides
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class DbSource extends BaseDbSource
|
||||
return $aRow[0];
|
||||
}
|
||||
|
||||
public function Exists($Uid, $ProUID)
|
||||
public function Exists($Uid, $ProUID = "")
|
||||
{
|
||||
try {
|
||||
$oPro = DbSourcePeer::retrieveByPk($Uid, $ProUID);
|
||||
|
||||
@@ -169,7 +169,7 @@ class Calendar
|
||||
}
|
||||
|
||||
//Set variables
|
||||
$calendar = new \calendar();
|
||||
$calendar = new \CalendarDefinition();
|
||||
|
||||
$arrayTotalUsersByCalendar = $calendar->getAllCounterByCalendar("USER");
|
||||
$arrayTotalProcessesByCalendar = $calendar->getAllCounterByCalendar("PROCESS");
|
||||
|
||||
@@ -150,9 +150,6 @@ class Step
|
||||
$msg = str_replace(array("{0}", "{1}"), array($objectUid, "OUTPUT_DOCUMENT"), "The UID \"{0}\" doesn't exist in table {1}");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$msg = str_replace(array("{0}", "{1}"), array($objectUid, $type), "The UID \"{0}\" doesn't exist in table {1}");
|
||||
break;
|
||||
}
|
||||
|
||||
return $msg;
|
||||
|
||||
109
workflow/engine/src/ProcessMaker/Exporter/Exporter.php
Normal file
109
workflow/engine/src/ProcessMaker/Exporter/Exporter.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Exporter;
|
||||
|
||||
use ProcessMaker\Project;
|
||||
|
||||
abstract class Exporter
|
||||
{
|
||||
protected $prjUid;
|
||||
|
||||
/**
|
||||
* @var \ProcessMaker\Project\Adapter\BpmnWorkflow
|
||||
*/
|
||||
protected $bpmnProject;
|
||||
|
||||
public function __construct($prjUid)
|
||||
{
|
||||
$this->prjUid = $prjUid;
|
||||
|
||||
$this->bpmnProject = Project\Bpmn::load($prjUid);
|
||||
}
|
||||
|
||||
public function buildData()
|
||||
{
|
||||
$data = array();
|
||||
$project = $this->bpmnProject->getProject();
|
||||
$data["METADATA"] = $this->getSystemInfo();
|
||||
$data["METADATA"]["project_name"] = $project["PRJ_NAME"];
|
||||
|
||||
|
||||
$bpmnStruct["ACTIVITY"] = \BpmnActivity::getAll($this->prjUid);
|
||||
$bpmnStruct["BOUND"] = \BpmnBound::getAll($this->prjUid);
|
||||
$bpmnStruct["DATA"] = array();
|
||||
$bpmnStruct["DIAGRAM"] = \BpmnDiagram::getAll($this->prjUid);
|
||||
$bpmnStruct["DOCUMENTATION"] = array();
|
||||
$bpmnStruct["BPMN_EVENT"] = \BpmnEvent::getAll($this->prjUid);
|
||||
$bpmnStruct["EXTENSION"] = array();
|
||||
$bpmnStruct["FLOW"] = \BpmnFlow::getAll($this->prjUid, null, null, "", CASE_UPPER, false);
|
||||
$bpmnStruct["BPMN_GATEWAY"] = \BpmnGateway::getAll($this->prjUid);
|
||||
$bpmnStruct["LANE"] = array();
|
||||
$bpmnStruct["LANESET"] = array();
|
||||
$bpmnStruct["PARTICIPANT"] = array();
|
||||
$bpmnStruct["PROCESS"] = \BpmnProcess::getAll($this->prjUid);
|
||||
$bpmnStruct["PROJECT"] = array(\BpmnProjectPeer::retrieveByPK($this->prjUid)->toArray());
|
||||
|
||||
\G::LoadClass( 'processes' );
|
||||
$oProcess = new \Processes();
|
||||
$workflowData = (array) $oProcess->getWorkflowData($this->prjUid);
|
||||
$workflowData["process"] = array($workflowData["process"]);
|
||||
$workflowData["processCategory"] = empty($workflowData["processCategory"]) ? array() : $workflowData["processCategory"];
|
||||
|
||||
|
||||
$data["BPMN_DATA"] = $bpmnStruct;
|
||||
$data["WORKFLOW_DATA"] = $workflowData;
|
||||
$data["WORKFLOW_FILES"] = array();
|
||||
|
||||
// getting dynaforms
|
||||
$dynaforms = array();
|
||||
|
||||
foreach ($workflowData["dynaforms"] as $dynaform) {
|
||||
$dynFile = PATH_DYNAFORM . $dynaform['DYN_FILENAME'] . '.xml';
|
||||
$dynaforms[] = array(
|
||||
"filename" => $dynaform['DYN_TITLE'],
|
||||
"filepath" => $dynaform['DYN_FILENAME'] . '.xml',
|
||||
"file_content" => file_get_contents($dynFile)
|
||||
);
|
||||
|
||||
$htmlFile = PATH_DYNAFORM . $dynaform['DYN_FILENAME'] . '.html';
|
||||
|
||||
if (file_exists($htmlFile)) {
|
||||
$data["WORKFLOW_FILES"]["DYNAFORMS"][] = array(
|
||||
"filename" => $dynaform['DYN_FILENAME'] . '.html',
|
||||
"filepath" => $dynaform['DYN_FILENAME'] . '.html',
|
||||
"file_content" => file_get_contents($htmlFile)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// getting templates files
|
||||
$workspaceTargetDirs = array("TEMPLATES" => "mailTemplates", "PUBLIC" => "public");
|
||||
$workspaceDir = PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP;
|
||||
|
||||
foreach ($workspaceTargetDirs as $target => $workspaceTargetDir) {
|
||||
$templatesDir = $workspaceDir . $workspaceTargetDir . PATH_SEP . $this->prjUid;
|
||||
$templatesFiles = \G::rglob("*", 0, $templatesDir);
|
||||
|
||||
foreach ($templatesFiles as $templatesFile) {
|
||||
if (is_dir($templatesFile)) continue;
|
||||
|
||||
$data["WORKFLOW_FILES"][$target][] = array(
|
||||
"filename" => basename($templatesFile),
|
||||
"filepath" => str_replace($templatesDir, "", $templatesFile),
|
||||
"file_content" => file_get_contents($templatesFile)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getSystemInfo()
|
||||
{
|
||||
return array(
|
||||
"vendor" => "ProcessMaker",
|
||||
"codename" => "Michelangelo",
|
||||
"version" => \System::getVersion(),
|
||||
"workspace" => defined("SYS_SYS") ? SYS_SYS : "Unknown",
|
||||
);
|
||||
}
|
||||
}
|
||||
112
workflow/engine/src/ProcessMaker/Exporter/XmlExporter.php
Normal file
112
workflow/engine/src/ProcessMaker/Exporter/XmlExporter.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Exporter;
|
||||
|
||||
class XmlExporter extends Exporter
|
||||
{
|
||||
protected $dom;
|
||||
protected $rootNode;
|
||||
|
||||
public function __construct($prjUid)
|
||||
{
|
||||
parent::__construct($prjUid);
|
||||
|
||||
/* @var $this->dom DomDocument */
|
||||
$this->dom = new \DOMDocument("1.0", "utf-8"); //\DOMImplementation::createDocument(null, 'project');
|
||||
$this->dom->formatOutput = true;
|
||||
|
||||
$this->rootNode = $this->dom->createElement("PROJECT");
|
||||
$this->rootNode->setAttribute("version", "1.0");
|
||||
$this->dom->appendChild($this->rootNode);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
$data = $this->buildData();
|
||||
|
||||
// metadata set up
|
||||
$metadata = $data["METADATA"];
|
||||
$metadataNode = $this->dom->createElement("METADATA");
|
||||
|
||||
foreach ($metadata as $key => $value) {
|
||||
$metaNode = $this->dom->createElement("META");
|
||||
$metaNode->setAttribute("key", $key);
|
||||
$metaNode->setAttribute("value", $value);
|
||||
$metadataNode->appendChild($metaNode);
|
||||
}
|
||||
|
||||
$this->rootNode->appendChild($metadataNode);
|
||||
// end setting metadata
|
||||
|
||||
// bpmn struct data set up
|
||||
$dbData = array("BPMN_DATA" => $data["BPMN_DATA"], "WORKFLOW_DATA" => $data["WORKFLOW_DATA"]);
|
||||
//file_put_contents("/home/erik/out.log", print_r($dbData, true)); die;
|
||||
foreach ($dbData as $sectionName => $sectionData) {
|
||||
$dataNode = $this->dom->createElement($sectionName);
|
||||
|
||||
foreach ($sectionData as $elementName => $elementData) {
|
||||
$elementNode = $this->dom->createElement(strtoupper($elementName));
|
||||
|
||||
foreach ($elementData as $recordData) {
|
||||
$recordNode = $this->dom->createElement("ROW");
|
||||
|
||||
foreach ($recordData as $key => $value) {
|
||||
$columnNode = $this->dom->createElement(strtoupper($key));
|
||||
|
||||
if (preg_match('/^[\w\s]+$/', $value, $match) || empty($value)) {
|
||||
$textNode = $this->dom->createTextNode($value);
|
||||
} else {
|
||||
$textNode = $this->dom->createCDATASection($value);
|
||||
}
|
||||
|
||||
$columnNode->appendChild($textNode);
|
||||
$recordNode->appendChild($columnNode);
|
||||
}
|
||||
|
||||
$elementNode->appendChild($recordNode);
|
||||
}
|
||||
|
||||
$dataNode->appendChild($elementNode);
|
||||
}
|
||||
|
||||
$this->rootNode->appendChild($dataNode);
|
||||
}
|
||||
|
||||
$workflowFilesNode = $this->dom->createElement("WORKFLOW_FILES");
|
||||
|
||||
// workflow dynaforms files
|
||||
foreach ($data["WORKFLOW_FILES"] as $elementName => $elementData) {
|
||||
foreach ($elementData as $fileData) {
|
||||
$fileNode = $this->dom->createElement("FILE");
|
||||
$fileNode->setAttribute("target", strtolower($elementName));
|
||||
|
||||
$filenameNode = $this->dom->createElement("FILE_NAME");
|
||||
$filenameNode->appendChild($this->dom->createCDATASection($fileData["filename"]));
|
||||
$fileNode->appendChild($filenameNode);
|
||||
|
||||
$filepathNode = $this->dom->createElement("FILE_PATH");
|
||||
$filepathNode->appendChild($this->dom->createCDATASection($fileData["filepath"]));
|
||||
$fileNode->appendChild($filepathNode);
|
||||
|
||||
$fileContentNode = $this->dom->createElement("FILE_CONTENT");
|
||||
$fileContentNode->appendChild($this->dom->createCDATASection(base64_encode($fileData["file_content"])));
|
||||
$fileNode->appendChild($fileContentNode);
|
||||
|
||||
$workflowFilesNode->appendChild($fileNode);
|
||||
}
|
||||
}
|
||||
|
||||
$this->rootNode->appendChild($workflowFilesNode);
|
||||
}
|
||||
|
||||
public function save($outputFile)
|
||||
{
|
||||
file_put_contents($outputFile, $this->export());
|
||||
}
|
||||
|
||||
public function export()
|
||||
{
|
||||
return $this->dom->saveXml();
|
||||
}
|
||||
}
|
||||
@@ -237,6 +237,10 @@ class Workflow extends Handler
|
||||
return $tasks->getAllTasks($this->proUid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $tasUid
|
||||
* @param bool $value
|
||||
*/
|
||||
public function setStartTask($tasUid, $value = true)
|
||||
{
|
||||
$value = $value ? "TRUE" : "FALSE";
|
||||
@@ -248,6 +252,10 @@ class Workflow extends Handler
|
||||
self::log("Setting Start Task -> $value, Success!");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $tasUid
|
||||
* @param bool $value
|
||||
*/
|
||||
public function setEndTask($tasUid, $value = true)
|
||||
{
|
||||
self::log("Setting End Task with Uid: $tasUid: " . ($value ? "TRUE" : "FALSE"));
|
||||
|
||||
37
workflow/engine/src/Tests/BusinessModel/CalendarTest.php
Normal file
37
workflow/engine/src/Tests/BusinessModel/CalendarTest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace Tests\BusinessModel;
|
||||
|
||||
if (!class_exists("Propel")) {
|
||||
include_once (__DIR__ . "/../bootstrap.php");
|
||||
}
|
||||
|
||||
/**
|
||||
* Class CalendarTest
|
||||
*
|
||||
* @package Tests\BusinessModel
|
||||
*/
|
||||
class CalendarTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testGetCalendars()
|
||||
{
|
||||
$calendar = new \BusinessModel\Calendar();
|
||||
|
||||
$arrayCalendar = $calendar->getCalendars();
|
||||
|
||||
$this->assertNotEmpty($arrayCalendar);
|
||||
|
||||
$arrayCalendar = $calendar->getCalendars(null, null, null, 0, 0);
|
||||
|
||||
$this->assertEmpty($arrayCalendar);
|
||||
|
||||
$arrayCalendar = $calendar->getCalendars(array("filter" => "Default"));
|
||||
|
||||
$this->assertNotEmpty($arrayCalendar);
|
||||
|
||||
$this->assertEquals($arrayCalendar[0]["CAL_UID"], "00000000000000000000000000000001");
|
||||
$this->assertEquals($arrayCalendar[0]["CAL_NAME"], "Default");
|
||||
$this->assertEquals($arrayCalendar[0]["CAL_DESCRIPTION"], "Default");
|
||||
$this->assertEquals($arrayCalendar[0]["CAL_STATUS"], "ACTIVE");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
namespace Tests\BusinessModel;
|
||||
|
||||
if (!class_exists("Propel")) {
|
||||
include_once (__DIR__ . "/../bootstrap.php");
|
||||
}
|
||||
|
||||
/**
|
||||
* Class ProcessCategoryTest
|
||||
*
|
||||
* @package Tests\BusinessModel
|
||||
*/
|
||||
class ProcessCategoryTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected static $arrayUid = array();
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
foreach (self::$arrayUid as $processCategoryUid) {
|
||||
if ($processCategoryUid != "") {
|
||||
$processCategory = new \ProcessCategory();
|
||||
|
||||
$processCategory->setCategoryUid($processCategoryUid);
|
||||
$processCategory->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function testCreate()
|
||||
{
|
||||
try {
|
||||
$processCategory = new \ProcessCategory();
|
||||
|
||||
$processCategoryUid = \G::GenerateUniqueID();
|
||||
|
||||
$processCategory->setNew(true);
|
||||
$processCategory->setCategoryUid($processCategoryUid);
|
||||
$processCategory->setCategoryName("PHPUnit Category");
|
||||
$processCategory->save();
|
||||
} catch (\Exception $e) {
|
||||
$processCategoryUid = "";
|
||||
}
|
||||
|
||||
self::$arrayUid[] = $processCategoryUid;
|
||||
|
||||
$this->assertNotEmpty($processCategoryUid);
|
||||
}
|
||||
|
||||
public function testGetCategories()
|
||||
{
|
||||
$processCategory = new \BusinessModel\ProcessCategory();
|
||||
|
||||
$arrayProcessCategory = $processCategory->getCategories();
|
||||
|
||||
$this->assertNotEmpty($arrayProcessCategory);
|
||||
|
||||
$arrayProcessCategory = $processCategory->getCategories(null, null, null, 0, 0);
|
||||
|
||||
$this->assertEmpty($arrayProcessCategory);
|
||||
|
||||
$arrayProcessCategory = $processCategory->getCategories(array("filter" => "PHP"));
|
||||
|
||||
$this->assertNotEmpty($arrayProcessCategory);
|
||||
|
||||
$this->assertEquals($arrayProcessCategory[0]["CAT_NAME"], "PHPUnit Category");
|
||||
$this->assertEquals($arrayProcessCategory[0]["CAT_TOTAL_PROCESSES"], 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace Tests\ProcessMaker\Exporter;
|
||||
|
||||
use \ProcessMaker\Project;
|
||||
use \ProcessMaker\Exporter;
|
||||
|
||||
if (! class_exists("Propel")) {
|
||||
include_once __DIR__ . "/../../bootstrap.php";
|
||||
}
|
||||
|
||||
/**
|
||||
* Class XmlExporterTest
|
||||
*
|
||||
* @package Tests\ProcessMaker\Project
|
||||
* @author Erik Amaru Ortiz <aortiz.erik@gmail.com, erik@colosa.com>
|
||||
*/
|
||||
class XmlExporterTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
function testExport()
|
||||
{
|
||||
$exporter = new Exporter\XmlExporter("4857540205310b25f3d51a5020772457");
|
||||
$exporter->build();
|
||||
$exporter->save("/home/erik/out.xml");
|
||||
}
|
||||
}
|
||||
@@ -100,61 +100,59 @@
|
||||
{/if}
|
||||
</head>
|
||||
<body>
|
||||
<section class="navBar">
|
||||
<h2>Michelangelo</h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#" class="mafe-button-save">Save</a></li>
|
||||
<li><a href="#" class="mafe-button-export-process">Export process</a></li>
|
||||
<li><a href="#" class="mafe-button-undo">Undo</a>
|
||||
<a href="#" class="mafe-button-redo">Redo</a></li>
|
||||
<li><input type="button" value="Zoom" class="mafe-button-zoom"> </li>
|
||||
<li><a href="#" title="Full screen"class="mafe-button-fullscreen"></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</section>
|
||||
<section class="navBar">
|
||||
<div class="head"></div>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#" class="mafe-button-save">Save</a></li>
|
||||
<li><a href="#" class="mafe-button-export-process">Export process</a></li>
|
||||
<li><a href="#" class="mafe-button-undo">Undo</a>
|
||||
<a href="#" class="mafe-button-redo">Redo</a></li>
|
||||
<li><input type="button" value="Zoom" class="mafe-button-zoom"> </li>
|
||||
<li><a href="#" title="Full screen"class="mafe-button-fullscreen"></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<section class="content">
|
||||
<div class="bpmn_shapes">
|
||||
<div class="head"><a href="#" class="bpmn_shapes-collapse"><img src="img/ico_hiden2.png"></a></div>
|
||||
</div>
|
||||
|
||||
<div class="content_controls">
|
||||
<div class="head"><a href="#" class="content_controls-collapse"><img src="img/ico_hiden3.png"></a></div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="" class="mafe-menu-dynaform">Dynaforms</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-inputdocuments">Input documents</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-outputdocuments">Output documents</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-triggers">Triggers</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-reporttables">Report tables</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-databaseconnections">Database connections</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mefe-menu-casescheduler">Case scheduler</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div class="bpmn_shapes">
|
||||
<div class="head">
|
||||
<span class="mafe-shapes-collapse-icon"></span></div>
|
||||
</div>
|
||||
<div class="content_controls">
|
||||
<div class="head"><span class="mafe-controls-collapse-icon"></span></div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="" class="mafe-menu-dynaform">Dynaforms</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-inputdocuments">Input documents</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-outputdocuments">Output documents</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-triggers">Triggers</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-reporttables">Report tables</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mafe-menu-databaseconnections">Database connections</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="mefe-menu-casescheduler">Case scheduler</a>
|
||||
<a href="#" class="btn_create"><span>Create</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user