| serge's profileSerge Luca (Sharepoint M...PhotosBlogLists | Help |
|
October 29 Workflow Service (Azure)Very exciting PDC2008 : back to the (worldwide) logical mainframe with Azure...
October 27 Step by Step Tutorial. Creating workflows with Windows Sharepoint Services and MOSS 2007 (part 13/20). Fixing and running the ASPXCollectFeedback sample (sdk)
Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007 (part 13/20). Fixing and running the ASPXCollectFeedback sample (sdk)
By Serge LucaMVPIntroduction I’ve received tons of emails related to workflows & aspx forms. Indeed, I’ve faced many situations where Infopath forms in Sharepoint workflows are not flexible enough or not stable enough; therefore we need the full power and stability of the Asp.net framework (and moreover, some applications need to be based on the free WSS without Infopath Form server). For instance, many people want to see the history list in the task edit form, they want to use Silverlight in the workflow forms,… ; I’ve recently worked on a project where the association form must automatically associate several informations to each CreateTask activity, the form uses reflection to retrieve each CreateTask activity… I’ll show you some other examples in the next posts. The first natural step for a Sharepoint developer is to check the WSS/MOSS sdk to find a good sample. There is a pretty good one , the ASPXCollectFeedback, which unfortunately doesn’t work as expected unless we fix it; that’s what I’m going to do in this post : fixing this sample. I’m very surprised that no one in the Google/LiveSearch universe has complained about this sample (this sample was provided since 2006…). Let’s fix this for the Sharepoint community.
Open the solution Install the downloadable WSS sdk 1.4, backup the projects located in c:\Program Files\2007 Office System developer Resources\ASPXCollectFeedback\ and open the CollectfeedbackWorkflow.sln solution.(fig 1). [Fig 1.ASPXCollectFeedback Project location in the WSS 1.4 sdk ]
The problems and the solutions Problem 1. One project (TaskWorkflowContentType) is not compiled by default. Solution: very easy, right click on the solution property page, select Configuration Properties-Configuration and check the Build option of the TaskWorkflowContentType project (fig 2). [Fig2.Build options ] Rebuild the solution. Problem 2. Gacutil in install.bat
Problem 3.The custom task form doesn’t show up in display mode
[Fig 3.The standard task form shows up instead of the custom form]
[Fig 4.Custom task form]
<Display>_layouts/TaskWFCT.aspx</Display> [Fig 5.Adding a custom Display behavior]
Problem 4. “Require Manage Lists permission to start the worklow” option is not used : The association page doesn’t take the “Require manage Lists permissions to start the workflow” option into account (Fig 6). [Fig 6. This Permission is not used correctly in the sample] To fix this, you need to add an additional hidden field in the WFAssoc.aspx page (Fig 7); <input type="hidden" name="ManualPermManageListRequired" value='<% SPHttpUtility.NoEncode(SPHttpUtility.HtmlEncode(Request.Form["ManualPermManageListRequired"]),Response.Output); %>'> (More details about this in my next tutorial) [Fig 7. Missing hidden field]
Problem 5. The List Content Type case is not handled Indeed there are 3 kinds of workflow associations:
In the SPWorkfowAssociation class provides the following methods: public static SPWorkflowAssociation CreateListAssociation ( Anyway, I will fix this problem in a next post.
This hands-on training is the property of Redwood S.L sprl and may not be organized in class or in group without the prior written permission of Serge Luca. Should you wish to organize this hands-on training in your company or institution, please contact Serge Luca first to enter into a licence agreement. Each trainer or teacher using this hands-on training should have a licence agreement. Please ask your trainer or Serge Luca whether he or she has entered into a licence agreement with Redwood S.L sprl. The hyperlink to this hands-on training may be placed on your website for free, on the condition that the name Serge Luca is clearly mentioned in the reference. Please send us a mail containing the link to the web page our reference is used on.
October 05 Speaker for Microsoft Macedonia (Vizija event)I've been fortunate enough to be invited last week as a speaker for Microsoft Macedonia at the Vizija event (equivalent of the Dev Days) in Skopje.
I had 2 sessions on my favorite topics : Workflow Foundation and Sharepoint/Oba; the sessions were pretty crowded (more than 400 people in each room) ; people were positive, warm and eager to learn. I had a great time, it was my second stay in Skopje.
See you next year for more Workflow Foundation 4.0 topics !!! (...and maybe Office 14, who knows ?
I'll post some pictures next week...
|
|
|