fromArray($data, BasePeer::TYPE_FIELDNAME); if ($generateUid) { $this->setActUid(\ProcessMaker\Util\Hash::generateUID()); } $this->save(); $process = BpmnProcessPeer::retrieveByPK($data['PRO_UID']); // create related bound $bound = new Bound(); $bound->fromArray($data, BasePeer::TYPE_FIELDNAME); $bound->setBouUid(\ProcessMaker\Util\Hash::generateUID()); $bound->setPrjUid($this->getPrjUid()); $bound->setDiaUid($process->getDiaUid()); $bound->setElementUid($this->getActUid()); $bound->setBouElementType('bpmnActivity'); $bound->setBouElement('pm_canvas'); $bound->setBouContainer('bpmnDiagram'); $bound->save(); } public function update($data) { $this->fromArray($data, BasePeer::TYPE_FIELDNAME); $this->save(); // update related bound $bound = BpmnBound::findOneBy(BpmnBoundPeer::ELEMENT_UID, $this->getActUid()); $bound->fromArray($data, BasePeer::TYPE_FIELDNAME); $bound->save(); } } // BpmnActivity