Workflow's formula "streamCount=streamCount+1" runs forever .....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chrisjiang
    Member
    • Dec 2018
    • 88

    Workflow's formula "streamCount=streamCount+1" runs forever .....

    Hi,

    I just found out the following problem and it may be a small bug?

    When I add an Integer field "streamCount" into Contact entity. And set a workflow to make the "streamCount" +1 when a new stream note is created.

    If I set the "streamCount" field "audited", then the workflow will run forever....

    Please refer to the attached screenshots.

  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi,

    It's your workflow looping. Not a bug. Audited creates new note.
    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

    • Maximus
      Senior Member
      • Nov 2018
      • 2731

      #3
      Hello Chris,
      It is not a bug. You just made a loop. Here is how this is working:
      1. You are making a post -> it triggers the workflow and audited functionality that makes a post on your post
      2. New audited post triggers workflow again.
      3. Audited functionality makes a new post on its previous post and triggers the workflow again.
      And it is repeating again and again and again ...

      Comment

      • chrisjiang
        Member
        • Dec 2018
        • 88

        #4
        Thanks so much for the explanation! I intended to count the ‘Posts’ only (excluding the ‘Updates’). Is there a way to achieve that result?

        Thanks so much for your quick response and help!

        Comment

        • Maximus
          Senior Member
          • Nov 2018
          • 2731

          #5
          Add a new condition to your workflow (see screenshot):
          Attached Files

          Comment

          • chrisjiang
            Member
            • Dec 2018
            • 88

            #6
            Originally posted by Maximus
            Add a new condition to your workflow (see screenshot):
            Thanks so much!

            Comment

            Working...