Top 10 Features To Lessen Code Written in ProcessMaker
Conditional Editor
One of the most frequent features I see being requested since we moved from 2.x to 3.x is the conditional editor. I always thought that it wasn't really used, but boy was I wrong! I am now asked almost on every call for this feature.
There are two types of conditional editors that I am asked for, I will list them in order of popularity:
- Logical Conditional Editor
- Role Based Conditional Editor
Logical Conditional Editor
Provide a GUI for a Process Architect to be able to define logic for fields on the form being shown or hidden.
For example, a Process Architect may wish to show and mark required, a zipcode text box if the value in the country dropdown is equal to "United States". If the value is not equal to "United States", he will want to remove the required mark and hide the box.
This is a simple example, but we should be able to support complex criteria sets.
For further reference, please see the conditional editor that we have for 2.x: http://wiki.processmaker.com/index.php/2.5.X/DynaForms#Defining_a_Condition
Role Based Conditional Editor
Provide a GUI for a Process Architect to be able to define field level security based on users roles and/or permissions. The users roles/permissions would determine whether or not they are able to access and/or view a specific field on the form.
For example, a Process Architect may wish to show the approval field to any user, so that they can see what the outcome of a decision was, but only allow the user with the supervisor permission in their role to edit the field.
This is a simple example, but we should be able to support complex criteria sets such as multiple roles and multiple permissions with nested permissions.
This has not been implemented in the past in ProcessMaker, but it is something I am seeing being requested more every day.
Data First - Entity Modeling
Provide a GUI for creating data entities and using them within a process and across multiple processes.
Send an Email with an Attachment
In order to attach an input or output document to an email in ProcessMaker, a custom trigger is required with custom code.
It would be extremely helpful for an end user to not have to program this and be able to configure this from a user interface.
For reference, below is one such trigger that generates the output document and then sends it in an email attachment.
// User From $userUid=@@USER_LOGGED; $userUids = userInfo($userUid); $emailFrom = $userUids['mail']; //@@approverName = $userUids['firstname']." ".$userUids['lastname']; //@@approvalDate = date("Y-m-d h:i:sa"); // User next assigned $taskId = '68107740658582cfe067061041584808'; $aUser = PMFGetNextAssignedUser(@@APPLICATION, $taskId); $app = @@APPLICATION; $to = $aUser['USR_EMAIL']; $from = 'no-reply@processmaker.com'; $subject = @@subject; $aFields['user_name'] = $aUser['USR_FIRSTNAME']." ".$aUser['USR_LASTNAME']; $aFields['body']= @@message; // Generate Output document $docId = '96355443458597fa6a2ff06048585959'; //output document unique ID PMFGenerateOutputDocument($docId); /************ Output Welcome Letter ***********/ $aAttachFiles = array(); $caseId = @@APPLICATION; //Unique ID for the current case //change for the Output Document definition's unique ID: $outDocDef = "96355443458597fa6a2ff06048585959"; $outDocQuery = "SELECT AD.APP_DOC_UID, AD.DOC_VERSION, C.CON_VALUE AS FILENAME FROM APP_DOCUMENT AD, CONTENT C WHERE AD.APP_UID='$caseId' AND AD.DOC_UID='$outDocDef' AND AD.APP_DOC_STATUS='ACTIVE' AND AD.DOC_VERSION = ( SELECT MAX(DOC_VERSION) FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND DOC_UID='$outDocDef' AND APP_DOC_STATUS='ACTIVE') AND AD.APP_DOC_UID = C.CON_ID AND C.CON_CATEGORY = 'APP_DOC_FILENAME'"; $outDoc = executeQuery($outDocQuery); if (is_array($outDoc) and count(outDoc) > 0) { $path = PATH_DOCUMENT . $caseId . PATH_SEP . 'outdocs'. PATH_SEP . $outDoc[1]['APP_DOC_UID'] . '_' . $outDoc[1]['DOC_VERSION']; $filename = $outDoc[1]['FILENAME']; $app_string=@@APPLICATION; $a = substr($app_string, 0, 3); $b = substr($app_string, 3, 3); $c = substr($app_string, 6, 3); $d = substr($app_string, 9); $path = PATH_DOCUMENT."$a/$b/$c/$d/".'outdocs/'. $outDoc[1]['APP_DOC_UID'] . '_' . $outDoc[1]['DOC_VERSION']; $aAttachFiles[$filename . '.pdf'] = $path . '.pdf'; } // Send the email with the approval attached PMFSendMessage($app, $from, $to, $cEmailFrom, '', $subject, 'notificationApp.html', $aFields, $aAttachFiles);