Ask questions about installing and configuring ProcessMaker 3
By marcosfpa
#813074
My MySQL gave me a stick and I had to remove it without being able to back up the databases of my workspaces. Is it possible to somehow recover these workspaces since the shared / sites folder was not deleted?
User avatar
By amosbatto
#813080
Oh, that's bad!!! There is no way to recover the databases if you loose them. The processmaker/shared directory only holds the files that were uploaded or generated for the cases, but the case data is gone. Sorry.
By marcosfpa
#813115
I found a backup of the data I had (data only, not the structure), I created a workspace and tried to import the data but the following error occurs:

Erro
Comando SQL:

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`, `DELEGATION_ID`, `APP_NUMBER`, `USR_ID`, `PRO_ID`, `TAS_ID`) VALUES ('1007411525a3cd67edf3553098759193', 1, 0, 0, '940156517571a2ccc7da975064977550', 'ste-89152574edef2e0ed24026783375', '', 'NORMAL', 1, 'CLOSED', '3', '2017-12-22 07:55:10', '2017-12-22 07:55:10', '2017-12-22 07:55:10', '2017-12-22 17:30:00', '2017-12-22 15:54:00', 0, 0, 0, 1, 1, 0, '', 0, 1490, 816, 0, 16, 88), ('1007411525a3cd67edf3553098759193', 2, 1, 1, '940156517571a2ccc7da975064977550', '989869268571a656a04b527050986798', '00000000000000000000000000000001', 'NORMAL', 1, 'CLOSED', '3', '2017-12-22 [...]

Mensagens do MySQL : Documentação

#1048 - Column 'APP_PRO_TITLE' cannot be null


Any idea how to get around?
User avatar
By amosbatto
#813123
You only have a .sql file of your database? In the future you should use the processmaker workspace-backup command to avoid these problems.

That error message is caused by the APP_DELEGATION_INSERT trigger which is trying to insert into the APP_CACHE_VIEW.APP_PRO_TITLE, but the CONTENT table doesn't yet have a record for the process title in the default language, so trying to insert a NULL which isn't allowed.

First, edit your
<INSTALL-DIR>/processmaker/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql file and change this line from:
Code: Select all
  SET @DEFAULT_LANG = '{lang}';
To:
Code: Select all
  SET @DEFAULT_LANG = 'en';
If you created your processes when the ProcessMaker system language was pt-BR, then you would use:
Code: Select all
  SET @DEFAULT_LANG = 'pt-BR';
Note: If you aren't sure which language you used, then you can use this query after you finished importing the database:
SELECT CON_LANG FROM CONTENT WHERE CON_CATEGORY='PRO_TITLE';
Then drop and recreate the trigger with the correct language.


Then, drop (delete) the trigger: and then later recreate after you have restored the database:
mysql -u root -p
mysql> use wf_workflow;
(change to the name of your database)
mysql> DROP TRIGGER IF EXISTS APP_DELEGATION_INSERT;
mysql> source your_database_backup.sql
Then, recreate the trigger:
mysql> source <INSTALL-DIR>/processmaker/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql

You might have to drop other triggers as well. I have never tried to do a restore from an .sql file in PM 3.X, so I don't know what other problems you might encounter, but they are probably related to triggers, which also be found in the workflow/engine/methods/setup/setupSchemas directory if you want to drop them and later recreate them. After you have finished, log into PM and go to Admin > Case List Cache Builder and click on the "Build Cache" button.
By marcosfpa
#813136
Now:

"
Erro
Comando SQL: Documentação

INSERT INTO `ADDITIONAL_TABLES` (`ADD_TAB_UID`, `ADD_TAB_NAME`, `ADD_TAB_CLASS_NAME`, `ADD_TAB_DESCRIPTION`, `ADD_TAB_SDW_LOG_INSERT`, `ADD_TAB_SDW_LOG_UPDATE`, `ADD_TAB_SDW_LOG_DELETE`, `ADD_TAB_SDW_LOG_SELECT`, `ADD_TAB_SDW_MAX_LENGTH`, `ADD_TAB_SDW_AUTO_DELETE`, `ADD_TAB_PLG_UID`, `DBS_UID`, `PRO_UID`, `ADD_TAB_TYPE`, `ADD_TAB_GRID`, `ADD_TAB_TAG`) VALUES ('193002012576d9c6e6e7f17037336587', 'PMT_CONTRATOS', 'PmtContratos', '', 0, 0, 0, 0, 0, 0, '', 'workflow', '', '', '', ''), ('330857286583581d943fe55090272918', 'PMT_PLANOS_VENDAS', 'PmtPlanosVendas', '', 0, 0, 0, 0, 0, 0, '', 'workflow', '229516790574c435639e551060460445', 'NORMAL', '', ''), ('36550498158ad7f96b6fa27024327703', 'PMT_CONTASCLIENTES', 'PmtContasclientes', '', 0, 0, 0, 0, 0, 0, '', 'workflow', '', '', '', ''), ('37060669257eeb8d1285670078615501', 'PMT_FATURAMENTO_SERVICOS', 'PmtFaturamentoServicos', '', 0, 0, 0, 0, 0, 0, '', 'workflow', '2428177175701661052ffb7070287474', 'NORMAL', '', ''), ('53739467458acf2cc9b1[...]

Mensagens do MySQL : Documentação

#1146 - Table 'wf_optimize.ADDITIONAL_TABLES' doesn't exist
"
User avatar
By amosbatto
#813143
Login to PM in your workspace and go to Admin > PM Tables and create a new PM Table. That should add the ADDITIONAL_TABLES table to the database.

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

Betvisa clone scripts are pre-built software solut[…]