Workflow basic issue

Okay I'm grasping at straws

What is wrong with the following workflow - I obviously just don't grok how this works...

-------------------------------

step 1

email someone there is a new item in list

wait for currentitem:status (a read only form field that was promoted) not to equal "pending"

step 2

if currentitem:status equal to "finalized"

email workflow initiator - "was finalized"

step 3

if currentitem:status equal to "rejected"

email workflow initiator - "was rejected"

-----------------------------------

but it EMAILS the "new" email , on EVERY submit to the library - even though they are updates/resbutmits (with allow overwrite)

if I put a "if currentitem:status equal to "pending"

then it only fires that "new" email once, but the other steps aren't running...?

ASIDE: (if you tell me that I should be using an approval task, then riddle me this:
a) how do you trigger something that "completes" the task from INFOPATH
b) how do you block or route the "Open this task" thing in SP or Outlook to the INFOPATH form (as there is lots of fields I need filled in not just "approve/reject" - I had a long look and I couldn't figure it out (if you can even do it with a form lib

August 27th, 2015 1:51pm

It looks like WAIT actually stops any of the other steps being evaluated?

I changed the workflow to look like this and it seems to work as I intended...

step 1
if currentitem:status equal to "finalized"
   email someone there is a new item in list
   wait for currentitem:status (a read only form field that was promoted) not to equal "pending"
   if currentitem:status equal to "finalized"
      email workflow initiator - "was finalized"
   else if currentitem:status equal to "rejected"
      email workflow initiator - "was rejected"

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 11:07pm

Hi noJedi,

The workflow will run to next step when the condition is met in the Wait for Field Change in Current Item.

So please make sure that the value has been changed in the status field.

Does the workflow keep hanging on the Wait for Field Change in Current Item or complete without sending the emails?

Thanks,

Victoria

August 30th, 2015 11:30pm

step 1
if currentitem:status equal to "finalized"
   email someone "there is a new item in FORMLIBRARY"
   wait for currentitem:status (a read only form field that was promoted) not to equal "pending"
   if currentitem:status equal to "finalized"
      email workflow initiator - "was finalized"
      set workflow status "Approved"
      stop the workflow and log...
   else if currentitem:status equal to "rejected"
      email workflow initiator - "was rejected"
      set workflow status "Rejected"
      stop the workflow and log...

So you are saying either workflow should have had the same effect?

regardless of the "step" segregation?

What I was seeing was this:

a) "on creation triggered" workflows would send the "notification" email (step1) and then the workflow would be "Completed" - so there was no way for the user to complete the workflow becasue it was already completed.

b) "manually started" workflows would send the "notification" email and then become "stuck" in the wait, and no changing of the STATUS field would appear to have any impact...

I think I have since resolved the issue with the following workflow:

Free Windows Admin Tool Kit Click here and download it now
August 30th, 2015 11:56pm

Hi noJedi,

I didn't see any big difference in the workflows in your first two posts except addition condition added.

And you have added more steps after each condition which I think does not affect the whole process as the steps need to be executed after the Wait for Field Change in Current Item in your third post.

I have doubts about this issue:

1.Is the status column a custom column added in the InfoPath form and promoted to be a field in form library?

2.Workflow still stuck after changing the value of status column used in the workflow?

Thanks,

Victoria

August 31st, 2015 1:06am

Hi Victoria,

There is not much difference between the last two workflows.

1) Yes the "STATUS" field is something created in infopath and "promoted" when publishing.

2) the last posted workflow is the only one that does these two things:

  • Changes the WORKFLOW status to Something other than "In Progress"
  • appears to actually STOP the workflow (the other one seemed to leave the workflow "incomplete" - ie in SP workflow for the item, the "Running workflows"

I am curious about two things:

1) is it possible that republishing a workflow could fix it?

2) is it true that the following should be logically the same?

step1
if some condition
    wait for field1 to equal "move on"

step 2
if some other condition
    do something

step 3
if third condition
    do something else

vs

step1
if some condition
    wait for field1 to equal "move on"

if some other condition
    do something

if third condition
    do something else

So "steps" are really just for the designer and have no logical implication?

In addition I'd like to know:

if "condition" is met and wait is "hit" - does it WAIT indefinately at that point -ie: so step2/3 or the If statements will 100% not get called until field1 is changed to be "move on"?

once all these steps are run should the workflow status be "Complete" or does this not change unless you change it explicitly in the workflow?

Do you need to "stop workflow and log"? to actually STOP the workflow, or is this a "breaking statement"? and if the logic flows to the end (eg: end of step 3) will the workflow complete automatically?

(I'm just wondering if I was/am dealing with a broken workflow/SP server - causing me additional greif in understanding what is going on, given that I'm not a wiz at Workflows...)

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 2:56am

Hi noJedi,

The two workflows in your post are logically the same.

The workflow will stop at Wait for field change step if the first condition is met.

And other steps will not be called until the field1 is changed to be "move on".

You do not need to change the workflow status and stop workflow and log.

The workflow status will change to Completed after it finishes the steps(if you are using 2010 workflow platform).

Thanks,

Victoria

September 1st, 2015 10:03pm

Hi Victoria,

Thanks for the clarification!

There must be some other issue with the site and/or workflow. I've created the same thing on a separate form library in the same site and it does not have the same strange behaviours, so this might have been a wild goose cha

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 11:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics