Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#821980
Hi!

We try to use comminity edition for trial. If we like it, we will buy commercial version. But we have some problems in comminity edition. One of them is to be slow.

We use JavaScript and PHP for MSSQL Database Server. We don't use processmaker elements. And we use HTML to design forms.

As we see, it is quite slow. What can we do to be faster?

For instance, we have 30000 records in a table and we select them in MSSQL Server and it gets most time of us. We are afraid of when our personal began to use it, they will say us it is so slow and we can't work as we want.

Thanks for your helps
Best Regards
#822000
Hi amosbatto!

When I send a request from ajax to php, the query run. Thanks to this query, 30000 records come. We save these 30000 records in an array during loading dynaform. This takes our much time to save an array. It is about one minute. How can we run this rapidly.

Our code is here:

AJAX Code
Code: Select all
var TEST = new FormData();
TEST.append("OPTION", "TUMLISTE");
$.ajax({
    url: ajax_path,
    type: "POST",
    data: TEST,
    dataType: "json",
    processData: false,
    contentType: false,
    success: function (RESULT) {

        TUMLISTE = RESULT.TUM_URUNLER;        
       
    },
    error: function (a, b, c) {
     
    }
});

PHP Code
Code: Select all

switch ($OPTION) {
    case 'TUMLISTE':
  $URUNLER_KISA = $VERILER->mssqlDb->Select("SELECT * FROM STOKLAR");
        $talep_veri = $VERILER->mssqlDb->Select("SELECT * FROM URUNLER");       
        echo json_encode(array("URUNLER_KISA" => $URUNLER_KISA, "TUM_URUNLER" => $talep_veri));

    default:
        # code...
        break;
}
In addition I added a picture of our dynaform.

Best regards.
Attachments
EKRAN GORUNTUSU.PNG
EKRAN GORUNTUSU.PNG (41.66 KiB) Viewed 7101 times
#822010
Why do you need all 30000 database records in your form? Can you limit the database query by adding a WHERE clause? Instead of retrieving all 30000 records, can you search for a particular value entered into a field in your form and use setOnchange() to execute the AJAX code?
#822049
processmakerlover wrote: I look timer start event. Can you send me a sample about timer start event? I couldn't start it
Here is a start timer event that starts a new case every day at 8:30 am:
(36.13 KiB) Downloaded 234 times
Remember that the crontimerevent.php script has to be executed at least twice to start. The first time to set the first execution and the second time to execute it. Then , it should start a new case every day. To set your cron job to periodically execute on your server, see: https://wiki.processmaker.com/3.2/Execu ... nux.2FUNIX
#822092
Hi amosbatto!

I tried it. When I run it in command prompt , it works. But When I try to run it in task schedular, it doesn't run.

In addition, for instance how can I run timercronevent.php each ten minutes regularly?

And When I import your process which you sent me in your last comment, it works. But when I created a new process, it doesn't work with timer event. Why it can't work do you have any idea?
#822104
processmakerlover wrote:I tried it. When I run it in command prompt , it works. But When I try to run it in task schedular, it doesn't run.

In addition, for instance how can I run timercronevent.php each ten minutes regularly?

And When I import your process which you sent me in your last comment, it works. But when I created a new process, it doesn't work with timer event. Why it can't work do you have any idea?
Can you post a screen shot of your task scheduler configuration (or post the SCHTASK command that you used in DOS)?
Can you post a screen shot of the properties of your start timer event where you set the timing?
#822125
My screenshots are here:

And in addition the code of third picture is:

C:\Bitnami\processmaker-3.2.1-0\php\php.exe C:\Bitnami\processmaker-3.2.1-0\apps\processmaker\htdocs\workflow\engine\bin\timereventcron.php

When I run it in command prompt , it works. But When I try to run it in task schedular, it doesn't run.
Attachments
kod.PNG
kod.PNG (19.07 KiB) Viewed 5438 times
2.PNG
2.PNG (57.94 KiB) Viewed 5438 times
3.PNG
3.PNG (22.4 KiB) Viewed 5438 times
#822133
What version of Windows are you using?

In Windows Server 2016 64bit, here are the options that I am using:
ScheduledTaskWindowsGeneral.png
ScheduledTaskWindowsGeneral.png (16.3 KiB) Viewed 5420 times
In your command, you should add the -f option to force it to run even if another instance is already running:
ScheduledTaskWindows.png
ScheduledTaskWindows.png (11.13 KiB) Viewed 5420 times
Remember that it has to execute twice. Check your cron log to verify that it is running.
What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

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