Case Notes are used to add comments and observations about cases, which can be read by anyone who has permission to access case notes. A user who has been given that permission can both view and post case notes.
Note: At this time, it is currently not possible to customize the appearance of the case notes pop up screen, it means no modifications on the color of the case notes, selecting specific users to send the case notes, or the number of characters predefined can be done.
Adding Case Notes
Before adding a case notes make sure the permissions are correctly set.
To add a note to a case, go to the HOME menu and open a list of cases.
To add a note to a particular case, click on its icon.
Click on its icon. It will display a new window in which the Note has to be added. Case notes allows up to 1500 characters
- By clicking on the Post button the case note will be added and also an email notification will be sent to all users which participate in the current case, this means that the user assigned to the taks must execute it at least one time to consider him/her as a participant of the case.
- By clicking on the icon the case note window will be closed, cancelling all the information that might be added.
The added note will be as follows:
Next to Case Notes will appear the number, in parenthesis, of the case notes added for a particular case.
Note: Case Notes can't be deleted.
Viewing Existing Case Notes
- Right click on the icon of the list cases and a submenu will appear as follows:
- Click the case to select the information of the case note that need to be displayed, then click on Actions on the above menu and select the option Case Notes.
Sending Email notifications to all Case Participants
After create a case note, the user can decide whether or not to send notifications by email to all users who participate by marking the checkbox under the content of the case note.
If the mouse cursor is over the checkbox a help message will display indicating that the copy will be sent to all participants:
An email will be sent to the participants that contains the case title, author and comments. As of ProcessMaker 3.2.2 on, the email contains the case title, number, author and comments, as follows:
Manipulating Case Notes in PHP
Case notes can be created, updated and deleted using ProcessMaker's AppNotes class (and its parent class BaseAppNotes) which is defined in the file workflow/engine/classes/model/AppNotes.php and needs to be imported with require_once() before using the class.
Creating a Case Note
To create a case note, instantiate an AppNotes object and then call its postNewNote() method in a Trigger. Remember to first pass the content of the case note through PHP's addslashes() function, so that it can be inserted in the database without problems.
For example, the following trigger code posts a note in the current case by the the currently logged-in user to say "This case must be completed by YYYY-MM-DD.", where YYYY-MM-DD is ten days in the future:
$content = "This case must be completed by $dueDate.";
$content = addslashes($content);
$oCaseNotes = new AppNotes();
$oCaseNotes->postNewNote(@@APPLICATION, @@USER_LOGGED, $content);