BPM: Can not complete not 'In Process' flow node in process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maarten
    Member
    • Jun 2020
    • 63

    BPM: Can not complete not 'In Process' flow node in process

    Can someone give me some advice on this.

    I regularly have issues with processes that call one another do not seem to properly finish.

    As an example. I have a multi-instance process.
    Click image for larger version

Name:	image.png
Views:	37
Size:	12.4 KB
ID:	114143

    Which gets its records like this:
    Click image for larger version

Name:	image.png
Views:	27
Size:	17.6 KB
ID:	114144

    That runs this process:
    Click image for larger version

Name:	image.png
Views:	27
Size:	7.4 KB
ID:	114145
    And fails:
    Click image for larger version

Name:	image.png
Views:	24
Size:	10.6 KB
ID:	114147

    but the BPM flow that was called completes succesfully:
    Click image for larger version

Name:	image.png
Views:	24
Size:	12.3 KB
ID:	114146


    The errors thrown in the app log are in the format: BPM: Can not complete not 'In Process' flow node in process xxxxx

    Do I use the wrong end event?

    What could be the reason? Do the sub-process terminate too early?
  • yuri
    Member
    • Mar 2014
    • 8568

    #2
    Hi Maarten,

    How often does it happen particularly for this example process flowchart? We would like to try to reproduce.
    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
      Member
      • Mar 2014
      • 8568

      #3
      In your example, how many parallel sub-processes were created (how many travelers) ?
      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
        Member
        • Mar 2014
        • 8568

        #4
        > Do the sub-process terminate too early?

        It looks to me, that the Call Activity sub-process was completed as the following End Event is green. But for some reason, it tried to complete the completed node again and failed.

        Did the End Event complete by itself or you completed 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

        • yuri
          Member
          • Mar 2014
          • 8568

          #5
          We tried to reproduce with a similar flowcharts but could not yet. I also revised the code flow, the logic appears to me clear and correct.

          Does it happen with different flowcharts? Maybe there's some distinctive feature in flowcharts that make this issue to happen?
          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

          • Maarten
            Member
            • Jun 2020
            • 63

            #6
            It does happen sometimes in other flowcharts, but then I am usually not aware. Because everything seems to complete fine in the end, even if the flowchart returns failed. I can't identify one at the moment that has a failed process. We have more than 100 BPM flowcharts, so it's a bit of a search to try and find one.

            The reason why this flow is a problem, is that the multi-instance for-each traveler loop in the main flow stops after 1 record, without completing the other.

            In this particular case there were 3 travelers. And it failed on the first.

            I have not completed the end event manually. In the final flowchart there are HTTP requests to external APIs that might take a few seconds to complete. However it seems the BPM flow waits for those to complete before continuing.

            Here is the final bit of the BPM flow:

            Click image for larger version  Name:	image.png Views:	0 Size:	13.2 KB ID:	114219

            And the flow log of the longest
            Click image for larger version  Name:	image.png Views:	0 Size:	12.3 KB ID:	114221
            Click image for larger version  Name:	image.png Views:	0 Size:	30.7 KB ID:	114220

            I am thinking about upgrading to v9, but not sure any if this logic was changed in the new release? Otherwise I prefer first to debug this, before upgrading.
            Last edited by Maarten; Today, 07:36 AM.

            Comment

            • yuri
              Member
              • Mar 2014
              • 8568

              #7
              Thanks for input. We'll investigate more.

              Is there any very simple flowchart where the same issue happened? Knowing thing can be helpful for us.

              > I am thinking about upgrading to v9, but not sure any if this logic was changed in the new release?

              Nothing was changed here. Though you may consider to wait for a week or two before upgrading.
              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
                Member
                • Mar 2014
                • 8568

                #8
                Could you check the following.

                In the parent process (which runs the multi-instance sub-process), from the log, click on the failed sub-process record.

                Click image for larger version

Name:	image.png
Views:	0
Size:	10.3 KB
ID:	114226

                It will open the multi-instance wrapper sub-process which looks like this.

                Click image for larger version

Name:	image.png
Views:	0
Size:	15.2 KB
ID:	114227

                Please provide with a screenshot of that process. It can be helpful.​
                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
                  Member
                  • Mar 2014
                  • 8568

                  #9
                  For debug, it also can be helpful to lower the log level to 'INFO'. More information about failed processes will be logged.

                  PHP Code:
                    'logger' => [
                      // ...
                      'databaseHandler' => true,
                      'databaseHandlerLevel' => 'INFO',
                    ], 
                  
                  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...