Ask questions about installing and configuring ProcessMaker 3
#823715
Hi,
On processmaker 3.0.15 self hosted on ubuntu server 14.04.2 with mysql 5.6.19, I got the following error when manually launching cron.php :
* Unpausing applications......................................[WITH ERRORS]
'-Unable to execute INSERT statement. [wrapped: Could not execute update [Native Error: Column 'APP_NUMBER' cannot be null] [User Info: INSERT INTO APP_DELEGATION (`APP_UID`,`DEL_INDEX`,`DEL_PREVIOUS`,`DEL_LAST_INDEX`,`PRO_UID`,`TAS_UID`,`USR_UID`,`DEL_TYPE`,`DEL_THREAD`,`DEL_THREAD_STATUS`,`DEL_PRIORITY`,`DEL_DELEGATE_DATE`,`DEL_INIT_DATE`,`DEL_FINISH_DATE`,`DEL_TASK_DUE_DATE`,`DEL_RISK_DATE`,`DEL_DURATION`,`DEL_QUEUE_DURATION`,`DEL_DELAY_DURATION`,`DEL_STARTED`,`DEL_FINISHED`,`DEL_DELAYED`,`DEL_DATA`,`APP_OVERDUE_PERCENTAGE`) VALUES ('39316480356a496dd31c103053510276',3,0,1,'205016814564c5cb1757640036305518','218458590566312d6059733051117386','5585644715690f333a565b5048834426','NORMAL',1,'OPEN','3','2019-04-02 16:30:31','2016-01-24 10:42:43','2016-01-24 10:42:43','2019-04-03 16:30:31','2019-04-03 14:54:31',0,0,0,1,1,0,'',0)]]
It seems that a trigger (APP_DELEGATION_INSERT) is executed before inserting into table APP_DELEGATION thus creating the error.

Any idea how to correct this error ?

Thanks

Regards.
#823719
Enter your MySQL database from the command line:
mysql -u root -p

If you don't remember the root password, then use the username, password and the workspace database used by ProcessMaker in your shared/sites/{WORKSPACE}/db.php file.

Then find the APP_NUMBER for the case:
use wf_workflow; #you may have to change wf_workflow to the name of your workspace's database
SELECT * FROM APPLICATION WHERE APP_UID='39316480356a496dd31c103053510276';

Check if there is a set APP_NUMBER. Then check if the same APP_NUMBER is set in the other records for the case:
SELECT * FROM APP_DELEGATION WHERE APP_UID='39316480356a496dd31c103053510276';
SELECT * FROM APP_CACHE_VIEW WHERE APP_UID='39316480356a496dd31c103053510276';

If you find that the APP_NUMBER is empty, then you will need to set it. For example, if you see that the APP_NUMBER is 101 in the other case records, then set it to 101 this way:
UPDATE APP_DELEGATION SET APP_NUMBER=101 WHERE APP_UID='39316480356a496dd31c103053510276';
UPDATE APP_CACHE_VIEW SET APP_NUMBER=101 WHERE APP_UID='39316480356a496dd31c103053510276';

Then exit MySQL:
EXIT;
#823732
Hi,
In APP_DELEGATION there is not the column APP_NUMBER
mysql> describe APP_DELEGATION;
+------------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+-------------+------+-----+---------+-------+
| APP_UID | varchar(32) | NO | PRI | | |
| DEL_INDEX | int(11) | NO | PRI | 0 | |
| DEL_PREVIOUS | int(11) | NO | | 0 | |
| DEL_LAST_INDEX | int(11) | NO | | 0 | |
| PRO_UID | varchar(32) | NO | | | |
| TAS_UID | varchar(32) | NO | | | |
| USR_UID | varchar(32) | NO | | | |
| DEL_TYPE | varchar(32) | NO | | NORMAL | |
| DEL_THREAD | int(11) | NO | | 0 | |
| DEL_THREAD_STATUS | varchar(32) | NO | | OPEN | |
| DEL_PRIORITY | varchar(32) | NO | | 3 | |
| DEL_DELEGATE_DATE | datetime | NO | | NULL | |
| DEL_INIT_DATE | datetime | YES | | NULL | |
| DEL_FINISH_DATE | datetime | YES | | NULL | |
| DEL_TASK_DUE_DATE | datetime | YES | | NULL | |
| DEL_RISK_DATE | datetime | YES | | NULL | |
| DEL_DURATION | double | YES | | 0 | |
| DEL_QUEUE_DURATION | double | YES | | 0 | |
| DEL_DELAY_DURATION | double | YES | | 0 | |
| DEL_STARTED | tinyint(4) | YES | | 0 | |
| DEL_FINISHED | tinyint(4) | YES | | 0 | |
| DEL_DELAYED | tinyint(4) | YES | | 0 | |
| DEL_DATA | mediumtext | NO | | NULL | |
| APP_OVERDUE_PERCENTAGE | double | NO | | 0 | |
+------------------------+-------------+------+-----+---------+-------+
In APP_CACHE_VIEW, the column APP_NUMBER exists and the select query returns a non empty APP_NUMBER.
#823773
amosbatto wrote: Wed Apr 03, 2019 11:59 pm Oh, you are right, APP_DELEGATION doesn't have the APP_NUMBER field.

Are you seeing a value in the APP_NUMBER field in the other two tables for the case?
What at the other two tables ?

As I said before : In APP_CACHE_VIEW, the column APP_NUMBER exists and the select query returns a non empty APP_NUMBER.

Is APP_CACHE_VIEW one of the two other tables you are talking about ?
#823793
OK, so both APPLICATION.APP_NUMBER and APP_CACHE_VIEW.APP_NUMBER have the correct value, so the database records for the case aren't the problem.

Is this a Manual or Bitnami install? What version of PHP?

Have you upgraded ProcessMaker? Just in case, let's update your database:
cd /opt/processmaker
php processmaker database-upgrade

See: https://wiki.processmaker.com/processma ... se-upgrade

Also, does this occur with many different processes or does it only occur in one process? If it is only caused by one process, would you mind posting your process for testing?
Also, check the database record for the case in the APP_DELAY table. Is all the information correct?

Please file a bug report about this and post a link to your bug report here. Maybe the dev team has some idea.
#823896
Hi,
Sorry for delay.
It is a manual installation of 3.0.0.5 upgraded to 3.0.1.5.
Php version is PHP 5.5.9-1ubuntu4.13 (cli) (built: Sep 29 2015 15:24:49)

The command php processmaker database-upgrade produced the following :
Code: Select all
Upgrading database in workflow
-> 7 tables to alter
-> Nothing to change in the data base structure of RBAC
-> Row updated in DASHLET
-> Row updated in DASHLET
-> Row updated in DASHLET
-> Row updated in DASHLET
0 records where patched to use SELF_SERVICE feature.
-> Schema fixed
The issue is still there when I manually launch
Code: Select all
php -f /opt/processmaker/workflow/engine/bin/cron.php +wworkflow
By commenting functions in the file /opt/processmaker/workflow/engine/bin/cron_single.php , it seems that the function unpauseApplications() (called near line 1019) is the one causing this issue :
Code: Select all
[WITH ERRORS]
  '-Unable to execute INSERT statement. [wrapped: Could not execute update [Native Error: Column 'APP_NUMBER' cannot be null] [User Info: INSERT INTO APP_DELEGATION (`APP_UID`,`DEL_INDEX`,`DEL_PREVIOUS`,`DEL_LAST_INDEX`,`PRO_UID`,`TAS_UID`,`USR_UID`,`DEL_TYPE`,`DEL_THREAD`,`DEL_THREAD_STATUS`,`DEL_PRIORITY`,`DEL_DELEGATE_DATE`,`DEL_INIT_DATE`,`DEL_FINISH_DATE`,`DEL_TASK_DUE_DATE`,`DEL_RISK_DATE`,`DEL_DURATION`,`DEL_QUEUE_DURATION`,`DEL_DELAY_DURATION`,`DEL_STARTED`,`DEL_FINISHED`,`DEL_DELAYED`,`DEL_DATA`,`APP_OVERDUE_PERCENTAGE`) VALUES ('39316480356a496dd31c103053510276',4,0,1,'205016814564c5cb1757640036305518','218458590566312d6059733051117386','5585644715690f333a565b5048834426','NORMAL',1,'OPEN','3','2019-04-10 15:20:56','2016-01-24 10:42:43','2016-01-24 10:42:43','2019-04-11 15:20:56','2019-04-11 13:44:56',0,0,0,1,1,0,'',0)]]
Also, does this occur with many different processes or does it only occur in one process?
I can't see because each time the function unpauseApplications() is called I got this error.
Also, check the database record for the case in the APP_DELAY table. Is all the information correct?
I got 1866 rows in table APP_DELAY, I don't know what to look for in order to determine if information are correct there.
#823918
Can you post the output of this command executed in the MySQL?
SELECT * FROM APP_DELAY WHERE APP_UID='39316480356a496dd31c103053510276';

Maybe something didn't upgrade correctly. Just to make sure, do this:
cd /opt/processmaker
php processmaker upgrade
php processmaker cacheview-repair
php processmaker database-verify-consistency


Do you see anything odd?
#823963
Code: Select all
mysql> SELECT * FROM APP_DELAY WHERE APP_UID='39316480356a496dd31c103053510276' \G;
*************************** 1. row ***************************
              APP_DELAY_UID: 36660590356a49c93977e38094178915
                    PRO_UID: 205016814564c5cb1757640036305518
                    APP_UID: 39316480356a496dd31c103053510276
           APP_THREAD_INDEX: 1
              APP_DEL_INDEX: 2
                   APP_TYPE: PAUSE
                 APP_STATUS: TO_DO
              APP_NEXT_TASK: 0
        APP_DELEGATION_USER: 5585644715690f333a565b5048834426
     APP_ENABLE_ACTION_USER: 5585644715690f333a565b5048834426
     APP_ENABLE_ACTION_DATE: 2016-01-24 10:42:43
    APP_DISABLE_ACTION_USER: 0
    APP_DISABLE_ACTION_DATE: 2016-01-24 10:42:00
APP_AUTOMATIC_DISABLED_DATE: NULL
1 row in set (0,00 sec)
Code: Select all
php processmaker upgrade

Checking files integrity...
checksum.txt not found, integrity check is not possible
Integrity check failed, do you want to continue the upgrade? [Y/n] y
Clearing cache...
...
Upgrading workspaces (2/2): workflow
> Updating database...
-> Nothing to change in the data base structure of WORKFLOW
-> Nothing to change in the data base structure of RBAC
-> Row updated in DASHLET
-> Row updated in DASHLET
-> Row updated in DASHLET
-> Row updated in DASHLET
0 records where patched to use SELF_SERVICE feature.
<*>   Database Upgrade Process took 0.59812307357788 seconds.
> Verify enterprise old...
    Without changes... 
<*>   Verify took 4.5061111450195E-5 seconds.
> Updating translations...
Updating database translations with processmaker.fr-FR.po
Updating database translations with processmaker.en.po
<*>   Updating Translations Process took 10.897799968719 seconds.
> Updating Content...
Rows Processed ---> 306482 ..... 
Rows Clustered ---> 153241 ..... 
Rows Unchanged ---> 306482 ..... 
Rows Inserted  ---> 0 ..... 
Rows Total     ---> 306482 ..... 
<*>   Updating Content Process took 32.88249707222 seconds.
> Check Mafe Requirements...
<*>   Check Mafe Requirements Process took 0.0010199546813965 seconds.
> Updating cache view...
-> Creating tables 
-> Update DEL_LAST_INDEX field in APP_DELEGATION table 
-> Verifying roles permissions in RBAC 
    All roles permissions already updated 
-> Creating triggers
<*>   Updating cache view Process took 1.1435961723328 seconds.
> Backup log files...
<*>   Backup log files Process took 0.00040602684020996 seconds.
> Migrate new lists...
> Completed table LIST_CANCELED
> Completed table LIST_COMPLETED
> Completed table LIST_INBOX
> Completed table LIST_PARTICIPATED_HISTORY
> Completed table LIST_PARTICIPATED_LAST
> Completed table LIST_MY_INBOX
> Completed table LIST_PAUSED
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
PHP Warning:  trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353

Warning: trim() expects parameter 1 to be string, array given in /opt/processmaker/workflow/engine/classes/model/ListUnassigned.php on line 353
Errors upgrading workspace workflow: Unable to execute INSERT statement. [wrapped: Could not execute update [Native Error: Duplicate entry '9002431255caefd0f2fbac2008542104-21806455959cd26fcbc78b804153475' for key 'PRIMARY'] [User Info: INSERT INTO LIST_UNASSIGNED_GROUP (`UNA_UID`,`USR_UID`,`TYPE`,`TYP_UID`) VALUES ('9002431255caefd0f2fbac2008542104','21806455959cd26fcbc78b8041534758','USER','')]]

Safe upgrade for files cached by the browser

Upgrade finished but there were errors upgrading workspaces.
Please check the log above to correct any issues.
Code: Select all
php processmaker cacheview-repair 

Upgrading cache view for workflow
-> Creating tables 
-> Update DEL_LAST_INDEX field in APP_DELEGATION table 
-> Verifying roles permissions in RBAC 
    All roles permissions already updated 
-> Creating triggers
-> Rebuild Cache View with language en...
Code: Select all
php processmaker database-verify-consistency

Command not found: 'database-verify-consistency'

usage: processmaker <task> [options] [args]
       If using Linux/UNIX, prepend './' to specify the directory: processmaker <task> [options] [args]
Type   'processmaker help <task>' for help on a specific task.

Available tasks:
  browser-cache-files-upgrade
  build-js
  cacheview-repair
  database-generate-self-service-by-value
  database-upgrade
  flush-cache
  help
  hotfix-install
  info
  mafe-translation
  migrate-cases-folders
  plugins-database-upgrade
  plugins-translation-create
  plugins-translation-update
  translation-repair
  upgrade
  workspace-backup
  workspace-restore
  workspace-upgrade

#823993
Is this line 353 of your model/ListUnassigned.php file?
if ($taskGroupVariable != "" && isset($applicationData[$taskGroupVariable]) && trim($applicationData[$taskGroupVariable]) != "") {

Looking at the code, I don't understand how you are getting an array instead of a string. I can't your error in bugs.processmaker.com or in our internal bug tracker.

You can try upgrading ProcessMaker (I don't recommend upgranding beyond version 3.2.1) and see if that fixes the problem.

You can also file a bug report about the problem. Maybe the Dev team has an idea how to fix it.
#824011
Hi,
Line 353 is exactly the one you post.
But I think I figure it out. I got 13 time the error "PHP Warning: trim() ... " In table LIST_UNASSIGNED I got 13 rows in which the APP_TITLE column has text value like that :
[society_name][division] : text bla bla
My guess is that the bracket is seen as an array whereas it's just text.

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[…]