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.
#793552
I am running processmaker 2.8 on Ubuntu server
I want to run case scheduler feature and events that are part of the framework
the cron job is set and working as required and I see it in the logs.
but the processmaker web application does not create cases or event as it should.

cron log shows that it worked fine:
Screen Shot 2017-06-29 at 9.26.27 PM.png
Screen Shot 2017-06-29 at 9.26.27 PM.png (149.79 KiB) Viewed 6582 times
but nothing appears on case scheduler log:
Screen Shot 2017-06-29 at 9.28.18 PM.png
Screen Shot 2017-06-29 at 9.28.18 PM.png (36.31 KiB) Viewed 6582 times
this is the setup for case scheduler:
Screen Shot 2017-06-29 at 9.30.07 PM.png
Screen Shot 2017-06-29 at 9.30.07 PM.png (55.92 KiB) Viewed 6582 times
and here the details:
Screen Shot 2017-06-29 at 9.30.37 PM.png
Screen Shot 2017-06-29 at 9.30.37 PM.png (68.7 KiB) Viewed 6582 times
can you help me in finding why does not run as it should
#793557
There was a bug with the cron log not being shown, although the case scheduler worked correctly. I don't know if it started in PM 2.8 or 3.0, but it was fixed in PM 3.1.3. However, if your cases aren't being started, then that isn't your problem.

First of all, do you have your server configured to periodically execute the cron.php script?
See: http://wiki.processmaker.com/index.php/ ... g_cron.php

What do you see when you manually execute cron.php from the command line?

When the case scheduler starts a case, it should write a record in the processmaker/shared/log/cron.log file or an error in the processmaker/shared/log/cronError.log file, so check those files.
#793563
Thank you for the reply

Yes I did setup the cron task on ubuntu as mentioned in the referred URL link and I did check if it worked by getting to the logs.

I also ran it manually as you asked.
Screen Shot 2017-06-30 at 5.02.19 AM.png
Screen Shot 2017-06-30 at 5.02.19 AM.png (416.21 KiB) Viewed 6577 times
and this is the log from cron.log file
Screen Shot 2017-06-30 at 5.05.20 AM.png
Screen Shot 2017-06-30 at 5.05.20 AM.png (358.07 KiB) Viewed 6577 times
but I could not find the cronError.log
#793565
I just tried it with the "Every" option in PM 2.8.0 and I couldn't get it to work either. I think that the first time that it is run, that it sets the timer, so it doesn't work correctly until an hour later, if you set it to 1 hour.

However, I tried it with the "Daily" option and it worked the first time. I recommend using Daily and set the time that is about to pass.
CaseScheduler.png
CaseScheduler.png (25.34 KiB) Viewed 6575 times
Then run the cron.php script and you should see this:
Code: Select all
# php cron.php +force
Processing workspace: workflow
* Resending emails............................................[DONE]
* Unpausing applications......................................[DONE]
* Calculating Duration........................................[DONE]
* Executing events............................................[PROCESSING]
* |- End Execution events.....................................[Processed 0]
* Executing the scheduled starting cases......................[PROCESSING]
 - Connecting webservice: http://localhost:280/sysworkflow/en/classic/services/wsdl2
 - Logging as user admin.............OK+
 - Creating the new case.............OK+ CASE #6 was created!
 - Routing the case #6..............OK+ Task 2(admin) --- 0
[DONE]
* Update case labels..........................................[DONE]
* Unassigned case.............................................[DONE]
* Executing cron files in bin/plugins directory in Workspace: workflow
Finished 1 workspaces processed.
And in PM 2.8 the new case should appear in Admin > Logs > Case Scheduler in the PM interface.

If you can't get the "Every" option to work, then create many "daily" case schedules for every hour. Also I notice that I can't edit a existing case scheduler in Firefox 51. I have to use an older version of Firefox. I see this a lot with PM 2.8.0 that some dialog boxes in the process designer have problems with the new web browsers. Given that it is almost two years old, that isn't surprising.
#793585
thank you very much amosbatto,

I have been able to solve the problem and you are correct "Every" option doesn't work but the "Daily" did.

I have also another reason which is the URL used is "http" inside the code in "/opt/processmaker/workflow/engine/classes/model/CaseScheduler.php" but I am only using "https", I did change in the code and it did work.

Now it is working thanks you, which will help me a lot in designing my business processes.

My question now is: if I want to upgrade to 3.2 would it be compatible to be able to keep my old processes which took me years to build or not. I don't want to change them but I want to create the new ones using the latest version.

Again thank you very much for the help.
#793597
aziezk wrote:thank you very much amosbatto,
I have been able to solve the problem and you are correct "Every" option doesn't work but the "Daily" did.
The "Every" option does work I found out. The first time it is run, it doesn't start a case. Instead, it sets the time when the case should be started. So if you have it configured to run every 2 hours, then it will set the case start time two hours in the future. Then you need to execute cron.php two hours in the future for it to start a case.
aziezk wrote:I have also another reason which is the URL used is "http" inside the code in "/opt/processmaker/workflow/engine/classes/model/CaseScheduler.php" but I am only using "https", I did change in the code and it did work.
I assume that you are talking about this code:
Code: Select all
            $testConnection = true;
            try {
                @$client = new SoapClient("http://" . $url);
            } catch (SoapFault $fault) {
                $testConnection = false;
            }
 
            $wsdl = ($testConnection) ? "http://" . $url : "https://" . $url;
The code is designed to detect whether you are using http or https. If it didn't work correctly for you, then file a bug report about it at http://bugs.processmaker.com and provide a link to your bug report here, so I can do follow up with the developers.
My question now is: if I want to upgrade to 3.2 would it be compatible to be able to keep my old processes which took me years to build or not. I don't want to change them but I want to create the new ones using the latest version.
Classic processes from PM 2 will run in PM 3.2, but you should make a backup of your server before doing the upgrade to 3.2, so you can restore back to PM 2 if it doesn't work correctly.
You might want to test it first before bothering with the upgrade. Do a separate install of PM 3.2 first and manually export some of your processes from PM 2 and import them into PM 3.2. Then run cases on the processes and see whether they behave as expected.
#795524
amosbatto wrote:I just tried it with the "Every" option in PM 2.8.0 and I couldn't get it kits solaires[SPAM] to work either. I think that the first time that it is run, that it sets the timer, so it doesn't work correctly until an hour later, if you set it to 1 hour.
Hello,
But is it possible to set it to less than 1 hour?
It is still long 1 hour!

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]