2

Does anyone see any reason in this workflow why the "create a list item" action highlighted is being duplicated in the assigned list? It creates two of the same item in the assigned list. I'm clueless why this is happening.

duplicate list items

3

You're running the steps in parallel, and both are being triggered when the status is changed to Approved. There's an item being created in Workflow History Test in the Pending Decision branch, but also in the Approved branch. Here's the order or execution:

  1. Approved: Wait for status change to Approved
  2. Pending Decision: Wait for status change to Pending
  3. Pending Decision: Set Variable reminderaction1
  4. Pending Decision: Set workflow status
  5. Pending Decision: Create item in Workflow History Test
  6. Pending Decision: Wait for status change to Approved
  7. Pending Decision: Set workflow status
  8. Approved: Set Variable reminderaction1
  9. Pending Decision: Create item in Workflow History Test
  10. Approved: Set workflow status
  11. Approved: Create item in Workflow History Test

It's the actions in steps 9 and 11 which are creating the duplicate entries in your list, because the two steps are running simultaneously.

  • I have the parallel block setup to run with a Completion Condition that looks at each side of the block and when a property evaluates to be true, the other element in the parallel block is cancelled. That's why I'm using the workflow variables to mark that side with Yes, and thus continue on with that part of the workflow. I hope that makes sense, and please, please tell me if I am still misunderstanding something. I appreciate your feedback. – cbbrown Jul 12 '17 at 20:02
  • I don't think it's working the way you expect. When steps run in parallel, they are independent of each other. And while you are setting the variable, you don't have any point to check and see if the variable is already set. In order to diagnose, You can add workflow history logs after each action, so you can see what's executing and in what order. Be sure to include the step name, so you can see where the action is being triggered. – Kalea Jul 12 '17 at 20:10
  • Here's the order (sometimes a few actions are flipped): 1. Pending: Wait for Pending Decision 2. Pending: Set Variable to reminderaction1 3. Pending: Set workflow status to Pending Decision 4. Pending: Create Item in Workflow History List: Pending Decision 5. Approved: Wait for Approval 6. Pending: Wait for item to be approved after pending 7. Approved: Set variable to remainderaction1 8. Pending: Set workflow status to Invoice Approved 9. Approved: Set workflow status to Invoice Approved 10. Pending: Create item in history list 11. Approved: Create item in history list – cbbrown Jul 13 '17 at 14:37
  • So it seems that everything in the Pending Decision element are running as they should until the workflow waits for the approval to happen, and then it jumps around. Any suggestions on how to fix this? – cbbrown Jul 13 '17 at 14:39
  • I would take out the last three actions in your Pending Decision step (wait for status=Approved, set workflow status to Invoice Approved, create item in History). These actions are being handled by the Approved step. If the status never hits Pending Decision, it goes directly to Approved. But it can take a side trip through Pending Decision if needed. – Kalea Jul 13 '17 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.