ProcessMaker-BE "Export, artifacts missing"

- Export, artifacts missing
- Se ha completado los artifacts al exportar e importar
This commit is contained in:
Victor Saisa Lopez
2014-06-06 15:21:01 -04:00
parent 310fb20e6b
commit 29edfabe4d
3 changed files with 17 additions and 5 deletions

View File

@@ -96,6 +96,7 @@ abstract class Exporter
$data["metadata"]["uid"] = $this->getProjectUid();
$bpmnStruct["ACTIVITY"] = \BpmnActivity::getAll($this->prjUid);
$bpmnStruct["ARTIFACT"] = \BpmnArtifact::getAll($this->prjUid);
$bpmnStruct["BOUND"] = \BpmnBound::getAll($this->prjUid);
$bpmnStruct["DATA"] = array();
$bpmnStruct["DIAGRAM"] = \BpmnDiagram::getAll($this->prjUid);
@@ -152,7 +153,10 @@ abstract class Exporter
$templatesFiles = Util\Common::rglob("$templatesDir/*", 0, true);
foreach ($templatesFiles as $templatesFile) {
if (is_dir($templatesFile)) continue;
if (is_dir($templatesFile)) {
continue;
}
$filename = basename($templatesFile);
$data["workflow-files"][$target][] = array(
"filename" => $filename,
@@ -204,3 +208,4 @@ abstract class Exporter
}
}
}

View File

@@ -311,7 +311,7 @@ abstract class Importer
$project = $tables["project"][0];
$diagram = $tables["diagram"][0];
$diagram["activities"] = $tables["activity"];
$diagram["artifacts"] = array();
$diagram["artifacts"] = $tables["artifact"];
$diagram["events"] = $tables["event"];
$diagram["flows"] = $tables["flow"];
$diagram["gateways"] = $tables["gateway"];

View File

@@ -731,10 +731,17 @@ class BpmnWorkflow extends Project\Bpmn
if ($forceInsert || is_null($artifact)) {
if ($generateUid) {
$oldArtUid = $artifactData["ART_UID"];
//Artifact
unset($artifactData["BOU_UID"]);
$uidOld = $artifactData["ART_UID"];
$artifactData["ART_UID"] = Util\Common::generateUID();
$result[] = array("object" => "artifact", "new_uid" => $artifactData["ART_UID"], "old_uid" => $oldArtUid);
$result[] = array(
"object" => "artifact",
"old_uid" => $uidOld,
"new_uid" => $artifactData["ART_UID"]
);
}
$bwp->addArtifact($artifactData);