Workflow logic for multiple-approval process - sharepoint

I have the need to create a workflow that will begin when a user submits an infopath form to a document library. Some fields will be extracted from this form to build the workflow.
Steps:
Notify the form submitter's manager and request that they approve or disapprove.
One or more other users will be notified and requested to approve or disapprove the submitted form. If any of them reject the form, the original requester should be notified and requested to re-submit the form.
I can make a workflow for step 1 and then check the value of that field in the task to see if it's either approved or disapproved before moving onto the next step or not.
The issue I'm having is how to check whether someone has rejected or approved in the 2nd step, since there could be multiple users.
Any help is greatly appreciated

After step 1, you can track the workflow in the "workflow Tasks" list, i.e., you can get who rejected it, when they did it and why they did it(if you have a notes/reason column).
If you/your company can afford to buy a third party tool like nintex/bamboo workflow conductor/k2, this approval process come out of the box. They are a bit expensive though

Related

Requesting approvals from different approvers for each document in a SharePoint library

We're trying to set up a document library where we can post documents and trigger an approval process, but where we define the approver or approvers for each document. In other words, every document is approved, but the sequence of approvers may be different for every document so we want to somehow set who approves each document and in what order when the document is posted.
I'm at a loss for how to set up the Flow to do this so any suggestions would be appreciated.
I tried to set up a flow in Power Automate using a field in the document library for approvers but it returns an error, I think because the process is triggered when I create the document and before I set that field.
Can you share your error and a screenshot of your current setup?
Probably the easiest setup would be to create separate fields in the library for each approver and call them something like FirstApprover, SecondApprover and ThirdApprover.
For each Approver you could use their Email field of the library in the assigned to field of the Start and Wait for an approval action.
In this scenario I would use three separate Start and Wait for an approval actions.

NetsSuite parallel approval workflow

I have made some basic approval workflows for custom records and things like estimates, but they have all been single approver or sequential. Does anyone have some advice on how I might achieve a parallel/asynchronous approval workflow?
I figured the workflow would add the approvers to a workflow variable list, send out an email to each approver and as the emails came back it would remove the people from another list awaiting approval. Once the list was empty it would transition to the next state. Seems like a simple concept but I can't get a workflow to add multiple items to a list...just set a static value which is 1 employee.
Thoughts?
Without more detail it's difficult to give detailed answers but something like the following is the idea:
You'll probably need a custom record that is linked as a child to the record to be approved.
Some workflow action scripts will likely be required to get this working.
When the main record enters the approval state a workflow action script will get the list of approvers and for each create a custom (approval) record linking the approver, approval status and record to be approved.
Another workflow will handle the single record approval of the new approvals record (e.g. sending out the original notice email, cancelling the workflow if the parent is rejected)
A scheduled transition on the main workflow will run searches to transition the main record when all approval records are approved or any approval record is rejected.

SharePoint Designer 2013 Workflow Lookup for SP Online

I'm having issues with my SP Online Workflow. Setting up a custom list for Time-off requests. Person puts in request, task is assigned to their manager, then manager either approves or denies request, then informs the requester of the outcome. That whole part works great.
I've added an option for the requester to cancel the request. If the request has already been approved by the manager then it sends an email to the Manager, HR, & requester saying the request was cancelled. This part works fine.
The part that I'm having issues with is if the request hasn't been approved/rejected by manager and requester cancels. It's not sending out the email to manager and changing the Workflow Status.
I have it configured exactly like the cancel workflow if it's been approved. What am I missing here? Any help would be greatly appreciated.
Here are some images of the entire workflow and the Workflow lookup in question:
Entire Workflow
Workflow Lookup in Question
Thanks
I think if one of your condition complete, it should just go the next stage in your case which is end of workflow. When you condition is satisfied, you don't need to go through all other if anymore.
If request cancel equal no
If outcome equal approved
Go to next stage
If outcome equal rejected
Go to next stage
Else
If taskStatus equal not started
Go to next stage
If taskStatus equal completed
Go to next stage
I switched not started and completed. Because logically speaking you should go not started first.

What structure should I use for an approval workflow?

This is a common problem that I find when programming a Lotus Notes App.
Use case: An employer fills out a request form in a Request database. A notification gets mailed to the person that may give them OK or REJECT for that request. The authority person visits the Request database and gives OK or REJECT.
Good. But, where would you save the approval status OK or REJECT:
Should the authority person have write access to the original request
and set the status directly (and may alter other data in the form)
Should the aproval action create a response doc to the original (and i cannot show in a view the current status)
Typically you are better off setting an approval status directly on the request. That may not seem initially ideal, but remember Lotus Notes isn't like a relational database where things would be more normalized.
Let's consider the alternative, putting a status in the response document. Now how do you show all the requests with their statuses? You'd probably have to write some code just to do that when with the first option you could just create a view.
You can control the access to the document using reader and writer access fields. See how the built in template does it (the approval workflow template). Essentially as the document changes state (i.e. New, Submitted for Approval, Approved or Denied, etc), you can also change the reader and writer access fields at that point.
Once, I designed a database that mailed that request to the approver with the form stored in the document. As long as the user accessed the document using a Notes client, they could click on a button in the message to approve, which would send a message back to the database with the field data to mark the request as approved. An agent in that request database was set to run when new mail arrived, read those messages and change status on the original requests. That way, the approver never had to leave their inbox and didn't even need rights to edit the request.
You could do it with URLs if the users would be approving via browser client - have the link to an agent and pass in the parameters.
Or, to go back to your scenario, once the requester has submitted the request, don't display the fields that you don't want changed, display the values as computed text instead.
Anyway you look at it, best to have the approval recorded on the original document.
For above, Everything is our concern. In SQL or any other RDMS, we are in need of normalize that. Similarly here we have view categorization, show response document in hierarchy, and a lot of great hide when functionality based on role, ACL, unique person and whatever you need. We can easily manipulate the data render depends on the current user.
For your Q:-
1. We can control the appropriate user[authority person] from editing the request form's item.
2. We can also do by the response document. There we can show the documents in view by using show the Response documents in hierarchy.

Setting ModerationInformation.Status from Approved back to pending removes

Seeing if anyone else has had this problem and a resolution to it.
I have a visual studio sequential workflow on a list (not a library) which does NOT use tasks, the approval process is done through the Approve/Reject OOTB buttons on the list item. The approval is a 2 stage approval, whereby if the 1st stage is completed (via clicking the Approve OOTB button), i reset the ModerationInformation.Status from Approved back to pending then send an email to the 2nd stage approver.
My problem is, when i set the the ModerationInformation.Status back to Pending from Approved so there is never an approved version, the Creator loses permissions to view the item, and i get the "cannot find item" error from SharePoint for the person who created the item. The 1st and 2nd level approvers and anyone with approve rights CAN still see the item.
Some more background information. the code i am using to update the moderationinformation is
I get the properties from the workflow event and get a hook into the listitem
properties.Item.ModerationInformation.Status = SPModerationStatusType.Pending;
properties.Item.Update();
can anyone help.
Try using properties.Item.SystemUpdate(); this prevents SHarePoint from triggering any attached EventReceivers etc. I've had the same thing happen also. IMHO this is related to the fact that the item goes into update mode, then SharePoint basically has taken control over the item (seeing as workflows are usually run as the System account) but still sends you back to the the return url (i.e. the EditItem page of the list).
Since SharePoint is probably still doing work on the item (and when you use item.Update() it goes through all events etc. etc.) you cannot open it anymore, because you are not the system account.
When SharePoint finishes (after sent the emails etc.) the item is accessible by users again.
Like I said, I had the same thing happen during long running (i.e. longer than 2 to 3 seconds) EventReceivers / Workflows.

Resources