| serge's profileSerge Luca (Sharepoint M...PhotosBlogLists | Help |
|
November 27 Step by Step Tutorial.Creating workflows with Windows Sharepoint Services and MOSS 2007 (part 15/20).Easy ASPX Initiation Forms-(my small generic framework)
Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007 (part 15/20). Easy ASPX Initiation Forms-(by using my small generic framework)
By Serge LucaMVP
Introduction After the previous post, I’ve upgraded my generic framework to support Association and Initiation Forms. In this post I will illustrate how to create initiation forms. The assembly and the main namespace have been renamed “SergeLuca.WorkflowTools.AspxForms”. The framework now provides 2 main classes your association or initiation page must be derived from:
1.Use the existing project in the startup folder This startup project is more or less the project you build in step 14. The main differences are :
[Fig 1.Generic framework assembly referenced in the project] An initiation form, WFInit.aspx, has been provided in the LAYOUTS\DemoAspxFormWorkflow folder : [Fig 2. WFInit.aspx Initiation form provided with the project]
2. Add and implement the Initiation form Page : the GenericWFInitPage
public void BtnOK_Click(object sender, EventArgs e) this.SubmitInitiation(); }
3.Using the Initiation or Association form data from the workflow
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.
November 20 Step by Step Tutorial.Creating workflows with Windows Sharepoint Services and MOSS 2007 (part 14/20).Easy ASPX Association Forms-(my small generic framework)
Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007 (part 14/20). Easy ASPX Association Forms-(by using my small generic framework)
By Serge LucaMVP
Introduction There are many reasons to associate workflows with aspx forms in Sharepoint instead of Infopath forms (IP):
The black sides of aspx forms in Sharepoint workflows are :
The first kind of form you need to create is the association form; I’ve encapsulated and abstracted the complexity of association forms in a small framework; this framework will be upgraded in the future to handle other kind of forms and will be available in CodePlex. There will be 3 parts in this post :
Part 1. Creating a basic association form Creating the workflow
[Fig 1. Basic workflow project]
[Fig 2. Don’t automatically associate the workflow]
[Fig 3.Add a reference to my small framework]
[Fig 4.Create the “12 like” folders for the Layout page (association form)] Add a FEATURES folder with a DemoAssocFormWorkflow custom folder under the TEMPLATE folder and move the feature.xml and workflow.xml over there : [Fig 5.Add the Features folder and the features files]
[ Fig 6.Generic Page class]
[Fig 7.Implementing the Abstract class]
[Fig 8.Basic generic page implementation]
[Update 11/24 : in the next release the Function FromAssocDataToPage will only have an AssocFormData parameter]
Fig 9.Modify the @Assembly directive to point to your code behind assembly
[Fig 10. Defining the association forms in the feature manifest] That’s it! Now it’s just a matter of installing the workflow, the page layout and the Framework assembly. Installing the workflow Add the install.bat file into the project root; double check the file to make sure everything is ok (in the Install.bat file we assume the application pool name is SharepointPool), change the url (which here is http://blog.redwood.com) ; add a Post-Build event to the project : [Fig 10.Install.bat file in the Post-build event]
The final code can be found here. Association forms testing
Normally the install.bat file activates the feature for the whole site collection. We are going to test the 3 kinds of workflow associations Association type 1 : workflow associated with a list
Since an association form has been provided, the next button will show up : [Fig 11. Standard workflow association form]
[Fig 12. Custom workflow association form]
[Fig 13.Modification of a workflow association]
[Fig 14.New Task and History lists ] Association type 2 : workflow associated with a content type
[Fig 15.Associate a workflow with a content type]
Association type 3 : Workflow associated with a content type in a specific list
[Fig 16.Workflow associated with a content type in a specific list] This association will be available on every Vehicule in this list, but not on the cars ! Part 2. Extending the association form We want to be able to create the following association form (Fig 17) : [Fig 17.The final association form]
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="/_controltemplates/InputFormSection.ascx" %>
[Fig 18. specifying the AssocFormData class in the generic]
Part 3.Inside Association Forms
[Fig 19.Generic workflow association page (AddWrkfl.aspx)]
[Fig 20.Query string generated by the association to a Content type]
[Fig 21.Query string generated by the association to a list]
[Fig 22.variables generated in the context of the association of a workflow with a content type] [Fig 23. variables generated in the context of the association of a workflow with a list or with a content type in a specific list]
public static SPWorkflowAssociation CreateListAssociation ( public static SPWorkflowAssociation CreateSiteContentTypeAssociation ( public static SPWorkflowAssociation CreateListContentTypeAssociation ( ) The SPWorkflowTemplate is actually a wrapper around the workflow type.
[Fig 24.Hidden field to keep workflow association variables between postbacks] My WorkflowAssociation class hides all the details of getting/storing these variables values and creating/updating the corresponding Sharepoint objects.
That’s it! Congratulations! Don’t forget that I still have to fully test this code and that I will upgrade the framework to take the other kinds of forms into account.
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.
November 02 PDC2008: Workflow Foundation 4
By Serge LucaMVP
1.New version of WF: WF4 The Workflow Foundation team has recreated WF ; they started from the ground up ! What’s new in WF4 ?
2.WCF – WF Integration
3.Our workflows can run in the cloud The Windows cloud based operating system has been renamed "Windows Azure", and yes David Cutler, the hero of VMS and NT, is one of the main architect) . That is Workflow Services, a subsystem of the new .Net services wich provides an workflow off premises host. The benefits of this off premises host are :
We can access and manage our workflows from anywhere
You can run the following existing WF 3/3.5 Out of the Box activities in Workflow Services
(WF 4.0 supported in the future but not yet) And here are the existing Workflow Services activities :
Deployment and management:
To run on Azure, your workflows must be fully declarative, based on xaml, and this will much easier in the future with WF4; at the moment only some WF3.0/3.5 activities are currently supported and you still have to use Visual Studio 2008 + the .net service sdk.
If you want to run your workflow on premises you can use your own workflow host or you can use a new one : Dublin.
Dublin is not the host for Windows Workflow services but the Dublin team and the Workflow Service team are mutually influencing each other and work under the same leadership. 4.New language family: M 5.Oslo : focused on Modeling (creation & storing) -an Oslo model can be defined by using a new DSL based on the M language: MSchema. 6.Office 14/Sharepointx will be based on WF 3.5 Ok will be able to create real WF services in Sharepoint ( and make use of the famous Receive activity), but acording to Kenny Wowl Sharepoint/office 14 will first ship with WF 3.5 (it is currently based on WF 3.0) and will will have an upgrade to WF 4 later ; for more details, listen to what Kenny Wolf says here : PDC TL17 session after 37’45’’, and here PDC TL06 session after 68’48’’ ).
There are indeed a bunch of new Sharepoint activities in this pictures. I’ve verified this by analyzing some assemblies provided with Visual Studio 2010 September CTP (alpha code); Reflector showed me the following Sharepoint activities in System.WorkflowModel.Activities.dll [in the namespace System.WorkflowModel.Activities namespace:]
These activities are classes derived from System.WorkflowModel.Activity which is derived from WorkflowElement (also a new kid on the block…, see picture below). WorkflowElement is now in charge of the ActivityExecutionContext (communication with the runtime, including Transaction and identity).
[Fig 11.WorkflowElement, Activity, Sharepoint activities] 7.What do you need to do next ?
|
|
|