Link to home
Start Free TrialLog in
Avatar of monsur09
monsur09

asked on

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

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?

Avatar of melli111
melli111
Flag of United States of America image

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.
Avatar of monsur09
monsur09

ASKER

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??
 User generated image
ASKER CERTIFIED SOLUTION
Avatar of melli111
melli111
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.