Personal Web & Sample Site
Skip Navigation Links
HOME |
About Me |
Articles
| Contact Us
Adding Workflow Context Data as a Secondary Data Source
Rating: 5 user(s) have rated this article Average rating: 5.0
Posted by: joet, on 4/27/2011, in category "Workflow"
Views: this article has been read 1711 times
Location: Houston, Tx, United States
Abstract: For a form to know which SharePoint site to validate the specified contacts against, you must add a workflow context schema to the form as a secondary data source. This context schema contains the URL of the specified SharePoint site. The schema also contains context information that you can use when programming rules and logic in the form. For example, the context information includes data you can use if you want to switch form views based on where in the workflow the form is used, or whether the form is opened on the server or a client computer.

For a form to know which SharePoint site to validate the specified contacts against, you must add a workflow context schema to the form as a secondary data source. This context schema contains the URL of the specified SharePoint site. The schema also contains context information that you can use when programming rules and logic in the form. For example, the context information includes data you can use if you want to switch form views based on where in the workflow the form is used, or whether the form is opened on the server or a client computer.

When Windows SharePoint Services loads the form as part of a workflow, it populates the data in the workflow context schema for the form.

The schema is as follows.

<Context 
isStartWorkflow="true"
isRunAtServer="false"
provideAllFields="true"
siteUrl=""
/>

 

This is a must if you plan on attaching workflows to your InfoPath forms.

Always remember when using load balanced web front-end (two web front-ends), you will upload the template and it will install as a solution. The solution is then run to install the template as a feature on both web front-ends. Also, if you make changes be sure to use the "Quick Publish" and update the form version. Keep an eye on versioning and make sure it encrements to the next number and not a much higher number. If you select publish under the file menu you are starting from scratch and this will create multiple solutions and your form template will not work correctly.

 Of course if you have multiple site collections within a web application (which I think is a bad idea, especially when using only one content database), and you install an InfoPath template on an existing site thats not under the root, make sure you do have a site collection created at the root or your templates will not work. That means if you don't have a site template at http://yoursite.com and you install and activate the InfoPath template at http://yoursite.com/sites/yourOtherSiteCollection/SitePages/default.aspx, you will have problems with the forms template.

Web Services I've used:

 


How would you rate this article?

User Feedback

Post your comment
Name:
E-mail:
Comment:
Insert Cancel

Copyright © 2013 Jose M. Tamez
Last Updated August 18th 2013