Updates On Bpmn->Workflow Adapter, now activities and flows are updated just when its data have changed

This commit is contained in:
Erik Amaru Ortiz
2014-02-18 17:41:45 -04:00
parent a0f26ed265
commit ec48facf8b
10 changed files with 173 additions and 137 deletions

View File

@@ -166,4 +166,12 @@ class BpmnActivity extends BaseBpmnActivity
return $data;
}
public static function exists($actUid)
{
$c = new Criteria("workflow");
$c->add(BpmnActivityPeer::ACT_UID, $actUid);
return BpmnActivityPeer::doCount($c) > 0 ? true : false;
}
} // BpmnActivity

View File

@@ -52,7 +52,7 @@ class BpmnFlow extends BaseBpmnFlow
while ($rs->next()) {
$flow = $rs->getRow();
$flow["FLO_STATE"] = @json_decode($flow["FLO_STATE"]);
$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;
@@ -77,7 +77,10 @@ class BpmnFlow extends BaseBpmnFlow
public function toArray($type = BasePeer::TYPE_FIELDNAME)
{
return parent::toArray($type);
$flow = parent::toArray($type);
$flow["FLO_STATE"] = @json_decode($flow["FLO_STATE"], true);
return $flow;
}
} // BpmnFlow