Moving the Features folder again in order to ensure compatibility with the namespaces convention
@@ -334,7 +334,7 @@ class WebApplication
|
|||||||
}
|
}
|
||||||
|
|
||||||
// adding features extension api classes
|
// adding features extension api classes
|
||||||
$featuresPath = $this->workflowDir .'engine' . DS . 'features';
|
$featuresPath = $this->workflowDir .'engine' . DS . 'Features';
|
||||||
// $apiDir - contains directory to scan classes and add them to Restler
|
// $apiDir - contains directory to scan classes and add them to Restler
|
||||||
$featureDirList = glob($featuresPath . "/*", GLOB_ONLYDIR);
|
$featureDirList = glob($featuresPath . "/*", GLOB_ONLYDIR);
|
||||||
foreach ($featureDirList as $directory) {
|
foreach ($featureDirList as $directory) {
|
||||||
@@ -430,7 +430,7 @@ class WebApplication
|
|||||||
define("PATH_XMLFORM", PATH_CORE . "xmlform" . PATH_SEP);
|
define("PATH_XMLFORM", PATH_CORE . "xmlform" . PATH_SEP);
|
||||||
define("PATH_CONFIG", PATH_CORE . "config" . PATH_SEP);
|
define("PATH_CONFIG", PATH_CORE . "config" . PATH_SEP);
|
||||||
define("PATH_PLUGINS", PATH_CORE . "plugins" . PATH_SEP);
|
define("PATH_PLUGINS", PATH_CORE . "plugins" . PATH_SEP);
|
||||||
define("PATH_FEATURES", PATH_CORE . "features" . PATH_SEP);
|
define("PATH_FEATURES", PATH_CORE . "Features" . PATH_SEP);
|
||||||
define("PATH_HTMLMAIL", PATH_CORE . "html_templates" . PATH_SEP);
|
define("PATH_HTMLMAIL", PATH_CORE . "html_templates" . PATH_SEP);
|
||||||
define("PATH_TPL", PATH_CORE . "templates" . PATH_SEP);
|
define("PATH_TPL", PATH_CORE . "templates" . PATH_SEP);
|
||||||
define("PATH_TEST", PATH_CORE . "test" . PATH_SEP);
|
define("PATH_TEST", PATH_CORE . "test" . PATH_SEP);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
define( 'PATH_METHODS', PATH_CORE . 'methods' . PATH_SEP );
|
define( 'PATH_METHODS', PATH_CORE . 'methods' . PATH_SEP );
|
||||||
define( 'PATH_XMLFORM', PATH_CORE . 'xmlform' . PATH_SEP );
|
define( 'PATH_XMLFORM', PATH_CORE . 'xmlform' . PATH_SEP );
|
||||||
define( 'PATH_PLUGINS', PATH_CORE . 'plugins' . PATH_SEP );
|
define( 'PATH_PLUGINS', PATH_CORE . 'plugins' . PATH_SEP );
|
||||||
define( 'PATH_FEATURES', PATH_CORE . 'features' . PATH_SEP );
|
define( 'PATH_FEATURES', PATH_CORE . 'Features' . PATH_SEP );
|
||||||
define( 'PATH_HTMLMAIL', PATH_CORE . 'html_templates' . PATH_SEP );
|
define( 'PATH_HTMLMAIL', PATH_CORE . 'html_templates' . PATH_SEP );
|
||||||
define( 'PATH_TPL', PATH_CORE . 'templates' . PATH_SEP );
|
define( 'PATH_TPL', PATH_CORE . 'templates' . PATH_SEP );
|
||||||
define( 'PATH_TEST', PATH_CORE . 'test' . PATH_SEP );
|
define( 'PATH_TEST', PATH_CORE . 'test' . PATH_SEP );
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Features;
|
||||||
/**
|
/**
|
||||||
* Description of ActionsByEmailFeature
|
* Description of ActionsByEmailFeature
|
||||||
*
|
*
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace ProcessMaker\Services\Api;
|
namespace Features\ActionsByEmail\Services;
|
||||||
|
|
||||||
use \ProcessMaker\Services\Api;
|
use \ProcessMaker\Services\Api;
|
||||||
use \Luracast\Restler\RestException;
|
use \Luracast\Restler\RestException;
|
||||||
@@ -13,12 +13,12 @@ require_once 'classes/model/Application.php';
|
|||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ActionsByEmail
|
* Class ActionsByEmailApi
|
||||||
*
|
*
|
||||||
* @author gustavo cruz <gustavo.cruz@colosa.com>
|
* @author gustavo cruz <gustavo.cruz@colosa.com>
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
class ActionsByEmail extends Api
|
class ActionsByEmailApi extends Api
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,6 +203,7 @@ class ActionsByEmail extends Api
|
|||||||
throw $error;
|
throw $error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -318,6 +319,7 @@ class ActionsByEmail extends Api
|
|||||||
$response = array();
|
$response = array();
|
||||||
$response['totalCount'] = $totalCount;
|
$response['totalCount'] = $totalCount;
|
||||||
$response['data'] = $data;
|
$response['data'] = $data;
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -431,8 +433,7 @@ class ActionsByEmail extends Api
|
|||||||
$message = 'An unexpected error occurred please try again later.';
|
$message = 'An unexpected error occurred please try again later.';
|
||||||
}
|
}
|
||||||
|
|
||||||
print_r($message);
|
return $message;
|
||||||
die;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -512,9 +513,7 @@ class ActionsByEmail extends Api
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $message;
|
||||||
print_r($message);
|
|
||||||
die;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
@@ -0,0 +1,220 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Description of ActivityViews
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ActivityConfigurationView
|
||||||
|
{
|
||||||
|
public function retrieveView()
|
||||||
|
{
|
||||||
|
$view = array(
|
||||||
|
'type' => 'form',
|
||||||
|
'language' => 'en',
|
||||||
|
'title' => 'Actions by email configuration',
|
||||||
|
'layouts' => array(),
|
||||||
|
'fields' => array(
|
||||||
|
array(
|
||||||
|
'name' => 'IFORM',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'INDEX',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_UID',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'PRO_UID',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'PRJ_UID',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'TAS_UID',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'SYS_LANG',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_EMAIL_FIELD_VALUE',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_ACTION_FIELD_VALUE',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_TYPE',
|
||||||
|
'label' => 'Type',
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'options' => array(
|
||||||
|
array(
|
||||||
|
'name' => '',
|
||||||
|
'value' => '',
|
||||||
|
'text' => '- None -',
|
||||||
|
'type' => 'default'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'LINK',
|
||||||
|
'value' => 'LINK',
|
||||||
|
'text' => 'Link to fill a form',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'FIELD',
|
||||||
|
'value' => 'FIELD',
|
||||||
|
'text' => 'Use a field to generate actions links',
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_TEMPLATE',
|
||||||
|
'label' => 'Template',
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'data_source' => array(
|
||||||
|
'type' => 'REST',
|
||||||
|
'method' => 'GET',
|
||||||
|
'end_point' => '/ActionsByEmail/Templates',
|
||||||
|
'parameters' => array()
|
||||||
|
),
|
||||||
|
'options' => array(
|
||||||
|
array(
|
||||||
|
'name' => '',
|
||||||
|
'value' => '',
|
||||||
|
'text' => '- Select a Template -',
|
||||||
|
'type' => 'default'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'EDIT',
|
||||||
|
'type' => 'link',
|
||||||
|
'value' => 'Edit',
|
||||||
|
'action' => array(
|
||||||
|
'type' => 'view-render',
|
||||||
|
'data_source' => array(
|
||||||
|
'type' => 'REST',
|
||||||
|
'method' => 'GET',
|
||||||
|
'end_point' => '/ActionsByEmail/Templates/editTemplate',
|
||||||
|
'parameters' => array('ABE_TEMPLATE')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'DYN_UID',
|
||||||
|
'label' => 'Dynaform',
|
||||||
|
'value' => 'DYN_UID',
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'data_source' => array(
|
||||||
|
'type' => 'REST',
|
||||||
|
'method' => 'GET',
|
||||||
|
'end_point' => '/project/{prj_uid}/dynaforms',
|
||||||
|
'parameters' => array()
|
||||||
|
),
|
||||||
|
'options' => array(
|
||||||
|
array(
|
||||||
|
'name' => '',
|
||||||
|
'value' => '',
|
||||||
|
'text' => '- Select a Dynaform -',
|
||||||
|
'type' => 'default'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'events' => array(
|
||||||
|
'change' => array(
|
||||||
|
'listeners' => array('email-field', 'action-field')
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_EMAIL_FIELD',
|
||||||
|
'value' => 'ABE_EMAIL_FIELD',
|
||||||
|
'label' => 'Field with the email',
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'options' => array(
|
||||||
|
array(
|
||||||
|
'name' => '',
|
||||||
|
'value' => '',
|
||||||
|
'text' => '- Send to the email of the assigned user to the task -',
|
||||||
|
'type' => 'default'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'listeners' => array(
|
||||||
|
array(
|
||||||
|
'name' => 'email-field',
|
||||||
|
'action' => array(
|
||||||
|
'type' => 'field-render',
|
||||||
|
'data_source' => array(
|
||||||
|
'type' => 'REST',
|
||||||
|
'method' => 'GET',
|
||||||
|
'end_point' => '/project/{prj_uid}/dynaform/{dyn_uid}/fields',
|
||||||
|
'parameters' => array()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_ACTION_FIELD',
|
||||||
|
'value' => 'ABE_ACTION_FIELD',
|
||||||
|
'label' => 'Field to Send in the Email',
|
||||||
|
'type' => 'dropdown',
|
||||||
|
'options' => array(
|
||||||
|
array(
|
||||||
|
'name' => '',
|
||||||
|
'value' => '',
|
||||||
|
'text' => '- Select a Field -',
|
||||||
|
'type' => 'default'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'listeners' => array(
|
||||||
|
'name' => 'action-field',
|
||||||
|
'action' => array(
|
||||||
|
'type' => 'field-render',
|
||||||
|
'data_source' => array(
|
||||||
|
'type' => 'REST',
|
||||||
|
'method' => 'GET',
|
||||||
|
'end_point' => '/project/:prj_uid/dynaform/:dyn_uid/fields',
|
||||||
|
'parameters' => array()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'ABE_CASE_NOTE_IN_RESPONSE',
|
||||||
|
'value' => true,
|
||||||
|
'default' => false,
|
||||||
|
'label' => 'Register a Case Note when the recipient submits the Response',
|
||||||
|
'type' => 'checkbox'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'APPLY_CHANGES',
|
||||||
|
'type' => 'button',
|
||||||
|
'label' => 'Apply Changes',
|
||||||
|
'value' => 'APPLY_CHANGES',
|
||||||
|
'action' => array(
|
||||||
|
'type' => 'view-close',
|
||||||
|
'data_source' => array(
|
||||||
|
'type' => 'REST',
|
||||||
|
'method' => 'POST',
|
||||||
|
'end_point' => '/ActionsByEmail/saveConfiguration',
|
||||||
|
'parameters' => array('_ALL')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'name' => 'REQUIRED_LABEL',
|
||||||
|
'type' => 'label',
|
||||||
|
'label' => 'Required Field',
|
||||||
|
'value' => 'REQUIRED_LABEL'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
36
workflow/engine/Features/ConfigurationHandler.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
namespace Features;
|
||||||
|
/**
|
||||||
|
* Description of ConfigurationManager
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ConfigurationHandler
|
||||||
|
{
|
||||||
|
public function retrieveFeatureConfiguration($feature)
|
||||||
|
{
|
||||||
|
$configuration = new stdClass();
|
||||||
|
$configuration->views = $this->retrieveViews($feature);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function retrieveViews($feature, $type = 'configuration')
|
||||||
|
{
|
||||||
|
require_once $feature->path . PATH_SEPARATOR . $feature->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getViewList($feature)
|
||||||
|
{
|
||||||
|
$forbiddenFolders = array();
|
||||||
|
$views = glob($feature->path.'/*', GLOB_ONLYDIR);
|
||||||
|
$viewFiles = array();
|
||||||
|
foreach ($views as $directory) {
|
||||||
|
$feature = new stdClass();
|
||||||
|
if (in_array($directory, $forbiddenFolders)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$feature->path = PATH_FEATURES . PATH_SEP . $directory;
|
||||||
|
$feature->name = $directory;
|
||||||
|
$viewFiles[] = $feature;
|
||||||
|
}
|
||||||
|
return $viewFiles;
|
||||||
|
}
|
||||||
|
}
|
||||||
19
workflow/engine/Features/FeatureServices.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
namespace Features;
|
||||||
|
|
||||||
|
use Features\ActionsByEmail\views\ActivityConfigurationView;
|
||||||
|
/**
|
||||||
|
* Description of FeaturesService
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class FeatureServices
|
||||||
|
{
|
||||||
|
public function retrieveView($params)
|
||||||
|
{
|
||||||
|
$viewsFolder = 'views';
|
||||||
|
$className = ucfirst($params['type']) . ucfirst($params['view']) . 'View';
|
||||||
|
require_once $viewsFolder.DS.$className.'.php';
|
||||||
|
$view = new $className();
|
||||||
|
return $view->retrieveView();
|
||||||
|
}
|
||||||
|
}
|
||||||
33
workflow/engine/Features/FeaturesHandler.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Features;
|
||||||
|
/**
|
||||||
|
* Description of FeatureManager
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class FeaturesHandler
|
||||||
|
{
|
||||||
|
public function retrieveConfigurations($params)
|
||||||
|
{
|
||||||
|
foreach ($this->getFeatureList() as $feature) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFeatureList()
|
||||||
|
{
|
||||||
|
$invalidFolders = array('ViewContainers');
|
||||||
|
$featuresFolders = glob(PATH_FEATURES.'/*', GLOB_ONLYDIR);
|
||||||
|
$features = array();
|
||||||
|
foreach ($featuresFolders as $directory) {
|
||||||
|
$feature = new stdClass();
|
||||||
|
if (in_array($directory, $invalidFolders)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$feature->path = PATH_FEATURES . PATH_SEP . $directory;
|
||||||
|
$feature->name = $directory;
|
||||||
|
$features[] = $feature;
|
||||||
|
}
|
||||||
|
return $features;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ namespace Features\ViewContainers;
|
|||||||
* Description of TaskContainer
|
* Description of TaskContainer
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class TaskContainer extends ViewContainer
|
class ActivityContainer extends ViewContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
|
||||||
* To change this template file, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
$features['ActionsByEmail']['views'][] = array(
|
|
||||||
'taskConfiguration' => array(
|
|
||||||
'type' => 'form',
|
|
||||||
'language' => 'en',
|
|
||||||
'layouts' => array(),
|
|
||||||
'fields' => array(
|
|
||||||
array(
|
|
||||||
'name' => 'IFORM',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'INDEX',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_UID',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'PRO_UID',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'TAS_UID',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'SYS_LANG',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_EMAIL_FIELD_VALUE',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_ACTION_FIELD_VALUE',
|
|
||||||
'type' => 'hidden'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_TYPE',
|
|
||||||
'label' => 'Type',
|
|
||||||
'type' => 'dropdown',
|
|
||||||
'options' => array(
|
|
||||||
array(
|
|
||||||
'name' => '',
|
|
||||||
'value' => '',
|
|
||||||
'text' => '- None -',
|
|
||||||
'type' => 'default'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'LINK',
|
|
||||||
'value' => 'LINK',
|
|
||||||
'text' => 'Link to fill a form',
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'FIELD',
|
|
||||||
'value' => 'FIELD',
|
|
||||||
'text' => 'Use a field to generate actions links',
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_TEMPLATE',
|
|
||||||
'label' => 'Template',
|
|
||||||
'type' => 'dropdown',
|
|
||||||
'data_source' => array(
|
|
||||||
'type' => 'REST',
|
|
||||||
'method' => 'GET',
|
|
||||||
'end_point' => '/ActionsByEmail/Templates',
|
|
||||||
'parameters' => array()
|
|
||||||
),
|
|
||||||
'options' => array(
|
|
||||||
array(
|
|
||||||
'name' => '',
|
|
||||||
'value' => '',
|
|
||||||
'text' => '- Select a Template -',
|
|
||||||
'type' => 'default'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'EDIT',
|
|
||||||
'type' => 'link',
|
|
||||||
'value' => 'Edit',
|
|
||||||
'action' => array (
|
|
||||||
'type' => 'view-render',
|
|
||||||
'data_source' => array(
|
|
||||||
'type' => 'REST',
|
|
||||||
'method' => 'GET',
|
|
||||||
'end_point' => '/ActionsByEmail/Templates/editTemplate',
|
|
||||||
'parameters' => array('ABE_TEMPLATE')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'DYN_UID',
|
|
||||||
'value' => 'DYN_UID',
|
|
||||||
'type' => 'dropdown',
|
|
||||||
'data_source' => array(
|
|
||||||
'type' => 'REST',
|
|
||||||
'method' => 'GET',
|
|
||||||
'end_point' => 'Dynaform',
|
|
||||||
'parameters' => array()
|
|
||||||
),
|
|
||||||
'options' => array(
|
|
||||||
array(
|
|
||||||
'name' => '',
|
|
||||||
'value' => '',
|
|
||||||
'text' => '- Select a Dynaform -',
|
|
||||||
'type' => 'default'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'events' => array(
|
|
||||||
'change' => array(
|
|
||||||
'listeners' => array('email-field', 'action-field')
|
|
||||||
)
|
|
||||||
),
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_EMAIL_FIELD',
|
|
||||||
'value' => 'ABE_EMAIL_FIELD',
|
|
||||||
'label' => 'Field with the email',
|
|
||||||
'type' => 'dropdown',
|
|
||||||
'options' => array(
|
|
||||||
array(
|
|
||||||
'name' => '',
|
|
||||||
'value' => '',
|
|
||||||
'text' => '- Send to the email of the assigned user to the task -',
|
|
||||||
'type' => 'default'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'listeners' => array (
|
|
||||||
array (
|
|
||||||
'name' => 'email-field',
|
|
||||||
'action' => array (
|
|
||||||
'type' => 'field-render',
|
|
||||||
'data_source' => array (
|
|
||||||
'type' => 'REST',
|
|
||||||
'method' => 'GET',
|
|
||||||
'end_point' => '/ActionsByEmail/Dynaform/loadFields',
|
|
||||||
'parameters' => array('DYN_UID')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_ACTION_FIELD',
|
|
||||||
'value' => 'ABE_ACTION_FIELD',
|
|
||||||
'label' => 'Field to Send in the Email',
|
|
||||||
'type' => 'dropdown',
|
|
||||||
'options' => array(
|
|
||||||
array(
|
|
||||||
'name' => '',
|
|
||||||
'value' => '',
|
|
||||||
'text' => '- Select a Field -',
|
|
||||||
'type' => 'default'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'listeners' => array(
|
|
||||||
'name' => 'action-field',
|
|
||||||
'action' => array(
|
|
||||||
'type' => 'field-render',
|
|
||||||
'data_source' => array(
|
|
||||||
'type' => 'REST',
|
|
||||||
'method' => 'GET',
|
|
||||||
'end_point' => '/ActionsByEmail/Dynaform/loadFields',
|
|
||||||
'parameters' => array('DYN_UID')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'ABE_CASE_NOTE_IN_RESPONSE',
|
|
||||||
'value' => true,
|
|
||||||
'default' => false,
|
|
||||||
'label' => 'Register a Case Note when the recipient submits the Response',
|
|
||||||
'type' => 'checkbox'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'APPLY_CHANGES',
|
|
||||||
'type' => 'button',
|
|
||||||
'label' => 'Apply Changes',
|
|
||||||
'value' => 'APPLY_CHANGES',
|
|
||||||
'action' => array (
|
|
||||||
'type' => 'view-close',
|
|
||||||
'data_source' => array(
|
|
||||||
'type' => 'REST',
|
|
||||||
'method' => 'POST',
|
|
||||||
'end_point' => '/ActionsByEmail/saveConfiguration',
|
|
||||||
'parameters' => array('_ALL')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'REQUIRED_LABEL',
|
|
||||||
'type' => 'label',
|
|
||||||
'label' => 'Required Field',
|
|
||||||
'value' => 'REQUIRED_LABEL'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Description of ConfigurationManager
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class ConfigurationHandler
|
|
||||||
{
|
|
||||||
//put your code here
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Description of FeatureManager
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class FeatureHandler
|
|
||||||
{
|
|
||||||
//put your code here
|
|
||||||
}
|
|
||||||
@@ -74,7 +74,14 @@ class Activity extends Api
|
|||||||
public function doGetProjectActivityFeatureConfiguration($prj_uid, $act_uid, $filter = '')
|
public function doGetProjectActivityFeatureConfiguration($prj_uid, $act_uid, $filter = '')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return array('status' => 200, 'message' => 'success');
|
$featureServices = new \Features\FeatureServices();
|
||||||
|
$configuration = $featureServices->retrieveView(array(
|
||||||
|
'type' => 'activity',
|
||||||
|
'view' => 'configuration',
|
||||||
|
'prj_uid' => $prj_uid,
|
||||||
|
'act_uid' => $act_uid
|
||||||
|
));
|
||||||
|
return $configuration;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,25 +31,6 @@ class DynaForm extends Api
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @url GET /:prj_uid/dynaform
|
|
||||||
*
|
|
||||||
* @param string $prj_uid {@min 32}{@max 32}
|
|
||||||
*/
|
|
||||||
public function doGetDynaFormList($prj_uid)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
|
|
||||||
$dynaForm->setFormatFieldNameInUppercase(false);
|
|
||||||
|
|
||||||
$response = $dynaForm->getDynaForm();
|
|
||||||
|
|
||||||
return $response;
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @url POST /:prj_uid/dynaform
|
* @url POST /:prj_uid/dynaform
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$loader->add($rootDir . 'workflow/engine/', 'Features');
|
||||||
$loader->add($rootDir . 'workflow/engine/src/', "ProcessMaker");
|
$loader->add($rootDir . 'workflow/engine/src/', "ProcessMaker");
|
||||||
//$loader->add($rootDir . "workflow/engine/classes/model/");
|
|
||||||
$loader->add($rootDir . 'workflow/engine/src/');
|
$loader->add($rootDir . 'workflow/engine/src/');
|
||||||
|
|
||||||
// add vendors to autoloader
|
// add vendors to autoloader
|
||||||
$loader->add($rootDir . 'vendor/luracast/restler/vendor', "Luracast");
|
$loader->add($rootDir . 'vendor/luracast/restler/vendor', "Luracast");
|
||||||
$loader->add($rootDir . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2");
|
$loader->add($rootDir . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2");
|
||||||
|
|||||||