We discuss SharePoint 2013 Workflow in depth from Developer Point of view first then we talk about in Details new Architecture of SharePoint Workflow. thanks to All Community Members for Participating Especially MVP venkatanarasimha.kl and MCTs (Fahad khan and Wasi) for Sharing their Knowledge with us. 2nd Part of Workflow Session will be online in upcoming week. also we share some great learning resources free channel downloaded videos and learning content on sky drive and give one Pluralsight training Vouchers. hope we will keep motivating UAE community for more SharePointing.
SharePoint 2013 Workflow for Developer - Dev Saturday & UAE SharePoint (MSTC)
Sunday, September 22, 2013
Posted by Usama Wahab Khan at 3:00 AM 0 comments
Labels: Dev Saturday UAE, SharePoint 2013, Usama wahab khana, Workflow
Start workflow SharePoint 2013 programmatically
Friday, July 5, 2013
Javascript :)
// ---------- Start workflow ---------- function StartWorkflow() { var errorMessage = "An error occured when starting the workflow."; var subscriptionId = "", itemId = "", redirectUrl = ""; var urlParams = GetUrlParams(); if (urlParams) { //itemGuid = urlParams["ItemGuid"]; itemId = urlParams["ID"]; redirectUrl = urlParams["Source"]; subscriptionId = urlParams["TemplateID"]; } if (subscriptionId == null || subscriptionId == "") { // Cannot load the workflow subscription without a subscriptionId, so workflow cannot be started. alert(errorMessage + " Could not find the workflow subscription id."); RedirFromInitForm(redirectUrl); } else { // Set workflow in-arguments/initiation parameters var wfParams = new Object(); // get reviewer loginname var html = $("#ctl00_PlaceHolderMain_docReviewerUser_upLevelDiv"); wfParams['DocReviewerLoginName'] = $("#divEntityData", html).attr("key"); // get editor loginname var html = $("#ctl00_PlaceHolderMain_docEditorUser_upLevelDiv"); wfParams['DocEditorLoginName'] = $("#divEntityData", html).attr("key"); // Get workflow subscription and then start the workflow var context = SP.ClientContext.get_current(); var wfManager = SP.WorkflowServices.WorkflowServicesManager.newObject(context, context.get_web()); var wfDeployService = wfManager.getWorkflowDeploymentService(); var subscriptionService = wfManager.getWorkflowSubscriptionService(); context.load(subscriptionService); context.executeQueryAsync( function (sender, args) { // Success var subscription = null; // Load the workflow subscription if (subscriptionId) subscription = subscriptionService.getSubscription(subscriptionId); if (subscription) { if (itemId != null && itemId != "") { // Start list workflow wfManager.getWorkflowInstanceService().startWorkflowOnListItem(subscription, itemId, wfParams); } else { // Start site workflow wfManager.getWorkflowInstanceService().startWorkflow(subscription, wfParams); } context.executeQueryAsync( function (sender, args) { // Success RedirFromInitForm(redirectUrl); }, function (sender, args) { // Error alert(errorMessage + " " + args.get_message()); RedirFromInitForm(redirectUrl); } ) } else { // Failed to load the workflow subscription, so workflow cannot be started. alert(errorMessage + " Could not load the workflow subscription."); RedirFromInitForm(redirectUrl); } }, function (sender, args) { // Error alert(errorMessage + " " + args.get_message()); RedirFromInitForm(redirectUrl); } ) } } // ---------- Redirect from page ---------- function RedirFromInitForm(redirectUrl) { window.location = redirectUrl; } // ---------- Returns an associative array (object) of URL params ---------- function GetUrlParams() { var urlParams = null; if (urlParams == null) { urlParams = {}; var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { urlParams[key] = decodeURIComponent(value); }); } return urlParams; }
C#
var WSM = new WorkflowServicesManager(web); var wfSubscriptionService = WSM .GetWorkflowSubscriptionService(); //get all workflows associated with the list var subscriptions = wfSubscriptionService .EnumerateSubscriptionsByList(listId); //run all workflows associated with the list foreach (var workflowSubscription in subscriptions) { //initiation parameters var inputParameters = new DictionaryReference :(); inputParameters.Add("WFProperty", "Value"); WSM .GetWorkflowInstanceService().StartWorkflowOnListItem(workflowSubscription, itemId, inputParameters); }
http://code.msdn.microsoft.com/office/SharePoint-2013-Approval-f5ac5eb2
Posted by Usama Wahab Khan at 5:15 AM 1 comments
Labels: SharePoint 2013, sharepoint workflow, Workflow
Create SharePoint 2013 Workflow Loop By Using SharePoint 2013 designer Preview
Sunday, October 7, 2012
One the Major Enhancements in SharePoint 2013 Workflows is availability of "Loop"s is in SharePoint Actions. now loop are fully integrated in workflow actions. there is two type of loops. "Loop n Times" and Loop with conditions. this new feature is available with SharePoint 2013 Workflows You can create directly loop based workflow by using SharePoint designer 2013 preview with different actions. here i am showing one basic example how you can create loop in workflows by using SharePoint 2013.
before start this
Set up and configure SharePoint 2013 Workflow Manager
- Installing and configuring workflow for SharePoint Server 2013
-
Open SPD2013 Preview Click on List & libraries>Select any existing list or Create new List.
Click on List Workflow button in ribbon. It will open one Popup.Fill Workflow Name and description and Select SharePoint 2013 Workflow form dropdown. if in caseyou only see the SharePoint 2010 Workflow kindly check. did you Install and configure workflow in SharePoint Server 2013. because SharePoint 2013 Workflow is based on Azure workflows.In side the Ribbon you will see one yellow to Add loop to your workflow.here i am create Initiation form Parameters for Loop Count.set the by default ValueClick on Yellow spot in ribbon and select loop n timers. set parameters.Set send email Action in side the loop.Add Email Address that mail to be send.create message for email.Click Loop Yellow button in Ribbon. and select loop n ConditionCreate another Initiation form Parameters.Set Parameter and with loop values and set condition equal to not equal and hard code 10 value for comparisonSave and PublishAssess your Site from Browser and navigate to that list create one Item andclick on workflowdouble Click on your created worflow.fill Parameters in Initiation form and Click on Start ButtonGo back and list Workflow setting pageGo to SharePoint Workflow History. you will see updates that done in loop.check you Main Box for emails.By Usama Wahab Khanthank you
Posted by Usama Wahab Khan at 1:13 AM 0 comments
Labels: SharePoint 2013, SharePoint designer, Workflow
Enhancements in SharePoint 2013 Workflows.
Saturday, October 6, 2012
I was Deep Diving in SharePoint 2013 Workflow. Find So many new things in SP2013 like new architect. this time workflow is not running in side the SharePoint. its working with azure workflow. new important Enhancements which area really great.
- finally Loop is fully integrated actions.
- new Feature called "Workflow Stages" for SPD Preview 2013 no need to create state Machine workflow .
- new Actions like "Start a Task Process","Assign a task" .
- "Call Web Service" Action use data from web-service in workflow.
- new Variables types like "Dictionary Type Variables" for an array.
- absence of Design View in SharePoint 2013.
- Visual Studio 2012 workflow project type support;
- Support for creating custom actions.
- Based On Windows Workflow 4.0.
New Actions in SP2013 WorkflowAction Description Assign a Task Assigns a single workflow task to a user or group. Start a Task Process Initiates execution of a task process. Go to This Stage Specifies the next stage in a workflow to which flow control should be handed. Call HTTP Web Service Functions as a method call to a Representational State Transfer (REST) endpoint. Start a List Workflow Starts a list-scoped workflow. Start a Site Workflow Starts a site-scoped workflow. Build DynamicValue Creates a new variable of type DynamicValue. Get Property from DynamicValue Retrieves a property value from a specified variable of type DynamicValue. Count Items in DynamicValue Returns the number of rows in a variable of type DynamicValue. Trim String Removes all leading and trailing white-space characters from the current string. Find Substring in String Returns 1-based index of the first occurrence of one or more characters, or the first occurrence of a string, within a string. Replace Substring in String Returns a new string in which all occurrences of a specified character or string are replaced with another specified character or string. Translate Document Functions as a wrapper around the HTTP activity that calls the synchronous translation API. You must configure a Machine Translation Service Application for the SharePoint site on which you run the workflow. Set Workflow Status Updates workflow status as specified in message string. Create a Project from Current Item [Microsoft Project] Creates a Project Server project based on the current item. Set the current project stage status to this value [Microsoft Project] Sets the two status fields within the current stage of the project. Set the status field in the idea list item to this value [Microsoft Project] Updates the status field of the original SharePoint list item. Wait for Project Event [Microsoft Project] Pauses the current instance of the workflow to await a specified Project event: Project checked in, Project committed, Project submitted. Set this field in the project to this value [Microsoft Project] Sets the value for th
but i am really enjoy allot. with these new tools. on every step its feel like when you get new toy in my childhood.
Posted by Usama Wahab Khan at 5:08 PM 0 comments
Labels: Share Point, SharePoint 2013, Workflow
Create Nintex Workflow With SharePoint2013 Publish your Artcile Link on your Facebook Wall
Monday, October 1, 2012
Nintex Workflow was really famous in moss 2007 and SharePoint 2010. In SharePoint 2013 with New App Model Nintex Workflow. you can add Nintex Workflow App to your Site Collection.
Click on Add an App form Top Menu
Posted by Usama Wahab Khan at 3:53 AM 0 comments
Labels: Nintex Workflow, SharePoint 2013, Workflow





















































