SOLVED

Flow is behaving wierd

Brass Contributor

Hi 

I have configured a flow in a Document Library, which will trigger when an item is added or modified.

Inside the Flow we have the Start Approval process.

When I edit an item properties , all the other items also trigger the Flow.

 

Thanks

Asesh Maity

 

 

 

14 Replies

Sounds like expected behaviour! The flow triggers when any item in this library is created or modified

Can we identify the file in the Flow, that we usually did in ShareDesigner "Current Item"

What exactly do you want to accomplish?

I need to start an approval process.

In the approval process once I approve it changes the Statues to "Completed" (Custom Field).

But if I have another item its approval process starts. This is the issue

 

So it starts an approval for all files in the library , even though they aren’t modified? And this when a new item is created?
You can paste the flow if you want to

Yes, the approval starts in all the cases.

Yes the approval starts for all the files.

Hi 

I am sending the screen shot of the Flow.

In my flow when a file is added or modified, it should trigger.

I have made the Content Approval Settings on.

 

My requirement is according to the classification (Custom choice Field) selection, it goes approval managers to approve the document.

 

The flow i did as follows:

1. Call the action when the file is added or modified.

2. Get the File Metadata (here in the FileIdentifier i added Identifier value)

3.  Initialize the classification variable

4. Set the variable of Classification which i selected from the form.

5. Check the condition if the document uploaded needs Approval process, as we have the requirement that all the documents should not go for the approval process.

6. Switch action to start the approval process according to the classification selected.

7. For the case "Architecture" , i call the content approval status to set the the Approval Status as "pending".

8. call the "Start an Approval" .

9. Condition to check the Response.

a.  If Response is "Approve", again call the content approval status to set the value as "Approved"

b. Send the mail.

c.  If Response is "Reject", again call the content approval status to set the value as "Reject"

d. Send the mail.

 

Now the issue is suppose i added a file, with all my valid metadata, it starts the Approval process, and its status is "Pending" , sending a mail

Now again i add 2nd new file, it starts the approval process and its status is "Pending" , and send an approval mail to the approver, but at the same time a new instance of previous item, flow starts the approval process, and a mail is sent again for the previous item.

 

But if i status is "Approved" after approving by the approver, that items instance is not triggering.

 

Hence, if there are 2 files which is "Pending " state, and third file is added into the library, 3 approval mails are recieved or 3 instance is creating.

But if there are 2 files , one is "Pending " and other is "Approved" and a third file is added in the library, 2 approval mails are recieved or 2 instance is created.

 

Appreciate your help to figure out my mistake.

 

 

 

FirstImage.jpg2ndImage.jpg

Hi! 

 

I'll try have a look at this as soon as possible! It's a busy day at the office today :)

 

In the meantime, I would suggest also posting this in the flow community:

 

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community/ct-p/FlowCommunity

 

just Copy / paste the last post in there!

 

/ Adam

 

 

 

/ Adam

Thanks Adam, i send the query to the Flow Community as you suggested in your last Post.
best response confirmed by Asesh Kumar Maity (Brass Contributor)
Solution

Hi Adam,

 

Have you got the chance to view the issue?

 

No, unfortunately not :(  Any responses on the flow community??

Hi Adam,

 

I had communicated with the flow power community as you suggested.

They suggested to check the status and restrict to call, before the Start an Approval action.

The details url of discussion

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Approval-Flow-is-Behaving-Wierd/m-p/2140...

 

I guess the suggestion is the way around, but there will be always a new instances will be created for each and every created or modified items, which are Pending or Draft state.

I need to understand why every time the flow is creating a new instances if the item is in Pending or Draft state.

Appreciate your help for the same. Is it the built in behavior of the Action or I made a mistake?

 

Thanks and Regards

Asesh

1 best response

Accepted Solutions
best response confirmed by Asesh Kumar Maity (Brass Contributor)
Solution

Hi Adam,

 

Have you got the chance to view the issue?

 

View solution in original post