Page 1 of 1

process reset itself

Posted: Mon Nov 20, 2017 9:22 am
by azatrath
hi all,

something happened after upgrade my PM version.

now i am using PM 3.2.1 and case reset itself showing with image. and my process in att.

there is a process saving customer to system. and it delete all information in current process. (images showing reverse route 4-3-2-1)

Re: process reset itself

Posted: Mon Nov 20, 2017 5:43 pm
by amosbatto
Go to Admin > Settings > Case List Cache Builder and click on the "Build Cache" button.

If that doesn't solve the problem, then go to the command line of your server and change to the directory where PM is installed and do the upgrade and rebuild the APP_CACHE_VIEW table. For example, in Linux:
cd /opt/processmaker
php processmaker upgrade --buildACV

See: http://wiki.processmaker.com/processmak ... nd#upgrade

Re: process reset itself

Posted: Tue Nov 21, 2017 6:48 am
by azatrath
amosbatto wrote:Go to Admin > Settings > Case List Cache Builder and click on the "Build Cache" button.

If that doesn't solve the problem, then go to the command line of your server and change to the directory where PM is installed and do the upgrade and rebuild the APP_CACHE_VIEW table. For example, in Linux:
cd /opt/processmaker
php processmaker upgrade --buildACV

See: http://wiki.processmaker.com/processmak ... nd#upgrade
ty amos for your reply. it helps me for some of process but that cause another problem about " server didnt send any data"
do i something wrong in my process?

Re: process reset itself

Posted: Tue Nov 21, 2017 7:07 am
by azatrath
another error :
"Fatal error: Can't use function return value in write context in C:\opt\processmaker\workflow\engine\classes\class.pmScript.php(532) : eval()'d code on line 1"

at line 1 only have <?php :/
class.pmScript on attachment

Re: process reset itself

Posted: Tue Nov 21, 2017 11:30 am
by programerboy
Hi,

You get this error on line 532 of "class.pmScript.php" file not line 1.
You get this error maybe in run a process and you must check your gateway conditions or your triggers in your task.

Thanks

Re: process reset itself

Posted: Tue Nov 21, 2017 7:41 pm
by amosbatto
Run these two commands:
Code: Select all
cd /opt/processmaker
php processmaker database-verify-consistency 
php processmaker database-verify-migration-consistency
What is the output of those two commands?

What version of ProcessMaker are you using?
If PM 3.1 or later, then run this command:
php processmaker migrate-content

Re: process reset itself

Posted: Wed Nov 22, 2017 1:45 am
by azatrath
programmerboy, i check all of condition is true. for example if i got 50 cases. 45 is working well and 5 of them getting failure. :/

amosbatto wrote:Run these two commands:
Code: Select all
cd /opt/processmaker
php processmaker database-verify-consistency 
php processmaker database-verify-migration-consistency
What is the output of those two commands?

What version of ProcessMaker are you using?
If PM 3.1 or later, then run this command:
php processmaker migrate-content
amos i am using PM 3.2.1 but i didnt upgrade it. because i was using bitnami PM 3.0.8 when i check forum you said that it cant upgrade. than i unistalled bitnami version and install manual 3.2.1. outputs of commands in attachments.

in addition how can i solve stty error. in web solution doesnt help me.

Re: process reset itself

Posted: Wed Dec 20, 2017 2:31 am
by azatrath
amosbatto wrote:Run these two commands:
Code: Select all
cd /opt/processmaker
php processmaker database-verify-consistency 
php processmaker database-verify-migration-consistency
What is the output of those two commands?

What version of ProcessMaker are you using?
If PM 3.1 or later, then run this command:
php processmaker migrate-content
amos, its me again.

this problem show itself again. in attachment image explain the error.

Re: process reset itself

Posted: Thu Dec 21, 2017 1:44 am
by amosbatto
What do you mean by "upgrade"? Did you export the workspace from version 3.0.8 and then import it into version 3.2.1? If you did that, then you will probably see problems. Did you try to use the database from 3.0.8 in version 3.2.1. Again, you will probably see problems.

Explain exactly how you upgraded.

Re: process reset itself

Posted: Thu Dec 21, 2017 5:27 am
by azatrath
amosbatto wrote:What do you mean by "upgrade"? Did you export the workspace from version 3.0.8 and then import it into version 3.2.1? If you did that, then you will probably see problems. Did you try to use the database from 3.0.8 in version 3.2.1. Again, you will probably see problems.

Explain exactly how you upgraded.
firstly i tried to upgrade but cannot transfer from bitnami installer pm 3.0.8 to manual PM 3.2.1. after that i did manual installation to another server. didnt transfer any data to PM 3.2.1. but shortly this is new and clear PM

Re: process reset itself

Posted: Fri Dec 22, 2017 7:16 pm
by amosbatto
If you did a clean install of PM 3.2.1, and you are using a new /shared directory and a new database, then you should not have these problems.
Your errors say that you have network problems because something in your network changed. Did you change your IP number, port number or proxy server and did you use an IP number, port or proxy when configuring ProcessMaker?

Re: process reset itself

Posted: Thu Jan 11, 2018 2:38 am
by azatrath
amosbatto wrote:If you did a clean install of PM 3.2.1, and you are using a new /shared directory and a new database, then you should not have these problems.
Your errors say that you have network problems because something in your network changed. Did you change your IP number, port number or proxy server and did you use an IP number, port or proxy when configuring ProcessMaker?

hi amos , i have found problem, its so strange.

the problem about trigger which fire after dynaform for update SQL.
this trigger is
Code: Select all
$CASENO = @@M01;
$CTIC = @@M02;
$CDESC = @@M03;
$result = executeQuery("UPDATE PMT_CUSTOMER SET CTIC='$CTIC',CDESC='$CDESC'  WHERE CASENO='$CASENO'");
the CDESC line is a textarea. there is unique characters which is not in english as like as ' ş,ç,ğ,ö' . when i delete CDESC line its all working very good.

i think problem is cant update not english character to MYSQL. i have tried to solve this problem with validate but that text area generally more then 500 leght, and our employee using almost every character in alphabet. how can i block to using only 'ş,ç,ğ,ö'

Re: process reset itself

Posted: Thu Jan 11, 2018 10:20 pm
by amosbatto
Try using this code:
Code: Select all
]$CASENO = mysql_real_escape_string(@@M01);
$CTIC = mysql_real_escape_string(@@M02);
$CDESC = mysql_real_escape_string(@@M03);
$result = executeQuery("UPDATE PMT_CUSTOMER SET CTIC='$CTIC',CDESC='$CDESC'  WHERE CASENO='$CASENO'"); 
If that doesn't work, then try:
Code: Select all
$CASENO = mysql_real_escape_string(@@M01);
$CTIC = mysql_real_escape_string(@@M02);
$CDESC = mysql_real_escape_string(@@M03);
$result = executeQuery("UPDATE PMT_CUSTOMER SET CTIC=\"$CTIC\",CDESC=\"$CDESC\" WHERE CASENO=\"$CASENO\""); 
This should also protect you from SQL code injection attacks.

Re: process reset itself

Posted: Tue Jan 16, 2018 2:32 am
by azatrath
amosbatto wrote:Try using this code:
Code: Select all
]$CASENO = mysql_real_escape_string(@@M01);
$CTIC = mysql_real_escape_string(@@M02);
$CDESC = mysql_real_escape_string(@@M03);
$result = executeQuery("UPDATE PMT_CUSTOMER SET CTIC='$CTIC',CDESC='$CDESC'  WHERE CASENO='$CASENO'");
If that doesn't work, then try:
Code: Select all
$CASENO = mysql_real_escape_string(@@M01);
$CTIC = mysql_real_escape_string(@@M02);
$CDESC = mysql_real_escape_string(@@M03);
$result = executeQuery("UPDATE PMT_CUSTOMER SET CTIC=\"$CTIC\",CDESC=\"$CDESC\" WHERE CASENO=\"$CASENO\"");
This should also protect you from SQL code injection attacks.

i have tried both of them. this is the sentence i want to update a column.
Farmhouse ve fizy için promosyon sipariş söz konusu(125000-150000 m2 arası) özel fiyat verildi. nirvana, ageless, plush,retro overloklu olarak üretilecek. Farmhouse, fizy ve illusion yapıştırma yapılacak.
my field type is varchar and size is 999. when i try to save to PM_TABLE by myself , it saves correctly. but trigger code gave me an error each time.
btw if i cut 2 or more words, it works very well.
this is really annoying. do you have any other solution?

Re: process reset itself

Posted: Wed Jan 17, 2018 1:23 am
by amosbatto
I wonder if executeQuery() is truncating at 256 characters. You need to turn on MySQL query log and look at the SQL query in the log file to see if it is being cut short.
See: https://stackoverflow.com/questions/647 ... -query-log

Re: process reset itself

Posted: Wed Jan 17, 2018 2:04 am
by azatrath
amosbatto wrote:I wonder if executeQuery() is truncating at 256 characters. You need to turn on MySQL query log and look at the SQL query in the log file to see if it is being cut short.
See: https://stackoverflow.com/questions/647 ... -query-log
i have already turn it, but i cant see nothing there. can you check it?
the last line like that
18 Query SELECT TRIGGERS.TRI_UID, TRIGGERS.TRI_TITLE, STEP_TRIGGER.ST_CONDITION, TRIGGERS.TRI_TYPE, TRIGGERS.TRI_WEBBOT FROM STEP_TRIGGER LEFT JOIN TRIGGERS ON (STEP_TRIGGER.TRI_UID=TRIGGERS.TRI_UID) WHERE STEP_TRIGGER.STEP_UID='6140747075a16c864917b41027221335' AND STEP_TRIGGER.TAS_UID='6036682125a166614276544010043922' AND STEP_TRIGGER.ST_TYPE='AFTER' ORDER BY STEP_TRIGGER.ST_POSITION ASC
18 Query SET AUTOCOMMIT=0
18 Query BEGIN

Re: process reset itself

Posted: Wed Jan 17, 2018 10:09 pm
by amosbatto
Your log doesn't contain a "UPDATE PMT_CUSTOMER ..." query. It doesn't look like the query is executing. Do you see the query in your shared/sites/{workspace}/log/processmaker-{YYYY-MM-DD}.log file?

In your env.ini file, add the following settings:
Code: Select all
debug = 1
debug_sql = 1
Turn on the Debug Mode for the process and run a case. In the debugger check to see whether you have an error message in the __ERROR__ variable.

Re: process reset itself

Posted: Wed Jan 17, 2018 10:14 pm
by amosbatto
Also, in your workflow/engine/config/execute-query-blacklist.ini file, change the line from:
Code: Select all
queries  = "INSERT|UPDATE|REPLACE|DELETE|TRUNCATE"
To:
Code: Select all
queries  = "INSERT|REPLACE|DELETE|TRUNCATE"
See: http://wiki.processmaker.com/3.0/Consul ... ore_Tables

Another thing to try is to change from varchar to longvarchar fields in your PM Table. If I recall correctly, PM was limiting varchar fields to 256 characters in some of the older versions of PM.

Re: process reset itself

Posted: Fri Jan 19, 2018 4:51 am
by azatrath
amosbatto wrote:Also, in your workflow/engine/config/execute-query-blacklist.ini file, change the line from:
Code: Select all
queries  = "INSERT|UPDATE|REPLACE|DELETE|TRUNCATE"
To:
Code: Select all
queries  = "INSERT|REPLACE|DELETE|TRUNCATE"
See: http://wiki.processmaker.com/3.0/Consul ... ore_Tables

Another thing to try is to change from varchar to longvarchar fields in your PM Table. If I recall correctly, PM was limiting varchar fields to 256 characters in some of the older versions of PM.
i already did longvarchar, its not about that. i think problem is about trigger. executeQuery is not working. i changed the line with your suggest, but in my file
Code: Select all
queries  = "INSERT|UPDATE|REPLACE|DELETE"
is like that.

i think executeQuery is not working cause of fields limit. when i changed lenght of my sentence is working.
see there is working with short sentence.
<200> Jan 19 10:50:39 sqlExecution INFO: Sql Execution {"ip":"::1","timeZone":"2018-01-19 10:01:39","workspace":"workflow","action":"execute-query","sql":"UPDATE PMT_CUSTOMER SET MUSTERIYORUM=\"Farmhouse ve fizy için promosyon sipariş söz konusu(125000-150000 m2 arası) özel fiyat verildi. nirvana, ageless, plush,retro overloklu olarak üretilecek. Farmhouse, fizy v\" WHERE CASENO=\"925\""} {"file":"C:\\opt\\processmaker\\gulliver\\system\\class.monologProvider.php","line":99,"class":"MonologProvider","function":"addLog"}

Re: process reset itself

Posted: Fri Jan 19, 2018 8:22 pm
by amosbatto
I wonder if the new blacklist code in executeQuery() is causing this problem. Try using this trigger code:
Code: Select all
$CASENO = mysql_real_escape_string(@@M01);
$CTIC = mysql_real_escape_string(@@M02);
$CDESC = mysql_real_escape_string(@@M03);
$sql = "UPDATE PMT_CUSTOMER SET CTIC='$CTIC',CDESC='$CDESC'  WHERE CASENO='$CASENO'"; 
$p = new Propel();
$con = $p->getConnection('workflow');
$con->begin();
$rs = $con->executeUpdate( $sql );
@@result = $con->getUpdateCount();
$con->commit(); 

Re: process reset itself

Posted: Sat Apr 20, 2019 12:55 pm
by Onibns
Hj,

I have the same problem. There's any problem in doing that on a production enviroment? I need to log off all users? Or take a snapshot?

Re: process reset itself

Posted: Mon Apr 22, 2019 7:54 pm
by amosbatto
Onibns,
If you are running a production server, then I recommend that you do a second install of the same version of ProcessMaker in another machine. Then can make a backup of your workspace and then import it into your second installation of ProcessMaker.

What exact problem are you seeing?