Monday, November 29, 2010

t is not a bug, it is by design that state machine workflow does not support the replicator activity.

http://www.sharepointdev.net/sharepoint--workflow/state-machine-replicator-activity-41998.shtml

Tuesday, November 16, 2010

Dynamic Task using CAG and Replicator Sample

http://www.mannsoftware.com/workflow/Wiki%20Pages/Dynamic%20Tasks%20Using%20a%20Replicator.aspx

Failed to load the custom Activity from toolbox in workflow

Ok, found the culprit - this happens if the library is in GAC. Once you remove the error doesn't happen anymore. On top of that the same error also happens in VS 2008 SP1.


This is not a good workaround though, as when deploying to Sharepoint the library gets installed into GAC and we're back to the same problem.

Thursday, November 4, 2010

Deploy-an-ASP-NET-Form-to-a-workflow

http://dotnetslackers.com/articles/aspnet/Deploy-an-ASP-NET-Form-to-a-workflow.aspx

Initiation Form Processing

Initiation Form Processing


--------------------------------------------------------------------------------



When a user starts a workflow on a specific item, SharePoint Foundation examines the InstantiationURL attribute of the Workflow element, in the workflow template definition, to determine the proper form to load.



SharePoint Foundation loads the specified form, passing to it the following query parameters in the URL:



List The GUID of the list to which the item belongs.



ID The ID of the list item on which the workflow is started.



Source The page from which the user started the workflow.



TemplateID The GUID of the workflow association.



In addition, you can program your form to load the association form data for this workflow association. This information is contained in the AssociationData property of the SPWorkflowAssociation object that represents the workflow association.



The workflow developer must program what happens when the user submits changes to the page. In general, the form must perform the following actions:



Locate the SPWorkflowManager object for the current site.



Use the SPWorkflowManager object to invoke the StartWorkflow method, passing the appropriate SPListItem and SPWorkflowAssociation objects. Use the eventData parameter to pass the initiation form data in string format.



Return the user to the source page from which he or she started the workflow.



When the M:Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflow(Microsoft.SharePoint.SPListItem,Microsoft.SharePoint.Workflow.SPWorkflowAssociation,System.String) method is called, the workflow manager creates an instance of the workflow on the SharePoint item. The workflow manager then passes the data gathered using the initiation form to the OnWorkflowActivated event of the workflow itself.



Any SharePoint Foundation workflow must start with an OnWorkflowActivated activity. The OnWorkflowActivated activity contains a property, WorkflowProperties, that returns an SPWorkflowActivationProperties object. This object represents the initial properties of the workflow as it starts, such as the user who added the workflow and the list and item to which the workflow was added. In addition, the AssociationData property returns a System.Collections.Hashtable object that represents the custom data provided by the workflow initiation form.

Managed Metadata service application and leverage the metadata within a SharePoint list

configure the Managed Metadata service application and leverage the metadata within a SharePoint list.


1. Managed Metadata service applications, as with all service applications, are configured at the farm level. First make sure the Metadata Web Service is running by going to SharePoint 2010 Central Administration » System Settings » Manage Services on Server (under Services). If the status is Not Started, click Start to the right of the Managed Metadata Web Service.

2. From Central Administration, select Application Management » Manage Service Applications (under Service Applications).

3. Select the Managed Metadata Service application that has the type Managed Metadata Service and from the ribbon, select Manage.

4. Before doing any management, you need to add yourself as a term store administrator. Enter administrator in the Term Store Administrators field, validate the name by clicking the person icon and click Save.
5. 1. Now create a new column for this list using the Create column link below the Columns section of the List Settings page. Use the following information to complete the new column form, leaving all other fields as their default values:


a. Name: Home Town

b. Type of information in this column is: Managed Metadata

c. Display the entire path to the term in the field

d. Use a managed term set and pick Managed Metadata Service » Locations » North America.

Done...you are all set to use the Managed Metadata;)