Dynamic Approval Workflow

I have designed a LEAVE application using INFOPATH form where user needs to input the domain user id. It using custom control (contact selector). Once the user inputs the name; the associated details are fetched from active directory (For example, user email id, user department,  his manager name, manager department and manager email).  Once the user fills the form, what I am looking for is an approval workflow should be generated and assigned to the manager and HR (please note that manager is depended on the username input). This means either Manager or HR has right  to approve the leave.

The sharepoint workflow is limited and the only tool based on my study is sharepoint designer which is capable.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Clay FoxDirector of Business IntegrationCommented:
You can build the workflow logic into your InfoPath form without code.

Use rules, various form views for each stage, and email submit data connections to perform the routing, etc.

I have done it before since I did not want the complexity of SP workflows.

SO new form uses default view. Once complete form status field is updated to submitted and email data connection sends to manager or whatever.  When form opens rules check the status and the username opening the form and routes to approver view or submitter view. On approve the form routes again to the next person selected or whatever.
Shailaja KumarCommented:
Another option is to create a sharepoint designer approval workflow, for reference,

You need to add your manager field to the under the property promotion section.
paritoshjaniAuthor Commented:
I have managed to use sharepoint desinger and use initiation variable for the user inputs (Approve / Reject & comments).

Now the issue is (My requirement in brackets):
1. Any user can approve or reject (Only manager shoudl have rights)
2. Any user can multiple time approve or reject (Once approved or reject, the form should get into read only mode).


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.