More Update for BpmnWorkflow Adapter class, now start and end tasks are updating successfully on Workflow Layer
This commit is contained in:
@@ -16,6 +16,11 @@ require_once 'classes/model/om/BaseBpmnFlow.php';
|
||||
*/
|
||||
class BpmnFlow extends BaseBpmnFlow
|
||||
{
|
||||
/**
|
||||
* @param $field string coming from \BpmnFlowPeer::<FIELD_NAME>
|
||||
* @param $value string
|
||||
* @return \BpmnFlow|null
|
||||
*/
|
||||
public static function findOneBy($field, $value)
|
||||
{
|
||||
$rows = self::findAllBy($field, $value);
|
||||
|
||||
@@ -213,5 +213,30 @@ class Route extends BaseRoute
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $field
|
||||
* @param null $value
|
||||
* @return \Route|null
|
||||
*/
|
||||
public static function findOneBy($field, $value = null)
|
||||
{
|
||||
$rows = self::findAllBy($field, $value);
|
||||
|
||||
return empty($rows) ? null : $rows[0];
|
||||
}
|
||||
|
||||
public static function findAllBy($field, $value = null)
|
||||
{
|
||||
$field = is_array($field) ? $field : array($field => $value);
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
|
||||
foreach ($field as $key => $value) {
|
||||
$c->add($key, $value, Criteria::EQUAL);
|
||||
}
|
||||
|
||||
return RoutePeer::doSelect($c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user