Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Start again workflow in the same flow

(0) ShareShare
ReportReport
Posted on by 1,867

I have this workflow:

1057.1.png

It's a simply workflow with three approver, I want that when third approve reject workflows and other approver resumit this flow it start again with approve one.

At this moments if approver 3 reject workflow it send to second approve and when second resumit, it sended to third but I want if somebody resubmit the workflow starts again.

Now I cancel workflow and start again but It create a new workflow and I want to continue with the same.

WorkflowCancelManager::cancelWorkflows(WorkflowCancelManager::getWorkflowsToCancel(_args.caller()), initialNote);

workflowCorrelationId = Workflow::activateFromWorkflowType(workflowTypeName, recId, initialNote, NoYes::No);

is there any way for when a resubmit the workflow start with the same flow?

Thanks

*This post is locked for comments

  • JJgath Profile Picture
    JJgath 15 on at
    RE: Start again workflow in the same flow

    Sorry I cant find any condition based on the approval result. Could someone post the exact condition name?

    I have the same problem. When the third or second line Manager decline, the worker has to resubmit it and the wf should start from new and go to the first line manager and not to the one which decline.

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Start again workflow in the same flow

    You don't Need Code. If you add a conditional block (condition based on the approval's result) you can draw links to different steps.  technet.microsoft.com/.../jj618308.aspx

  • Nikhil Walkhade Profile Picture
    Nikhil Walkhade 50 on at
    RE: Start again workflow in the same flow

    Hi Kris,

    Can you provide the exact place to write code to go back to the 1st approval after rejection?

  • Suggested answer
    Kris Victoriano Profile Picture
    Kris Victoriano 100 on at
    RE: Start again workflow in the same flow

    You can set conditions inside the approval element of the workflow, also, you can add a conditional element where you can set what the workflow will take as the next step when a condition is met or not. For example, if rejected, it will go back to approver one.

    I suggest using the condition element.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Start again workflow in the same flow

    Hi Javier have you tried setting up steps in the approval node? Rather than having 3 individual nodes if you level down you should be able to add a new step by dragging in 'new step'Doing it this way will allow a rejected cost to go back to the start of the approval process. 

    0333.Capture5.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans