Skip to main content
Microsoft Dynamics AX forum
Answered

Workflow circular

editSubscribe (0) ShareShare
ReportReport
Posted on by

Hello!

I would like to create a workflow, which has a feedback loop in it.

I have a conditional decision. If the condition is false, I want to return to a previous task in my workflow, but i get the error "A sequence flow is invalid because it points to a previous workflow element. You cannot create a circular workflow". How can I solve this?

Thank you for your help in advance.

Attachments
  • Workflow circular
    Hi All,
     
    I had same error, it was not related to actions. It was related to loop where loop can not revert back to task.
     
    If After Task goes to condition so, flow can not revert back.
     
     
  • K_G Profile Picture
    K_G 121 on at
    RE: Workflow circular

    When using budget planning, for the associate budget plans, the initial set of figures come from a stage allocation which occurs when the plan is submitted to workflow. The plan is then worked upon, i.e. the figures are updated and a lot of work is put in. Let's say the users wish to have a manager review this, and if the manager is unhappy with the figures, they can send it back. Hitting the reject button will mean the workflow needs to start from scratch and reset the figures back to those that came from the stage allocation, which will overwrite all the work somebody has put in to that budget plan. There is currently no way around this.

  • Suggested answer
    Mesut Boztas Profile Picture
    Mesut Boztas 20 on at
    RE: Workflow circular

    Please check the WorkflowElementLinkTable records for corresponding workflow version record. You would most probably find a circular /incosistent record for your configuration. Please delete the record from that table and it will be fixed.

    WorkflowElementLinkTable

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow circular

    Hi André Arnaud,

    I agree with you up to a certain point, "If a person returns the workflow, you can make changes and resubmit" is the solution to same issues, whereas in some cases of "validations of fields" it does not work.

    For example, we are creating a new Product and a workflow is needed in order to complete fields related to each different related area (Engineering, Planning, Accounting, Taxes, etc). If an area completes its task, then is the turn of the next area, and so on, until configuration is completed (and the workflow is finished).

    Between each area, a validation of loaded values is required. The area that should continue does not know which are the correct values (or it has not the authority to refuse them) and cannot return the workflow.

    In this context, the solution you presented does not fit these kind of requirements. Generally, a conditional node with field validations between loading nodes and with its false value aiming the previous node, is the solution.

    Maybe there is another way…

    In case you have another idea, please share it with us.

    Thanks in advance!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow circular

    Hi Mohamed Amine,

    Likewise, I do not understand why circular workflows (loops) are restringed in AX.

    It is a very common practice to use a conditional linked to the previous task/node, just in case the false value happens.

    Could you please give us more details about the modification you've made? (in order to apply a similar solution).

    Thanks in advance!

    Kindest regards. 

  • RE: Workflow circular

    Hi,

    I dont realy understand why standard doesn't allow creating a go back to a previsous worflow element? Any one from that can explain, why this restriction is implemented?

    For example I have a workflow composed of 2 Task and next 2 approval : Task1->Approval1 -> Task2 -> Approval2 I want to set workflow :

    • go back to the Task2 if the Approval2 is rejected. 
    • No one takes Task2 within the time, go back to Task1

    As a developer, I forced the worklow to accept the version that contain the loop (conditional decision) and Enable it. And It works fine!

    Best regards,

    Mohamed Amine

  • Geert G Profile Picture
    Geert G on at
    RE: Workflow circular

    Hi Thanks for your answer however I try to find a standard solution.

    Kind regards

  • Jonathan  Halland Profile Picture
    Jonathan Halland 11,302 on at
    RE: Workflow circular

    Hi Geert.

    You can add additional checks in the code behind on the "complete" menu-item for your review task. In this code you can prevent the user from "Completing" the step until all descrepencies have been resolved.

  • Geert G Profile Picture
    Geert G on at
    RE: Workflow circular

    Dear,

    I have a simmilar issue. I have a workflow on vendor invoices. There the need to review the matching discrepancies. I would like that the workflow only continous when the invoice has no matching discrepacnies left.

    I tried to add a task and work with an occasional decission when the review task was finished he checks that there are no more matching discrepancies left. At this time I have the error "circular workflow". 

    How can I prevent the workflow to go to the next step when they click accept but there are still matching discrepancies ?

    Many thanks in advance for your help.

    Kind regards

  • Hun33 Profile Picture
    Hun33 on at
    RE: Workflow circular

    Hello,

    Thank you both for your help!

    Kind regards

    Hun

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Demystifying Copilot with Sundar Raghavan

Sundar explains how Copilot for Service is meant to function separately...

Business Process Guidance Badges and New…

The Microsoft Success by Design is the framework for implementing Dynamics 365…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,266 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,987 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans