Conditional Intermediate Event blocks process pipeline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mazhid_kat
    Junior Member
    • Apr 2019
    • 18

    Conditional Intermediate Event blocks process pipeline

    Hi everebody!
    We have recently added Conditional Intermediate Event (Catching) to one of our BPM Flowcharts. You can check it on the screenshot below.

    Click image for larger version  Name:	Screenshot_1.png Views:	0 Size:	37.3 KB ID:	59648
    The feature of our processes is that we may have to wait for Conditional Intermediate Event (Catching) to happen for 10-20-30 days. The thing is: processes with this event have vastly accumulated in our Scheduled Jobs -> Process Pending Flows pipeline. As far as Conditional Intermediate Event (Catching) is processed every minute, this kind of event occupies the entire pipeline with all other processes being stuck behind.

    Is it assumed to be this way and processes Conditional Intermediate Event (Catching) every minute with all other processes? Or did we miss something in the documentation?

    Maybe the problem is with our conditions inside Conditional Intermediate Event (Catching), i.e. there is no 'Changed' filter, so it gets triggered every minute, while it is needed to work only if a particular field is changed. But it is not present in the dropdown. Will function entity\isAttributeChanged(ATTRIBUTE) solve the problem? So Conditional Intermediate Event (Catching) gets triggered only when necessary and not every minute


    Click image for larger version  Name:	Screenshot_3.png Views:	0 Size:	51.5 KB ID:	59650
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi,

    It's not supposed to happen that one event blocks execution of other processes. Might by something failed and an exception is not caught for some reason.

    Please check data/logs.

    entity\isAttributeChanged(ATTRIBUTE) is not working in BPM. It will return false. It does work in workflows.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • yuri
      yuri commented
      Editing a comment
      Yes, Every minute (can be configured more often). What do you mean by overloads. It gets tiny amount of resources and time to check. It's a trade off. Making check after each save would take even more resources or require to install additional extensions on the server, that can be a hurdle for customers.
      Last edited by yuri; 06-25-2020, 11:55 AM.

    • yuri
      yuri commented
      Editing a comment
      I also recommend to setup jobs to run in parallel processes.

    • mazhid_kat
      mazhid_kat commented
      Editing a comment
      By overloads I mean that Conditional Intermediate Event (Catching) accumulate in pending flows in such a great number so that they exceed the number of processes which are processed every minute (we currently have PROCEED_PENDING_MAX_SIZE = 40 in BpmnManager.php).

      How can I setup jobs to run in parallel processes? Can i do it with Conditional Intermediate Event (Catching) separetely?
      Last edited by mazhid_kat; 06-25-2020, 01:34 PM.
  • yuri
    Member
    • Mar 2014
    • 8440

    #3
    PROCEED_PENDING_MAX_SIZE is supposed to be very big. 10,000 is OK. It also handles other event types. In future I think I will add the ability to split this queue into parallel sub-processed. But it only matters if you have thousands of active processes in the same time.

    1. Recommend to setup daemon https://docs.espocrm.com/administration/jobs/#daemon
    2. In parallel processes: https://docs.espocrm.com/administrat...llel-processes
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • mazhid_kat
      Junior Member
      • Apr 2019
      • 18

      #4
      How can I check current PROCEED_PENDING_MAX_SIZE and increase it? Where is this configuration stored?

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #5
        It's set to 20000 in BpmnManager.php. You said that you have 40. I assumed that you changed it manually.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • mazhid_kat
          Junior Member
          • Apr 2019
          • 18

          #6
          I have cheked it: we have not modified file crm/application/Espo/Modules/Advanced/Core/Bpmn/BpmnManager.php and it has a default line
          PHP Code:
          PROCEED_PENDING_MAX_SIZE = 40; 
          
          . Our CRM Version is 5.5.6. Is it possible that in our version PROCEED_PENDING_MAX_SIZE is set to 40 and not 20000?

          Comment

          • yuri
            Member
            • Mar 2014
            • 8440

            #7
            Maybe your advanced pack is too old. I recommend to increase the value manually in the file.
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            Working...