Sunday, June 1, 2014

Workflow Tasks Emails Disabling

Hello!
Assigning a task you may want to disable email sending to determine your own emails like in this thread. But what will you see at the task activity properties?



Friday, May 30, 2014

Code Activities Exceptions at Workflow Publishing

I encountered a problem when your old workflows, that already have been working, was caused exceptions on publishing. For example, this forum discussion. You may spent many hours to make them work again. Let's dive!

Friday, May 23, 2014

Cross-stage workflows for beginners. Part II. WorkflowDesigner in Visual Studio

Hi everyone!
As I wrote in previous part, we are studying to program cross-stage workflows. Today we'll look at how it implements by more powerful instrument - Visual Studio 2012.

Wednesday, March 12, 2014

Cross-stage workflows for beginners. Part I. SharePoint Designer


Hello!
One of the most important things in SharePoint 2013 is cross-stage workflows. SharePoint 2010 has "sequential" chain-like workflows with plain passage in flow. Sequential workflows pass through the flow from start point to end point with executing a defined set of activities. This is restricting your vision of any workflow in your organization. Let me show you how you can implement workflow with a complex business logic.

Tuesday, January 14, 2014

Code Activity Assembly Cache Updating

How to develop code activities for the Workflow Manager you can for example read here.
When you have developed the second version of your activity you need to update activity DLL cache. Otherwise, the old version will execute in your workflow. Let's see how to do it.

Tuesday, October 22, 2013

Build Collections for Composite Task


For a Composite Task you need to define executors and set AssignedTo field. This field has a specific type InArgument<Collection<string>>. So you need to build a collection of strings and specify it to Composite Task activity. Let's take a look.


Tuesday, August 6, 2013

Start SharePoint 2013 Workflow Programmatically

If you want to start workflow from server-side code, you need to use Microsoft.SharePoint.WorkflowServicesBase DLL.
If you don't see it in reference search, you can find it in GAC — C:\Windows\Assembly — with standard windows explorer search (of course if you have installed Workflow Manager).
And then to start a workflow:

 protected void StartWorkflow(SPWeb web, Guid workflowID, int itemID)  
 {  
   var wfsrvmng = new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager(web);  
   var wfsubsrv = wfsrvmng.GetWorkflowSubscriptionService();  
   var wfsub = wfsubsrv.GetSubscription(workflowID);  
   var wfi = wfsrvmng.GetWorkflowInstanceService();  
   wfi.StartWorkflowOnListItem(wfsub, itemID, new Dictionary<string, object>());  
 }  

where workflowID you can find in the workflow Elements.xml

 <Property Name="WSGUID" Value="..." />