Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
#3907
I have such a situation that i need to determine an upper limit for GridForms.

The reason for that is i want to be able to find cases in long term,
For ex. i have a personel request form ,and i need to request 20 personnel at once in same dynaform inside a process.
Here is the problem, it will be almost impossible to reach that case after 2 months (to see the situation of one personnel etc)

in consequence i need to determine the upper limit of the grid rows Or I need to find a way to search (reach) that case according the personnel names after few months it starts.

Any Idea ?
#3924
I think you have reached the limitation of the MySQL field rather than the number of rows.

With the latest version of PM (2552), the User field in the MySQL database is "medium text", and the size of the user field is about 600 KBytes.

iIn this field (APP_DATA), yu'll find all the fields of your form, plus all the variables "@@" used in yout triggers.
So, imagine you have a variable "@@MyVariable" which collect the result of a query with you 20 persons, you store all this result in your field, and you have an overflow.

To avoid this problem, use standard PHP variables i.e "$MyVariable" instead of "@@MyVariable".
#3930
The data from a case is stored in the WF_WORKFLOW.APPLICATION.APP_DATA field, which as atissot noted is a MySQL mediumtext field. It can hold 16MB (2^24 bytes) of data. You probably won't run into the upper limits in most cases. Even if you enter a Input Document for every entry in the grid, those are stored in a separate table with just a reference to the document.

However, to be safe, you could write a trigger with the following code:
Code: Select all
$app = @@APPLICATION;
$query = executeQuery("SELECT LENGTH(APP_DATA)) AS CASE_LEN, APP_NUMBER, APP_CREATE_DATE, " .
    "APP_UPDATE_DATE FROM APPLICATION WHERE APP_UID='$app'");

//If you want to debug this, uncomment the following line and activate Debug mode to see its contents when running a case:
//@@debugQuery = $query;

//error check to make sure you get a valid response
if (is_array($query) && len($query) >= 1)
{
     $caseLen = $query[1]['CASE_LEN'];
     @@CaseLength = $caseLen; //assign to a case variable for use in the email template

     if ($caseLen > 15 * 1024 * 1024);  //if greater than 15MB
     {
          @@CaseNo =  $query[1]['APP_NUMBER'];
          @@CaseCreated = $query[1]['APP_CREATE_DATE'];
          @@CaseUpdated = $query[1]['APP_UPDATE_DATE'];
        
           # Note that you need to have configured ProcessMaker to send email in ADMIN > EMAIL
           PMFSendMessage(@@APPLICATION, "processmaker_admin@example.com", "your_email@example.com", "", "", 
                  "Warning: Approaching space limits for case", "OverflowWarningTemplate.txt");
     }
}

Then create an email template named "OverflowWarningTemplate.txt". See:
http://wiki.processmaker.com/index.php/ ... ifications

Put the following text in the template:
Code: Select all
Warning: Case @@CaseNo is currently using @@CaseLength bytes of data. The maximum is 16MB (2^24 bytes). 
To avoid problems do not add more data to the case.

Case ID: @@APPLICATION
Case No: @@CaseNo
Case Created: @@CaseCreated
Case Updated: @@CaseUpdated

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]