Community

Avoid loops in Workflow schema Answered

Hi,

I added a new stage in the workflow on my FlexiCapture project to try an image modification if one specific field is not recognised. The new step has one entry condition "Field value satisfies the expression" and the exit route is to Recognition.

This works, and the field is correctly recognised on some documents after the image modification.

But on certain documents we cannot recognise the field even after the image modification, so the problem is that I'm having a loop of this documents because they continuously go to the image modification step as the rule "Field value satisfies the expression" is always true on this documents. So they go to recognition again and again, in a forever loop.

How I can avoid this? I searched for a condition like "previuos step", but I did not found it.

How I can check the previous step to avoid documents go to the "image modification" step if the previous step is not "image modification"? Or how I can manage a counter of image modification tries so I could check "if counter is not > 0"?

Thanks!

0

Comments

3 comments

  • Avatar
    Ekaterina

    Hello,

    To avoid looping in the workflow for the documents that once passed through the new stage, you may use the registration parameter: Program settings > Creating a project > Registration parameters

    Such a parameter could be created and filled when document goes to the stage the first time. If parameter already exists, then document does not enter the stage again.

    0
  • Avatar
    Mattia Martinello

    Thanks Ekaterina! So if I understand well:

    • I create a new registration parameter for the default Batch type (with a default empty value)
    • I set the value of this registration parameter when the document enters the new image modification stage ("script" tab in the "Workflow Stage Properties" window
    • I create e new entry condition in the image modification stage which checks if this registration parameter is empty (with a script into the rule settings of a new entry condition rule).

    But... How I can create the registration parameter? It seems I can create a new registration parameter only during the creation of a new Batch type, but I cannot find any such settings in the Project properties as I don't have any Batch type at the moment.

    Where I am wrong?

    0
  • Avatar
    Mattia Martinello

    Thanks Ekaterina, I made exactly what I wrote and it works!

    0

Please sign in to leave a comment.