Merged in paulis/processmaker/PM-2376 (pull request #2029)

PM-2376 PM-2403: New feature e implementacion de actionsByEmail in Bpmn
This commit is contained in:
Julio Cesar Laura Avendaño
2015-04-30 17:25:30 -04:00
14 changed files with 578 additions and 29 deletions

View File

@@ -19,9 +19,11 @@ class ActionsByEmail
case 'configuration':
require_once 'classes/model/AbeConfiguration.php';
$abeConfigurationInstance = new \AbeConfiguration();
$noteValues = json_decode($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE']);
foreach ($noteValues as $value) {
$feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'] = $value;
if(isset($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'])){
$noteValues = json_decode($feature['fields']['ABE_CASE_NOTE_IN_RESPONSE']);
foreach ($noteValues as $value) {
$feature['fields']['ABE_CASE_NOTE_IN_RESPONSE'] = $value;
}
}
$abeConfigurationInstance->createOrUpdate($feature['fields']);
break;
@@ -50,8 +52,13 @@ class ActionsByEmail
$result->next();
$configuration = array();
if ($configuration = $result->getRow()) {
$configuration['ABE_EMAIL_FIELD_VALUE'] = $configuration['ABE_EMAIL_FIELD'];
$configuration['ABE_ACTION_FIELD_VALUE'] = $configuration['ABE_ACTION_FIELD'];
$configuration['ABE_UID'] = $configuration['ABE_UID'];
$configuration['ABE_TYPE'] = $configuration['ABE_TYPE'];
$configuration['DYN_UID'] = $configuration['DYN_UID'];
$configuration['ABE_TEMPLATE'] = $configuration['ABE_TEMPLATE'];
$configuration['ABE_SUBJECT_FIELD'] = $configuration['ABE_SUBJECT_FIELD'];
$configuration['ABE_EMAIL_FIELD'] = $configuration['ABE_EMAIL_FIELD'];
$configuration['ABE_ACTION_FIELD'] = $configuration['ABE_ACTION_FIELD'];
$configuration['ABE_CASE_NOTE_IN_RESPONSE'] = $configuration['ABE_CASE_NOTE_IN_RESPONSE'] ? '["1"]' : '[]';
}
$configuration['feature'] = 'ActionsByEmail';