Example #1
0
    public function addText($text, $x, $y)
    {
        try {
            //Line
            $swiUid = parent::addText($text, $x, $y);

            //BPMN
            //Artifact
            $arrayData = array(
                "ART_UID"    => $swiUid,
                "ART_TYPE"   => "TEXT_ANNOTATION",
                "ART_NAME"   => $text,
                "BOU_X"      => $x,
                "BOU_Y"      => $y,
                "BOU_WIDTH"  => 100,
                "BOU_HEIGHT" => 30
            );

            $artifactUid = $this->bp->addArtifact($arrayData);

            //Return
            return $swiUid;
        } catch (\Exception $e) {
            throw $e;
        }
    }
Example #2
0
 public function __construct($prjUid)
 {
     $this->prjUid = $prjUid;
     $this->bpmnProject = Project\Bpmn::load($prjUid);
     $this->projectData = $this->bpmnProject->getProject();
     $this->metadata = array("vendor_version" => \System::getVersion(), "vendor_version_code" => "Michelangelo", "export_timestamp" => date("U"), "export_datetime" => date("Y-m-d\\TH:i:sP"), "export_server_addr" => isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] . ":" . $_SERVER["SERVER_PORT"] : "Unknown", "export_server_os" => PHP_OS, "export_server_php_version" => PHP_VERSION_ID);
 }
Example #3
0
    public function updateWebEntryEventByEvent($eventUid, array $arrayData)
    {
        try {
            $bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);

            if (!is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "EMPTY") {
                $webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();

                if ($webEntryEvent->existsEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid())) {
                    $arrayWebEntryEventData = $webEntryEvent->getWebEntryEventByEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid(), true);

                    $bpmn = \ProcessMaker\Project\Bpmn::load($bpmnEvent->getPrjUid());
                    $bpmnProject = $bpmn->getProject("object");

                    $arrayResult = $webEntryEvent->update($arrayWebEntryEventData["WEE_UID"], $bpmnProject->getPrjAuthor(), $arrayData);
                }
            }
        } catch (\Exception $e) {
            throw $e;
        }
    }