Announcement

Collapse
No announcement yet.

BPM: Loops without using script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BPM: Loops without using script

    Hi

    I got a feature request for the Advanced Pack:

    Could you please add the ability to create loops (like while or foreach) in BPMs using the visual designer, without the need to use a script?
    That would make it much easier for users to create processes involving loops and the flowchart is much clearer to view.

    I'm looking forward for your reply.

    Luca

  • #2
    Hi Luca,

    Could you provide more details how you see this feature to be implemented. I'm not sure I understand.

    Comment


    • #3
      Hi Yuri

      Yes of course. I got a usecase as an example:

      I have a script (in my case placed in a BPM-flowchart) where I want to create a call for every contact in this call. I can access the 'Opportunity.contactsIds' attribut of a opportunity, but I can't loop trough it to do some action for each contactId in the array.

      So there schould be a new drag/drop-object which could be like a sub-process, which takes an input variable, in my case the 'Opportunity.contactsIds' and now I can place for example tasks inside the loop-object and for every item of the passed array (''Opportunity.contactsIds'), all added objects like tasks, user taks, etc. in the loop-object should be executed.

      It could look something like this:
      Click image for larger version

Name:	083f87h3v5t3.PNG
Views:	627
Size:	59.9 KB
ID:	66145

      Hopefully you'll get what I mean. :-)

      Kind regards
      Luca Kühne
      Attached Files

      Comment


      • #4
        It's planned to develop the ability to pass multiple related records as a targets into sub-process.

        Comment


        • #5
          And then you could do some action for each record in the sub process?

          Comment


          • #6
            Yes. The sub-process will be executed multiple times for every related record.
            Last edited by yuri; 01-13-2021, 09:59 AM.

            Comment


            • #7
              Sounds amazing :-) Is there an ETA or a release in which you plan to release this feature?

              Comment


              • #8
                No ETA. I hope it tackle it in 1-2 months.

                Comment


                • #9
                  Okay thank you Yuri. At least I got a gut feeling for an ETA now.

                  Comment


                  • #10
                    Hi Yuri
                    Is there an update on this enhancement? :-)

                    Comment


                    • #11
                      Hi Luca,

                      You must have seen that I was (and still am) very busy with v7.0. After that I want to rest.

                      Comment


                      • #12
                        Yes of couse, but I still wanted to check if there was an update after about 3/4 of a year :-) There may have been some updates before the 7.0-work.

                        Comment


                        • #13
                          Hi yuri

                          Any updates on this feature? Also, is there already an issue in the GitHub repo for this?

                          Comment


                          • #14
                            Will be implemented soon.

                            1. A collection of items defined by a formula expression. Each item of the collection instantiates a separate instance of the sub-process.
                            2. It will be also possible to pass a specific target record to the sub-process, where the ID is defined by a formula expression.

                            By combining these two abilities it will be possible to have multiple sub-processes for different targets. By using formula functions (record\findRelatedMany) it's possible to have sub-processes for related records.

                            Advanced Pack is not available on GitHub as it's not open source.

                            Comment


                            • #15
                              The new v2.10.0 release has multi-instance sub-processes. See in the docs: https://docs.espocrm.com/administrat...ce-sub-process

                              Comment


                              • rabii
                                rabii commented
                                Editing a comment
                                Hi Yuri
                                any chance that this could be explained using an example, i still couldn't figure out how to use the new multi-instance processes. Any flowchart that can explain this will be a plus and will be much appreciated.
                                Of course if possible i know how busy you are.
                                Many thanks

                              • yuri
                                yuri commented
                                Editing a comment
                                The flowchart will be the same as the regular sub-process. The only difference is that multi-instance has ||| icon displayed.

                                The logic is very simple. You write formula expression that evaluates to an array. Each element of the array will instantiate a separate sub-process instance.

                                The most useful case is to have an expression that evaluates to an array of record IDs. Then it's possible to have multiple sub-process instances for different targets.

                                Please read the documentation thoughtfully. Also read the tooltips on the sub-process form. The logic is very simple. It took me a lot of time to design and implement this feature. The documentation covers this feature fully.
                                Last edited by yuri; 05-09-2022, 01:43 PM.
                            Working...
                            X