BPMN Project Import chages to import alll workflow properties data

This commit is contained in:
Erik Amaru Ortiz
2014-03-27 19:11:11 -04:00
parent edaf69ec0e
commit 00fd862056
8 changed files with 187 additions and 34 deletions

View File

@@ -87,7 +87,6 @@ abstract class Exporter
$oProcess = new \Processes();
$workflowData = (array) $oProcess->getWorkflowData($this->prjUid);
$workflowData["process"]['PRO_DYNAFORMS'] = empty($workflowData["process"]['PRO_DYNAFORMS'])
? "" : serialize($workflowData["process"]['PRO_DYNAFORMS']);
@@ -100,11 +99,9 @@ abstract class Exporter
$data["workflow-files"] = array();
// getting dynaforms
$dynaforms = array();
foreach ($workflowData["dynaforms"] as $dynaform) {
$dynFile = PATH_DYNAFORM . $dynaform['DYN_FILENAME'] . '.xml';
$dynaforms[] = array(
$data["workflow-files"]["DYNAFORMS"][] = array(
"filename" => $dynaform['DYN_TITLE'],
"filepath" => $dynaform['DYN_FILENAME'] . '.xml',
"file_content" => file_get_contents($dynFile)
@@ -131,10 +128,10 @@ abstract class Exporter
foreach ($templatesFiles as $templatesFile) {
if (is_dir($templatesFile)) continue;
$filename = basename($templatesFile);
$data["workflow-files"][$target][] = array(
"filename" => basename($templatesFile),
"filepath" => str_replace($templatesDir, "", $templatesFile),
"filename" => $filename,
"filepath" => $this->prjUid . PATH_SEP . $filename,
"file_content" => file_get_contents($templatesFile)
);
}

View File

@@ -135,7 +135,7 @@ class XmlExporter extends Exporter
private function getTextNode($value)
{
if (preg_match('/^[\w\s\.\-]+$/', $value, $match)) {
if (empty($value) || preg_match('/^[\w\s\.\-]+$/', $value, $match)) {
return $this->dom->createTextNode($value);
} else {
return $this->dom->createCDATASection($value);