we would need to see your loop action condition and know in what condition it should run and in which it should stop
Hello again Marian- thank you! See attached. I assumed the loop would keep going around until each condition = True. But without ever putting anything into one of those 3 fields, the workflow just passes the loop and continues until the end.
It should keep looping until each of the 3 conditions=True THEN move on to send the next email.
I assumed the loop would keep going around until each condition = True.
that's correct.
while overall condition evaluates to true, loop is iterating over and over
the workflow just passes the loop and continues until the end...
what does this exactly mean?
does it goes over the loop body once, executes actions (sends notification) and then jumps out of loop?
or does it just reach loop action and then continue past the action (so skips loop body)?
But without ever putting anything into one of those 3 fields
you based your loop conditions on a set of list fields. note users (usually) do not know something is running and looping in the background and so that they should change something asap.
this may cause long running or even infinite loops (and so wasting your farm resources). that's not proper design.
loop action is usually conditioned by a workflow variable which is changed appropriately within the loop to cause the loop to finish in a reasonable time or after reasonable amount of iterations.
the workflow just passes the loop and continues until the end...
what does this exactly mean?
does it goes over the loop body once, executes actions (sends notification) and then jumps out of loop?
or does it just reach loop action and then continue past the action (so skips loop body)?
Not sure if it goes around the loop but with NONE of the conditions every equalling TRUE, the workflow does Pause for Duration (I set it at a minute just for testing) but then after the minute it continues until the end.
I wanted the Loop to run once a day (Pause for 1 day) until each condition = true, THEN continue on to the next item (2nd email sent).
The workflow runs until completed only pausing for "Pause for Duration" but the 3 conditions never = True and the workflow runs through until the end. Here's my workflow history that runs until completed without adding into to any fields in the List:
OK I guess I was thinking of the Loop BACKWARDS. Each condition should read IS EMPTY so the Loop starts, does that sound right to you? Then use another action to check that each field is NOT empty?
Not sure if it goes around the loop
check the "View workflow history" (graphical overview). there you should see which actions were executed (green actions) and which not (grey actions)
the workflow does Pause for Duration (I set it at a minute just for testing) but then after the minute it continues until the end.
is the pause within the loop or out of the loop?
it's not present on your screenshot.
I wanted the Loop to run once a day (Pause for 1 day) until each condition = true, THEN continue on to the next item (2nd email sent).
I think these are the main misunderstandings...
loop runs while overall condition is true, not until it is true.
as well it evaluates the whole condition whether to proceed or not single expressions within the condition.
I wanted the Loop to run once a day
for this purpose it's better to design a site workflow, and schedule it to run daily.
THEN continue on to the next item (2nd email sent).
I somehow miss the point of this design.
when workflow starts, it reads in bunch of items. then you want to send notifications one at a day.
so if you read in 100 items at the beginning you'll be ending them for 100 days....
if anything changes with those items in the meantime (eg, they may be deleted), your workflow will not reflect that.
OK I guess I was thinking of the Loop BACKWARDS.
hard to say for me what you were thinking of
Each condition should read IS EMPTY so the Loop starts, does that sound right to you? Then use another action to check that each field is NOT empty?
I do not know. I do know what you want to achieve - in what circumstance loop should run and in which not.
but as I mentioned above, to condition looping on list field value is not wise design.
Indeed, the loop condition keeps looping while outcome is TRUE. Apart from changing the condition to Is Empty, you also should replace AND with OR, otherwise the condition stops as soon as 1 is no longer empty. Assuming that the loop should stop as soon as all 3 are no longer empty.
I understand now the loop condition keeps looping while the outcome is TRUE. I thought the complete opposite before.
I want the workflow to send an email to a team and pause until that team fills in 3 fields that are required. I thought a Loop with Conditions was the action to do that. It would keep looping until each item was "not empty then move on to the next item in the workflow. I guess now I don't really understand the point of the Loop if it runs while true.
I guess I need another action entirely. Workflow pauses until fields1, 2, and 3 are not empty. Once those are not empty, the next email is sent to the next team for the information they will supply. Workflow is paused until they fill in their fields, then it moves to the final step.
Hello Jean-Pierre-- thanks for the information. Can you tell me if I use "or" for the 3 items, the loop will keep running until each of the fields has data in them, right? Once all 3 have data in them, the Loop condition is no longer true and it will move to the next step?
Hi Mark,
Correct.
For determing/testing this you can use a table to determine the outcomes:
Is Fld 1 empty? | Is Fld 2 empty? | Is Fld 3 empty ? | OR outcome | AND outcome |
---|
No | No | No | No | No |
No | No | Yes | Yes | No |
No | Yes | No | Yes | No |
No | Yes | Yes | Yes | No |
Yes | No | No | Yes | No |
Yes | No | Yes | Yes | No |
Yes | Yes | No | Yes | No |
Yes | Yes | Yes | Yes | Yes |
If I recall correctly there's some math available assisting you with this kind of logic.
I want the workflow to send an email to a team and pause until that team fills in 3 fields that are required.
that's typically managed with tasks.
assign a task to the team or single team members. task action causes workflow to pause until task is responded.
tasks as well gives you broader possibilities how to manage what's being considered as task completed or not (single response from any team members is sufficient, all must respond...), manage what's being done if task is not responded within reasonable time frame, automatically delegate the to some else if originally supposed team or team member is not able to respond (eg. he is out of office), etc.
have a look on flexi task, to do task, request review, request data, ... actions
It would keep looping until each item was "not empty then move on to the next item in the workflow
do not try to manage processing of all/several list items from within single workflow instance (until you have good reasons to do so).
design the workflow to take care just of processing of single item, and let the separate (list) workflow instances run on each list item independently. that way all the items will be processed in parallel, so processing of list item #2 will not wait until item #1 is processed, item #3 will not wait on item#2, and so on.
I guess now I don't really understand the point of the Loop if it runs while true.
loop action is very useful. imagine eg. you want to create a 10 items. so you configure a loop action and let iterate while some control variable is less then 10
I guess I need another action entirely.
as mentioned above, I guess a task action would suit you the most
Workflow pauses until fields1, 2, and 3 are not empty. Once those are not empty, the next email is sent to the next team for the information they will supply. Workflow is paused until they fill in their fields, then it moves to the final step.
that's exactly how tasks works. until task is responded, the workflow doesn't move on.
furthermore, filling some fields in a list item is independent of a task response. so user may step by step prepare data and update list item fields even multiple times (if that might be needed) until they finalize it, workflow doesn't move on until they explicitly respond the task.
Thanks so much, Marian- I appreciate it. I was trying to avoid using tasks because the tasks would have to go to a distribution group and it seems like it would create a lot of confusion as to who was working on which item. It's certainly something to keep in mind, though. There's not much to this particular workflow that can run in parallel because some information is not possible to have until prior info is given. I think it is short enough that this work ok now. I sure appreciate all of your assistance. It's really working great now that I have Loops correctly in my head