0018094: Batch routing doesn-t work in ProcessMaker 3.0.x
This commit is contained in:
dheeyi
2015-08-25 17:10:02 -04:00
parent e4ee042868
commit 3d7b2e1c4a
2 changed files with 34 additions and 30 deletions

View File

@@ -87,14 +87,16 @@ class ConsolidatedCases
$dataDyna = $pmDyna->getDynaform();
$json = G::json_decode($dataDyna["DYN_CONTENT"]);
$fieldsDyna = $json->items[0]->items;
foreach ($fieldsDyna as $value) {
if(isset($value[0]->type)){
if ($value[0]->type == 'text' || $value[0]->type == 'textarea' || $value[0]->type == 'dropdown' || $value[0]->type == 'checkbox' || $value[0]->type == 'datetime' || $value[0]->type == 'yesno' || $value[0]->type == 'date' || $value[0]->type == 'hidden' || $value[0]->type == 'currency' || $value[0]->type == 'percentage' || $value[0]->type == 'link'){
$_POST['form']['FIELDS'][] = $value[0]->name . '-' . $value[0]->type;
}
foreach ($fieldsDyna as $value) {
foreach ($value as $val) {
if(isset($val->type)){
if ($val->type == 'text' || $val->type == 'textarea' || $val->type == 'dropdown' || $val->type == 'checkbox' || $val->type == 'datetime' || $val->type == 'yesno' || $val->type == 'date' || $val->type == 'hidden' || $val->type == 'currency' || $val->type == 'percentage' || $val->type == 'link'){
$_POST['form']['FIELDS'][] = $val->name . '-' . $val->type;
}
}
}
}
$aFieldsClases = array();
$i = 1;
$aFieldsClases[$i]['FLD_NAME'] = 'APP_UID';

View File

@@ -467,32 +467,34 @@ class Consolidated
$xmlfrm = new \stdclass();
$xmlfrm->fields = array();
foreach ($fieldsDyna as $key => $value) {
if ($value[0]->type == 'title' || $value[0]->type == 'submit' || $value[0]->type == 'panel' || $value[0]->type == 'image' || $value[0]->type == 'button' || $value[0]->type == 'grid' || $value[0]->type == 'checkgroup' || $value[0]->type == 'radiogroup' || $value[0]->type == 'radio' || $value[0]->type == 'hidden' || $value[0]->type == 'link' || $value[0]->type == 'file' || $value[0]->type == 'subform' || $value[0]->type == 'label') {
continue;
}
$temp = new \stdclass();
$temp->type = $value[0]->type;
$temp->label = $value[0]->label;
$temp->name = $value[0]->name;
$temp->required = (isset($value[0]->required)) ? $value[0]->required : 0;
$temp->mode = (isset($value[0]->mode)) ? $value[0]->mode : 'edit';
if (!empty($value[0]->options)) {
$temp->storeData = '[';
foreach ($value[0]->options as $valueOption) {
if(isset($valueOption->value)){
$temp->storeData .= '["' . $valueOption->value . '", "' . $valueOption->label . '"],';
}else{
$temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
}
foreach ($value as $val) {
if ($val->type == 'title' || $val->type == 'submit' || $val->type == 'panel' || $val->type == 'image' || $val->type == 'button' || $val->type == 'grid' || $val->type == 'checkgroup' || $val->type == 'radiogroup' || $val->type == 'radio' || $val->type == 'hidden' || $val->type == 'link' || $val->type == 'file' || $val->type == 'subform' || $val->type == 'label') {
continue;
}
$temp->storeData = substr($temp->storeData,0,-1);
$temp->storeData .= ']';
}
$temp = new \stdclass();
$temp->type = $val->type;
$temp->label = $val->label;
$temp->name = $val->name;
$temp->required = (isset($val->required)) ? $val->required : 0;
$temp->mode = (isset($val->mode)) ? $val->mode : 'edit';
$temp->readOnly = ($temp->mode == 'view') ? "1" : "0";
$temp->colWidth = 200;
$xmlfrm->fields[] = $temp;
if (!empty($val->options)) {
$temp->storeData = '[';
foreach ($val->options as $valueOption) {
if(isset($valueOption->value)){
$temp->storeData .= '["' . $valueOption->value . '", "' . $valueOption->label . '"],';
}else{
$temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
}
}
$temp->storeData = substr($temp->storeData,0,-1);
$temp->storeData .= ']';
}
$temp->readOnly = ($temp->mode == 'view') ? "1" : "0";
$temp->colWidth = 200;
$xmlfrm->fields[] = $temp;
}
}
} else {
$filename = $pro_uid . PATH_SEP . $dyn_uid . ".xml";