Wednesday, April 19, 2017

Office UI Fabric for SharePoint and O365

Microsoft Introduce the new official UI framework for SharePoint and Office 365 Development called "Office UI Fabric"

Saturday, April 15, 2017

SharePoint 2013 Workflow Troubleshooting

Features of SharePoint 2013 workflows Troubleshooting.

SharePoint 2013 workflows are powered by Windows Workflow Foundation V4. Its built on the WCF Messaging functionality.

Now SharePoint workflow transform itself from process to platform.

Means WCF can communicate within machine and network level using TCP/IP and capable of communicating outside of your network using Web service call using http/https.

Windows Workflow Foundation 4 workflows are a structured collection of workflow "activities" that creates the relationship to SharePoint as "action".

To start the workflow development activities, you need to install the Workflow Manager.
This will be installed on out of your SharePoint Server. This is the new feature introduced in SharePoint for isolating the workflow process and Scaling the Workflow services for SharePoint.

You can also use the SharePoint 2010 workflow activities for backward compatibility purpose only. If you are creating the new workflow from the scratch then you should choose the "SharePoint 2013 as platform type".

To install and Configure the workflow for  SharePoint, please follow up this link

I managed to install and configure it, but still I am not able to see the "SharePoint 2013 workflow" on the platform type in SharePoint Designer. It shows the below error.

"The Option for the SharePoint 2013 workflow platform is not available because
the workflow service is not configured on the server.
Please contact your server administrator."

First you need to ensure the "Workflow Service application proxy" has been associated with your Web Application in central administration page as shown in this image.

To resolve this problem,you need to register the workflow service to your site.

Register-SPWorkflowService -SPSite 'http://win-236tjq4buqi' -WorkflowHostUri 'https://localhost:12290/'

After this command , I have received the error "The root of the certificate chain is not a trusted root authority"

To resolve this problem, you need install the SSL certificates on the server where Workflow Manager installed and also your SharePoint Server configured to use the SSL.
Please see this MSDN link that helps your how to install the workflow Manager Certificates on the SharePoint 2013

Another troubleshoot , An error says " The underlying connection was closed:An unexpected error occurred on a received with Client Activity Id.

Resolution for this, You have to use the WorkhostUri URL without HTTPS

Finally, I am managed to install and configure the "Workflow Manager" on my server and set to go for exploring the SharePoint 2013 Workflow Development.

For best practices, you should not install the Workflow Manager on the server where the server elevated to AD and SharePoint installed machine.

For development purpose, you can use the workflow without SSL and ignore the above best practices.

After this, I was trying to create the simple workflow that logs the message the workflow history, My workflow started and few minutes it cancelled its self  automatically.

Upon digging the reason for this cancel problem further through fiddler, the workflow attached to the list failing with HTTP 401- Unauthorized despite I am logging in as Administrator and configured the Workflow Manager with the administrator account.

Workflow need to have read and write permission on . To elevate this permission to workflow, you need to activate the site feature called "Workflows can use app permissions"

Sunday, April 09, 2017

SharePoint Framework (SPFx-) Development steps

This is continuation of my previous post, "SharePoint Framework (SPFx) - Development setup".

Once you set up all the required installation to start the development activities,
You will see the folder structure in your folder. Here in my case, I have ran it on administrator folder in the C drive.

Now you need to run this web part template created by yeoman, Technically you need to package it and push to SharePoint ,
Gulp is the main component and it will packaged with all certificates to run on the browser.

Type the below command in PowerShell command

gulp trust-dev-cert

It will install the certificate on your local machine, trust it when prompting on windows alert box.

gulp development certificate installation

Now you are ready to run the SharePoint Client WebPart into SharePoint Workbench.
To do this,
type the command :   gulp serve

It will start the browser with localhost server

SharePoint Framework (SPFx) - Development setup

Its been a great journey to creating the JSOM , REST API with combination jQuery  call in the SharePoint and Office 365 developmentt activities [Provider Hosted App and SharePoint hosted Apps] , Now Its really the time to look into embrace latest SharePoint development framework "SharePoint Framework (SPFx).

SPFx based on purely client context based without any server control usage on the SharePoint.
All the controls you will developing using the html5,JS,CSS and other Javascript based UI extensions like NodeJs,yeoman,gulp ,npm and webpack.

Yeoman is a client side solution generator for SharePoint package.

In next post, I am going to write all the tool chain technologies and how the SPFx differs from its predecessors paradigm.

Just keep in mind , SPFx is all about enhancing the user interface (UI) and user experience with modern web development technologies such as (TypeScript,Yeoman,Gulp,NodeJs,npm and webpack).

Ready to dive or dirty your hand in these technologies you often requires the solid play ground, I mean your own development environment with equipped all installation.

Here is the steps to follow.

Install the NodeJS - Download from here : [Go with default settings, including PATH]

Install the Visual Studio Code (VS Code - Lightweight editor to implement the tool chain based application for all platform including Linux and iOS).

Post installation of the NodeJS and Visual Studio Code

Open your windows powershell and type the npm - v

ensure you installed the version 3.10.10 or greater.

Now type the following command in powershell to install the yeoman gulp

Step 1,

npm install -g yo gulp

after completion of the above command, you will be see it like

Installing the Yeoman gulp for SPFx development setup

Step 2,

You need to installl the microsoft SharePoint related package . Type the below command 

npm -install -g @microsoft/generator-sharepoint

This will install all packages those are required for SharePoint Client Webpart creation.

Step 3,

Create your webpart by creating template

Type yo @microsoft/sharepoint

Here is the output window of mine,

SharePoint Client WebPart - Yeoman template

Now you are ready to play around your webpart. This will create the directory structure for all source code, and you can start your journey.

Here is my successful  webpart creation