Grasping WorkflowGrasping WorkflowThoughts on workflows, tips and solutions related to windows workflow foundation and sharepoint portal server 2007 Articles
Updating an Item from a workflow monitoring the OnItemChanged event.
2007-04-26 19:03:00 Scenario: Workflow is waiting on the OnItem Changed event of a SP list. We need to update the same item from the workflow.Solution:Do not use the Update method of SPList Item. This will surely make the workflow go into recursion.Instead add a CallExternalMethod Activity.Select the interface type as IListItemServiceMethod : UpdateListItemBind the following properties:1. ListId : Bind to the workflowproperties.ListID2. ItemId : Bind to the workflowproperties.ItemID3. Id. : To a new GUID4. itemProperties: This is an important property. This property holds the ColumnName,Value pair that needs to be updated.Once you bind the itemProperties to a field, you can add columns and the their values like any other ArrayList/Dictionary.Once this activity executes the list item gets updated.NOTE: This solution does sometime make the workflow go into recursion. But this recursive behaviour is not consistent. More About: Event , Ring
Capturing onItemChanged event in Workflow
2007-04-11 20:56:00 To catch the onItem Changed event of any Sharepoint list in a workflow, the following needs to be done:Add a CallExternalMethod Activity, set the interface to Microsoft.SharePoint.Workflow .IList ItemSe rviceSet the method name to InitializeForEvent sBind the ItemId, ListId to ItemID and ListId in the workflow properties.Add a HandleExternalEvent activity and specify the following properties:InterfaceType to Microsoft.SharePoint.Workflow.IListItemSe rviceEvent Name : OnItemChangedNOTE: The correlationToken should be the same as the correlation token specified for CallExternalMethod activity.Method Name. This method will be called whenever there is a change in the list item.This will capture the onItemChanged event. More About: Ring
Alernate URL Mapping and Custom ASPX Pages
2007-04-11 08:27:00 Assume you have mapped a URL to a Sharepoint Site and are accessing the site from the extranet. This sharepoint site gets accessed locally from a port other than 80.If you develop a custom aspx page then you would generally put the page in the _layouts folder and the dll in the Bin folder of the Site:port Virtual directory.The page would work fine if the user accesses the site from the Intranet using the local url i.e http://site:portBut try accessing the page using the mapped URL. It wont work.What I had to do was to put the Dll of custom page in the Bin directory of site at port 80. This got the page working. More About: Pages , Ping , Custom , Mapping , Nate
Debugging Windows Workflows
2007-02-21 18:31:00 Debugging a Work flow:1. Set the Visual Studio Workflow Project to Debug Mode2. Go to Project Properties. Set the “Start Browser with URL” in the Debug tab to the URL of the site where the feature is installed.3. Build the project.4. Install the feature.5. Associate the workflow with any list6. Initiate the workflow. (If not already done once before)7. In VS 2005, click on “Attach to Process”, click on Select and select “Workflow code”.8. Select w3wp.exe where Type column displays “Workflow”.9. Add a breakpoint where desired.10. Initiate the workflow. More About: Windows , Wind , Indo |



