SharePoint 2019 On-Premise Workflows

0

Microsoft has still positioned SharePoint 2019 On-premises environment for custom solutions and applications that can be migrated over from business.

Majorly there are three different workflows supported in SharePoint 2019:

  1. Microsoft Flow: Microsoft Flow is a new cloud-based workflow platform. It has two limitations:
    – Each related user must have a PowerApps Plan 1 license which is not part of the SharePoint Server license.
    – Microsoft Flow is currently optimized for non-interactive workflows.
  2. SharePoint 2013 Workflow: This platform is the recommended workflow platform where Microsoft Workflow Manager is used to integrate workflows into SharePoint Designer.
  3. SharePoint 2010 Workflow: This platform is supported for backward compatibility, it has a limitation custom action cannot be migrated over.

On the bright side, SharePoint supports Microsoft Workflow Manager, which is based on Windows Workflow Foundation.

We can Develop Custom workflows using these Visual Studio tools 

  • Visual Studio: Visual Studio is used to develop Sequential & Parallel workflows with custom actions and tasks that can interact with any custom application.

The end-user interacts with workflows via modern web browsers like Edge, Firefox, or Chrome.

Building SharePoint Workflow Services using Client-Side Object Model, Microsoft has introduced an entirely new workflow architecture and platform that reflect fundamental shifts in the product direction.

The most prominent change in the new architecture is that workflow execution in SharePoint no longer takes place in SharePoint. Instead new execution engine: Workflow Manager 1.0.

Workflow Manager hosts the Windows Workflow Foundation runtime and all the necessary services required by Windows Workflow Foundation. When a workflow is published, or a new instance of a published workflow is started, SharePoint notifies Workflow Manager, which in turn processes the workflow episodes. When the workflow access information in SharePoint, such as list item properties or user properties, it authenticates using the OAuth support and communicates over new and improved REST APIs.

Using Visual Studio 2017 we can develop Workflow projects and add our Activities, Custom Activities, and deploy on SharePoint 2019 as a feature. 

Figure 3. Workflow authoring interface
  1. Project Explorer where you can view the project structure and files
  2. Activity Toolbox to add-in tools and custom activities
  3. Activity Designer allows to drag & drop from toolbox where the business logic flow is drawn
  4. Activity Properties to view the in/Out parameters
  5. Variable Toolbox allows you to define variables for the workflow activity

Example project module that can be easy to start up your custom workflow on SharePoint 2019

Reference & add references to core SharePoint CSOM libraries:

· Microsoft.SharePoint.Client.dll
· Microsoft.SharePoint.Client.Runtime.dll
· Microsoft.SharePoint.Client.WorkflowServices.dll
You can utilize the power of CAML query inside custom activity
CamlQuery camlQuery = new CamlQuery();

Copy CustomActivity.dll from the release folder and paste it into the following two locations.

Edit the AllowedTypes.xml file into the above two locations.

  • Open a command prompt to restart the “Workflow Manager Backend” service.
  •  Type net stop “Workflow Manager Backend” and Type net start “Workflow Manager Backend”   
  • Compile and deploy the “WorkflowActivity” Feature from visual studio 2017

That’s all…. You have done the custom code activity workflow in SharePoint 2019. 

Prashanth Hamse Vishwanath

About

Prashanth is a Senior Architect in Microsoft technology with over 14 years of professional vast experience in SharePoint (Office 365, SP Online, SP 2013) the software industry.

More on Prashanth Hamse Vishwanath.

Related Posts

Your email address will not be published. Required fields are marked *

7 + 8 =