Call Web Services From Workflows on SharePoint Online

The increasing adoption of Office 365 is driving a lot of traditional development on the SharePoint platform online. As you might expect there are some big differences between on-premise and cloud and the ways in which you achieve customisation and implementation of features.

Traditionally timer jobs played a large part in the way background services could be implemented in SharePoint. You will find that timer jobs are absent in SharePoint Online and that the alternative is to leverage the workflow capabilities of SharePoint to achieve the same sort of outcome.

A fairly typical scenario for timed jobs is to poll external services for some form of information to be cached locally on SharePoint. The good news is that the standard Call HTTP Web Service Action of SharePoint 2013 workflows execute the same in Office 365 as they do on-premise.

There is a blog post and demo on MSDN that you can use to test this out for yourself.

Gotcha: and a fairly big (and unobvious) one: this workflow Action can only handle calls to webservices that return responses of type text/html, text/plain and application/json. You will find you are unable to accept and process text/xml responses and the Action will only pipe the response from a webservice call to a Dictionary object so you can’t even do any string manipulation foo on the result if it’s not one of the three response types accepted!

Hope this post saves you some time!

Tagged , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: