Solved

Create a multi-level approval workflow integrated with infopath forms in Sharepoint 2010

Posted on 2010-11-16
5
2,955 Views
Last Modified: 2012-05-10
Hi All,
I am developing an applicationcalled "Software Request Form". The form is designed using infopath. Now I want to create a 2/3 level approval workflow, which should submits the form to the manager for approval. Manager would be able to add commnet and approve/reject form. If manager approves it should submit to the IT dept for further process. IT dept will also be able to add IT related data for the form and then submits for IT managers approval. Finally IT manager will add comment and approve/reject the form. How can i achieve this?? one more thing is that, i have 3 sections in my form, one for user,another for manager and another one for IT dept, i have hidden the sections based on the people in infopath but if the workflow runs, i need to achieve the same using the workflow in the Request form i created... is is possible??

This is what I did:
1) I add the GetUserProfileByName web service that SharePoint exposes
2) I check the identity of each user who opens the form using the userName() function
3) I hide/show and lock/unlock sections based on the logged-in user, including approval buttons (even digital signature sections, if necessary)
4) I keep the entire process in one form library.
5) I use a lot of hidden fields in my main data source that saves identity information about submitters, managers, and whoever else needs special permissions (e.g. IT)
6) I use those hidden fields of saved user info to establish conditions in my workflows
7) I iteratively run my SPD workflows depending on what happened when the form was last edited. If the initial user submits, I trigger an email to that person's manager (automatically using the web service from step 1, which can detect a person's manager). After the manager submits an approve or reject, I trigger an email notifying everyone and alerting the IT person that it's his (or a group's) turn to process at which point different areas of the form are available, and different workflow rules trigger.

Everything is working fine but I am not sure about the best practice for the above problem. Is there any other process that I can follow?
What is the best practise for the above problem?

0
Comment
Question by:monsur09
  • 2
5 Comments
 
LVL 15

Expert Comment

by:melli111
ID: 34154844
I'm not sure I understand your exact problem... Is it that you want approvers to be able to enter their own comments?

How are you having them approve.... are you having them approve in the SharePoint library, or did you create buttons on the form for them to approve?

**How I work mine is I ignore the SharePoint approval -  I just don't use that at all.  I add buttons to my form 1 button for Manager1, another for Manager2, another for IT.  They all have their own fields that these buttons set to approve or reject.  The rules on the button also test to see if all the other approvals have been met and assign an overall form status... I mainly use this status in my workflow.  Along with those buttons (that have conditional formatting so that only the person who needs to approve/reject can see it) they also have their own comments area... which when a comment is entered it becomes viewable on the form, but it's read-only to anyone but the manager who entered the comment to begin with.
0
 

Author Comment

by:monsur09
ID: 34159955
Yes, I want approvers to to  be able to enter their comment.

My steps are:
1. User login to sharepoint and browse a form library where software request form is already set as content type. User then click the add document which opens a blank infopath form in a browser.
2. User then fill out the form and click the submit button from the form toolbar. After submiting form is stored in another form library with a unique name. Workflow is attached with this form library. So when a new form is created workflow will set the form status waitingapproval and send a notification mail to the manager with the link of the form in sharepoint.
3. The form is readly for all users except the manager.
4. when manager login to sharepoint and open the form they will see a new section in the form with a text field for their comment and a dropdown list to select approve or reject.
5. Manager will enter comment and choose approve or reject from the dropdown and again click the save button. So form is again saved in the form library and workflow will start again and set the form status waitingITAdmin approval. Workflow also sends an email to IT admin with the link of the form
6. So again form is readonly for all user except the IT admin. ITadmin then login to sharepoint and open the form and will see a new section to fill out. After submitting the form it again being saved in the form library. Workflow again starts and set the form status WaitingITManager approval and send a email to IT manager.
7. Finally IT manager opens the form and eneter their comment and choose approve reject and then save the form. Then workflow again starts and set the form status to approve/reject.

I have different view for all the users and there are some condition in the form to switch view based on the form status and the user who opens the form.
e.g
set openby = currnet user
if submitter is blank then set submitter = opend by

when opendby is manager and form status is WaitingManagerApproval then switch manager view
when opendby is ITAdmin and form status is waiting ITAdminapproval then switch ITAdmin view
when opendby is ITManager and form status is waiting ITManagerApproval then switch ITManager view
when oepndby is submitter then switch Readonly view

So these are the conditions set in the tools >form options >open and save section of the infopath form.
Every time form is added/edited workflow is activated and checking the form data and

Please see the attached workflow designed using sharepoint designer.

Now what do you think??? Is it the right proceure??
 workflow
0
 
LVL 15

Accepted Solution

by:
melli111 earned 500 total points
ID: 34166435
Your workflow looks good...

The only two things that you do differently than what I have learned as best practice are:

1)  I try to have the form do most of the work, so that the workflow doesn't have to do so much. -Meaning I would use rules on the approvals to set the Form Status, instead of using the workflow to set these values (it is ok the way you're doing it though)

2)  Instead of having so many views I add sections to the main view of my form - and I apply conditional formatting to the sections (i.e. if userrole is not equal to ITAdmin   hide this control)

*Another thing is instead of having a dropdown for the status for the approvers, I use buttons - for some reason the end users just love buttons and sometimes are confused by dropdowns (weird I know, but that's how they are in my world)

*One more note is I stay away from limiting myself to the submit in the toolbar.  I disable that submit and add a button... you have more flexibility with a button (you would use a rule to submit using your existing submit data connection).  On my main form view I actually have about 14 buttons - only two of those show at a time depending on the user (by use of conditional formatting).  Each button performs different actions and sets the forms overall status based on the other approval fields (by use of condition in the rule)
0
 
LVL 17

Expert Comment

by:GreatGerm
ID: 36135901
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now