tomolimo / processmaker

GLPI plugin that provides an interface with ProcessMaker (http://www.processmaker.com/)
30 stars 11 forks source link

Parallel case - php error #72

Open rohit-ambre-uno opened 6 years ago

rohit-ambre-uno commented 6 years ago

Hi, While running parallel case, we encounter php fatal error for member function calling on null objects. Take a look at the error below

Fatal error: Call to a member function getStepMode() on null in /opt/processmaker/workflow/engine/methods/cases/cases_Step.php on line 352

Above error may not occur at first time, try refreshing the page few times

Fatal error: Call to a member function getTasDerivationScreenTpl() on null in /opt/processmaker/workflow/engine/methods/cases/cases_Step.php on line 1102

this is the parallel case process i am using in glpi

When i tried running it solely in processmaker-communtity release 3.2.1 it ran successfully.

tomolimo commented 6 years ago

Hello @rohit-ambre-uno Which version of PM server are you using with GLPI PM plugin? Thank you, regards, Tomolimo

rohit-ambre-uno commented 6 years ago

I am using processmaker community release 3.2.1 with processmaker plugin 3.2.8 and GLPI 9.2.4. I tried above process with your version of processmaker server but it was throwing errors mentioned in #8

tomolimo commented 6 years ago

Hello @rohit-ambre-uno ,

You have to understand that the only version of PM server that is compatible with the current version of the PM plugin is the one I released here: https://github.com/tomolimo/processmaker-server/releases/latest. In which I made as little adaptation as possible to be compatible to GLPI PM plugin. So I cannot guarantie

And moreover, you have to understand that I wish to help you but for that I need help from your side :)

So to help me solving the issues, I generally need detailed steps in order to reproduce the issue along with screen copies. Otherwise, I will not be able to help you.

I close this issue as it is out of scope of current plugin version, please use https://github.com/tomolimo/processmaker-server/issues/8 to continue on the topic.

Thank you, Regards, Tomolimo

rohit-ambre-uno commented 6 years ago

Hi, I used this parallel process in your version processmaker-server. It is throwing errors in processmaker server triggererror1 Can you please try and confirm about this issue.

tomolimo commented 6 years ago

Hello @rohit-ambre-uno, The error message is coming from a problem of configuration. The URL rewrite rule of the web server is not correct. Could you please check that it matches the one given in the wiki https://github.com/tomolimo/processmaker-server/wiki/Inbound-rewrite-rules Thank you Regards Tomolimo

rohit-ambre-uno commented 6 years ago

Hi @tomolimo , URL rewrite rule did solve the above mentioned error. But now it is giving following error in processmaker-server in debug mode

Non-static method G::array_merges() should not be called statically, assuming $this from incompatible context (line 1102): Non-static method G::getSystemConstants() should not be called statically, assuming $this from incompatible context (line 1102):

same error as reported in #8

Steps to reproduce:

  1. Import this parallel process in processmaker-server
  2. enable debug mode on process and start a case.
tomolimo commented 6 years ago

Hello @rohit-ambre-uno

As mentioned in the readme of the process here https://sourceforge.net/p/pmcommunity/code/ci/master/tree/routing/loopBackFromParallelTasks/

image

this process has been written and tested in the 3.2.1 PM release, and such it cannot be imported into the 3.0.1.8 PM release, without the prior idea that it may be incompatible with it.

And I presume it is not compatible :disappointed:

So what I can do to help you is to listen to your needs, and to help you creating a process in the 3.0.1.8 release. Do you agree?

Thank you regards, Tomolimo

rohit-ambre-uno commented 6 years ago

Yes, totally. This parallel process is kinda important for me. my colleague posted on processmaker forum for process here's a link for requirements.

Any plans on upgrading processmaker-server version?

tomolimo commented 6 years ago

Any plans on upgrading processmaker-server version?

Yes but not before autumn

For the process, I'm going to search for a solution for it and I'll keep you updated

rohit-ambre-uno commented 6 years ago

Ohk. I will also search for it. Thank you

tomolimo commented 6 years ago

Hello @rohit-ambre-uno

I can confirm that this process will not work in the 3.0.1.8, there are several issues:

  1. the static issues: I made a fix for them, but anyway , the process doesn't behave like it does in the 3.2.1

  2. when the process goes back to the first task 'Request resource' (after a rejection from one of the manager) then PM server creates clones of the first task assigned to the @@firstUser (this issue is called multiple-token creation).

  3. Moreover, even if these issues were fixed, there is another issue which makes this process not compatible with the current way the GLPI PM plugin is working. The GLPI PM plugin is based on a match of the PM tasks and GLPI tasks. At each end of a task in GLPI, the plugin is calling the "derivate" function (like in the trigger), and is closing the current task. But in this process we may have several tasks that must be closed at the same time: this will not be managed by the plugin, and such, the GLPI tasks will stay open.... For that, I'll need to review this mechanism, and that is not planed at all :disappointed:

I'll keep you informed if I can find another solution.

Thank you Regards, Tomolimo

tomolimo commented 6 years ago

Hello again @rohit-ambre-uno

To be clear regarding the GLPI / PM task match: at any time, GLPI must the initiator of a case derivation, not PM server. If this happens, then we are going to have tasks that are not in synch with PM.

To answer your problem, I've two solutions:

  1. a serial (not parallel) process like this (it does transform a little bit the problem, and this can be not completely satisfactory for you): image
  2. the idea here is to keep the defined process, but to not use the trigger (= to not derivate the case into the case itself). And to use a special feature that I developed last year which is not really documented, but fully used by us (internally), see: https://github.com/tomolimo/processmaker/wiki/Interaction-of-cases-between-tickets. If you agree I'll provide you with the new version of the process, and several explanations in order to make it running.

Thank you Regards, Tomolimo

tomolimo commented 6 years ago

Hello @rohit-ambre-uno

I believe, I've a solution for your problem, But I need to do some bug fixing before sending the pmx file to you. Give me some days, and I'll send it to you.

Thank you, Regards, Tomolimo

rohit-ambre-uno commented 6 years ago

Ok Great :+1: Let me know

Thank you for support

rohit-ambre-uno commented 5 years ago

Any update on parallel workflow?

Please let me know

tomolimo commented 5 years ago

Hello @rohit-ambre-uno,

I wish you an happy new year :smiley:

Sorry for being so long to answer to your issue: I've been working hard on internal issues and also preparing migration to GLPI 9.2 and 9.3 and also preparing migration to ProcessMaker 3.3.0 Currently migration to GLPI 9.2 and ProcessMaker 3.3.0 are done, so I've some times to rework on your issue :)

Thank you Regards, Tomolimo

rohit-ambre-uno commented 5 years ago

Happy New Year It would be great to have processmaker migrated to version 3.3.0. It would solve many other issues. Please keep setting to enable or disable multiple cases on ticket, as Users might not want to run more than one process on one ticket.

Yeah please look into parallel process as we have discussed before in this issue. Thank You.

rohit-ambre-uno commented 5 years ago

Please keep backward compatibility for GLPI 9.2 as we are not going to upgrade GLPI any soon. I will make test instance for processmaker-server_3.3.0 and test it with GLPI 9.2.

tomolimo commented 5 years ago

Hello @rohit-ambre-uno,

Here are the plan for maintenance of the plugin:

PM plugin version GLPI version PM server version Approximative "End of Maintenance date"
3.3.x 9.1.x 3.0.1.8-RE-1.x 2019/01/01
3.4.x 9.2.x >= 3.3.0-RE-1.0 2019/03/31
3.5.x 9.3.x >= 3.3.0-RE-1.0 2019/09/30
3.6.x 9.4.x >= 3.3.0-RE-1.0 not defined yet

Anyway, at anytime, if you want to participate to the plugin development/evolutions/maintenances, don't hesitate to fork the repo, and to propose pull requests.

Regards, Tomolimo

rohit-ambre-uno commented 5 years ago

I have started testing new processmaker-3.3.2 and 3.4.5 with processmaker-server-3.3

Can you have some release notes for each version stating what are new features or enhancements

like what are the changes in processmaker-3.4.5 other than ssl verification in processmaker configuration. Any update on parallel process workflow?

tomolimo commented 5 years ago

Helllo @rohit-ambre-uno I don't have specific release notes that can be publicly shared, apart the SSL and numerous bug that have been fixed :smiley:

tomolimo commented 5 years ago

Regarding the // process, I've a solution that works using the attached process and using a special undocumented feature (not yet documented) (in fact documentation has been started here: in Advanced technics).

The process: image

Loop_back_from_parallel_tasks-4.zip

and here is a SQL file with some data to import into glpi_plugin_processmaker_caselinks table: Loop-back_from_parallel_tasks.zip

The undocumented feature is available from the url: _your_glpi_url_/plugins/processmaker/front/caselink.php

If you add to your GLPI DB the SQL records, and if you have not changed the GUIDs from the imported process, then you should be able to run this process from GLPI

Please note that due to a bug in PM server the task 'Review of evaluations ' is mandatory. This bug is not present when using the case derivation from PM web interface, but is present when using the web service interface (PM is not doing the derivate() the same way depending of the used interface), and in GLPI the derivate() is done via the web service interface.

To give some explanations about the undocumented feature:

  1. it has been designed to give possibility to interact between running cases. Or to interact on the running case itself.
  2. to be able to route (=derivate) a case or several cases that are running.
  3. It may depends on conditions (see sourcecondition field in caselink form).
  4. It may be asynchronous or synchronous. The asynchronous scenario is used to get information from an external application that may take some times to respond (ex: complex computations). In this scenario, the external application must call a REST API plugins/processmaker/ajax/asynchronousdatas.php posting the data that will be inserted in the target dynaform.

I've used this feature to achieve your process and adding to it the synchronous mode to get immediate response.

You may look at the caselink forms to get more information about each fields of the caselinks.

When using asynchronous mode, you must schedule the pmtaskactions cron in the automatic actions. You don't need it in the synchronous mode. And in your process you don't need it.

Regards, Tomolimo

wessrafamessi commented 10 months ago

hello What is the PHP version compatible with the ProcessMaker server version 3.3.0-community-RE-2.0? Regards

tomolimo commented 10 months ago

Hello @wessrafamessi Could you post another issue? Your question is not really linked with the current post. Thank you, Regards, Tomolimo