cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi there

I am having some issues setting up dynamic/parallel approval in a workflow template, every time I get one bit working I seem to find another issue and I'm hoping there are some experts here who can help.

I've knocked together a quick diagram of what my workflow needs to do, but to summarise:

My workflow starts when an invoice item is price blocked, and it uses multiple account assignment (this bit is OK);

I have created a new task to find all of the approvers based on the account assignment, and then fill a table called ApproverTable in the workflow container (again, all fine, in my example it finds two approvers). At this stage I capture the number of approvers and set a container variable called Counter to the number of approvers (so, again this is 2 in my example);

Then for each entry in ApproverTable, it should send a decision step to the financial approver who decides whether to approve or reject the price variance. To achieve this I have used a block step, set it to ParForEach, and on the Parallel Processing tab I have entered my multiline elemenet as ApproverTable (I am getting a task per approver);

If the approver rejects the variance, it should send an email to the requestor and loop back to the start (seems OK);

If the approver accepts the variance, they click Approve. At this stage I am using a container operation and subtracting 1 from the value in Counter;

I have a loop until step that checks if the value of Counter is equal to zero. If so, the price block is removed.

The issue I have is that the Counter never seems to get to zero when I use it in the block. It's as if the counter is 2 in each step, and so it's always 1 at the loop until check. I then end up in an endless loop, whereby it just restarts back at requester reviews bit...

Does anyone have any idea where I might be going wrong please?

0 Likes
View Entire Topic
anjan_paul
Active Contributor
0 Likes

Hi James,

Try to modify like this way. Instead of Counter , take a Boolean container element . Replace the Container operation step after Approve with setting the Boolean conterner element with X .

In the loop until step, check Boolean contaner element = X .

Please do this, and let us know.

Thanks,

Anjan

jamespallett
Explorer
0 Likes

Hi Anjan

I thought about using a boolean at first, but the block should only be removed if all of the users approve the tasks. Or is the boolean checked per approval task? Sorry, have no workflow experience so I am trying to muddle my way through! 🙂

Thanks