This blog serves to provide some insight on the session that I will be speaking on at the SharePoint Evolutions Conference that commences on April 15th 2013
What is the SharePoint Evolution Conference
For that, Ill give you two two point of references. (1) is my blog post on the fact that I have been invited to speak there, you may find it here and (2) is the link to the conference web site here. I will tell you this however right here, I have been told that if you attend any conference, this one should be at the top of your list. This is my first time, and i have goose pimples already :-)
I will be in the Global Community Rutherford Room and my session is at 4:00pm - 5:00pm Local time on Monday, 15 April, 2013 (yes i went with the UK way of Calendar Dates lol)
What is my session about
I have been invited to speak on the new Community Track at the SharePoint Evolution Conference. The conference states "…One of the great things about Community sessions is that they always bring a new perspective on challenges and methods that companies have had to adopt in order to make SharePoint work for them. Real world, thought provoking and not always the obvious solution to a problem."
What you will see in this session is sanitized with a fictitious entity, however the essence of the work remains. process flow and all i.e. the integrity of the logic remains intact.
Business Process Reengineering
In a nutshell that is what my session about, but more specifically its Business Process Reengineering what was a manual paper process with the single communication vehicle being Email to a process where we have a totally push driven automated approach to the process. We will look at the Visio Charts that define the Requirements Analysis and how that 'evolved' over time. We will peek briefly inside the tooling that created these various solutions, we will NOT delve into code, this is not that kind of session, but Id be happy to do one like it, infact I have blogged some of those solutions bit by bit already, just not as one cohesive story. We will fire off the Workflow to see how it works for the pertinent bits and discuss the benefits that are provided in differing solutions. Finally I will show you what I have done in my spare time taking the same logic and redoing some of the efforts inside my Development Office 365 SharePoint Online and the amazing results in that exercise… yeah, it works! Using Workflow Stages in SharePoint Designer 2013 for 'State Machine' transitions and the new Looping capabilities therein as well, it wasn't that hard…
Here is my Agenda
The entire project, well, the project is still ongoing but it started in November 2012 and we are currently in Testing.
Iteration 1 – Explore OOB Solutions to accomplish the goals
Iteration 2 – Custom Code a Solution using Visual Studio 2010 on SharePoint 2010 On Prem
Iteration 3 – Use K2 Studio as a solution on SharePoint 2010 On Prem
My Vision – Use SharePoint Online Office 365 (SharePoint 2013) and SharePoint Designer 2013 'only'
So, on Monday 15 April 2013 for the Last Session of the day, come see this session, I know Im up against some big name too, so this is/was my pitch :-)
I hope to see you there
I struggled with the title for this blog; dare i say, after spending almost two days trying to make SharePoint Designer 2013 and Visual Studio 2012 Workflow return data from a few notable providers [YouTube, Twitter, iTunes] using the Dynamic Value / Dictionary Data Type in JSON format, and not being able to as documented, i was frustrated to say the least. I would have been Ok, if it wasnt for the fact that the same exact Logic/Process works for other providers such as [FreeWeatherOnline, etc] returning data in JSON format, the key difference being the structure of the JSON data being returned.
This is for a few SharePoint Community Events that I have been scheduled to present this material. So after beating my head against the wall, sending out S.O.S tweets, and pinging a few folks that are versed on the topic, I ended up doing my Demos with the REST API provider that returns the JSON data in the way that works OOB and documented in both SharePoint Designer 2013 (SPD2013) and Visual Studio 2012 (VS2012). Nevertheless, this was going to haunt me if i cant get it to work, so i went back at it and with the help of Bart @bart_tubalinal Tubalinal who is the self professed and "fabian validated" Pound for Pound Undisputed Developer in the World, we proved out that if you altered the return JSON data from the providers that didn't work as expected, and then make a call from SPD2013 and VS2012 using the DynamicType / Dictionary variable, it worked as expected.
I will describe the process we used to determine this below…
Below, I will show you three data calls to REST API providers returning in JSON format, showing you both in the browser and in the JSON viewer, I call your attention especially to the JSON viewer and the hierarchy.
Screen clipping: Google YouTube API Above
Screen clipping: FreeWeatherOnline API Above
Screen clipping: Twitter API Above
Screen clipping: YouTube JSON Data Returned Above
Screen clipping: FreeWeatherOnline JSON Data Returned Above
Screen clipping: Twitter JSON Data Returned Above
What we found out is that if you have anything under the Root of the JSON node other than a JSON Array, for example as in the case of a few, the Version Number [returned as a JSON Object], although it works perfectly in a browser, or JSON Viewer, or Fiddler, it doesn't make the right call when using SPD2013 or VS2012. If after modifying the data output and removing anything that is NOT a JSON Array from the Root of the Node, it should work as expected.
The first thing to prove it out is to have SPD2013 or VS2012 make a call to a URI that returns JSON, so that can easily be accomplished via Visual Studio Project to create a new Site, and then drop a file with the removing anything in the root that is not a JSON Array (Collection) and calling that Web Site from inside for example SPD2013 then it should return the requisite data than can be consumed by the Dictionary Object.
To begin, the first thing we need to do is remove the "appVersion: 2.1" JSON object out of the data returned, below is what is looks like without any adjustment
after you remove it, the raw file looks like below
just to verify, ill put it into a JSON Viewer to make sure it is what i want
then drop that raw file into a text document and place it at the root of the newly created Visual Studio Project Web Site
verify that you can get to it from a browser call
Now, below I will show you WITHOUT adjustment how the FreeWeatherService REST API works right off the bat, you will recall above that the only thing at the JSON root node is the JSON Array. So we put it into SharePoint Designer as below
Screen clipping: See the URI and Process Above
Screen clipping: Above you'll notice the return data goes to the Dictionary DataType
So after you publish the Site Workflow and run it on the Site, you get what you expect to see below
Screen clipping: SharePoint Promoted Links List with JSON Data Returned
Showing the YouTube Working with the Mods to the Data Set and Without the Mods
So, below you will see how we make a call to the Virtual ASP Visual Studio Site [look at the URI call line you will see it set to localhost and port number]
Screen clipping: SPD2013 WF with the Modded JSON data call Above
After publishing the Site Workflow to the Promoted Links List we can see the output works as expected.
Screen clipping: Promoted Links List showing the Top 10 YouTube Videos displayed with Modded JSON data Call
Now Showing it NOT working as Expected
Below you will see the same code as in the one that worked, except the URI is set to the Google YouTube REST API and no Mods will be done to this data set.
Screen clipping: Above the same Logic/ Process except this call is made directly to the YouTube REST API
Now pay attention to the logging above, you will see that when the Workflows is published and deployed and ran, that the line for the call fails.
Screen clipping: Above is me executing the Site Workflow
Below you will see the Workflow status showing that the process halted
Screen clipping: The Workflow Status showing it didnt work
So, I originally called this a BUG, but for now it is just an observation. Ill be happy to know from our community folks, MVPs, MCMs, and other folks that come across this blog your thoughts. Sadly, I have turned off comments on my blog, but you can always shoot me a tweet at @fabianwilliams
Other Notables but I wont write it up, you can discern yourself
See me making it work in a Custom Action and also Not working using one REST API result that is in the format I said will work, and the other with it not.
Screen clipping taken: 12/31/2012 3:32 PM
Screen clipping taken: 12/31/2012 3:32 PM
Screen clipping taken: 12/31/2012 3:34 PM
I am very honoured “yes, i get to spell it as i was initially taught :-) “ to have been accepted to speak at the SharePoint Evolution Conference 2013 in London, April 15th through April 17th. I have spoken at quite a few SharePoint Conferences over the past few years, mostly in the United States, some international albeit over Live Meeting, but I have always looked forward to the Evolution Conference.
Why, well I will tell you… In speaking to fellow community members, colleague, fellow speakers, they all emphasize that the European conference attracts a wider and deeper audience and speaker quality. Don't believe me, take a look at the speaker line up this year, and it has been this way year after year. Right off the bat you will see that you have an all star line up of MCMs who are tested and proven, you have Industry Professionals, Members of the SharePoint Product team ‘past and present’ and a slew of respected SharePoint MVPs. In all honesty, I am humbled to share the stage with them, I have always said, “In order to grow, you MUST surround and immersed yourself with people smarter and more talented than you are”, this is not brown-nosing, its just plain honest truth.
On a more jovial note, I have also heard that equally, nobody shows attendees and speakers a better time than the group at Combined Knowledge, year after year, I have heard nothing but great things about that experience and I am happy to be a part of it this upcoming year. How can you beat that: Outstanding Speakers, Riveting Entertainment, Meet all the people face to face you only knew on Twitter, and of course superb content. So, if you have the chance to go, register now, and also follow the conversation using the twitter hashtag #spevo13
I will be delivering a session focusing on SharePoint Workflows, yes, its not a BCS session :-) they have plenty of folks over there *cough* Lightning Tools *cough* that do that well enough already. My session will focus on real world scenarios using State Machine Workflow (SP2010 Environment), it will outline the various approaches taken before that decision and also what to do now that SharePoint 2013 Workflows are here and throws that entire model out the door… i.e. how do you Future Proof it. My session is COM705, Monday April 15th Last Session of the Day at 4pm. Come and check it out.
If we are spared by the Mayan’s this is the conference you want to attend in 2013!
Cheer, and I will see you there.
Introduction/ Question / Hypothesis
So earlier today Marc D. Anderson [http://www.sympmarc.com or @sympmarc] sent out a tweet regarding a SharePoint Designer Workflow not firing and pointed us to a post he added in StackExchange here SharePoint Designer Workflow Not Always Firing so I wont belabor this post with the details, he spells it out quite excellently.
So, a few of us Scott @ciphertxt Hoag, myself, Tasha @tashasev Scott chimed in and offered approaches to solving the problem, notwithstanding the great suggestions, and they were great suggestions, my bias as a SharePoint developer [ignoring that you should seek Out of Box solutions first] commented ad-nausium that it could be handled quite easily with an event receiver, assuming that you were allowed to write code as a solution to the issues faced.
Schooled as I am from the British educational system in the commonwealth, I approach everything through a scientific method. So, my approach was going to be
- Create an Environment adhering to the same boundaries as the test case
- Create an Empty SharePoint Solution in Visual Studio 2010
Create two Projects
- Project 1: A Console App to Prove out the work
- Project 2: The actual event receiver with the (hopefully) working code
- Test, Re-Test, Brag about it J if it works
Creating the Environment
First thing to do was create an environment for the Managed Metadata Service with my own nomenclature but adhering to the test case
Next we create a list to consume the information
Configure the MMS Column to get data from the Term Set under the MarcDAnderson Group
Creating the Visual Studio Solution
Next we have to create a blank SharePoint Solution in Visual Studio. I do this because I don't want any of the extraneous things that come with a predefined project as well as, I plan to have a tester project as well as an Event Receiver Project, its easier and cleaner to control that yourself.
You will notice the Tester Project is set as Startup, we will change that for the Event Receiver time to deploy. So, since we will be working with Managed Metadata Service (MMS) you will need reference not only to the standard SharePoint dlls, but also Microsoft.SharePoint.Taxonomy as well, in both your Console App and the actual Event Receiver.
As this was an empty project, when you click on the project and do "New Item" and select Event Receiver, it will add the Microsoft.SharePoint and Microsoft.SharePoint.Security, but you will have to manually add the .Taxonomy
When you have done that, its time to code out the Tester Console App, which is quite simple, and after I was done I realized I could have just gone straight to the Event Receiver because it wasn't that complicated, in fact, its more lines of code in the tester than there will be in the production deliverable.
Testing out that code yielded the below.
Next I coded out the Event Receiver, since the context of the Item is inside the SPItemEventProperties, no need for a SPSite, SPWeb ect. I just needed an SPListItem object to bind to the Event Properties as in Line 21 and we are off to town. MMS Fields are in value pairs, Label and Guid, so you use the TaxonomyFieldValueCollection to bind to the field holding the MMS value and then split it base on the Pipe [|] character that separates the named values. As you can see on line 27 I have the pair commented out, that is because Marc only needs the Label, as shown in line 28. After that its just setting the Text Columns named "ValueStringFromCategory" with the values from the MMS Field and calling the Update Method.
That's it, now time to Deploy and Test..
Once deployed, you can just add a new item as you see below
Select the MMS field or fields, I did set mine to multi-value, it wasn't called out in the Test Case, but I wanted to be complete.
Click OK, leaving out the third field because that WILL be filled out by the Event Receiver. Click Save when done.
You will notice that the field is blank when you click save, but when you refresh the list, as seen below, the item appears. If you did this in the ItemAdding Event of the Event receiver then you would not need to refresh. But i didnt, so…
So, lessons learned. Marc says that this is ok, but doing a Custom Workflow activity would take this to the next level, so will tackle that on the plane ride to #SPS12
Cheers all.. See you in VEGAS!!
This is a blog post that I looked forward to writing; this post deals with a problem that has plagued SharePoint Workflows when limited to using SharePoint Designer, and a solution is here now in SharePoint 2010 using Sandboxed Solutions. What problem is this you may ask, well it is the means by which you implement a loop structure in your workflow, you may notice that here is no such activity as an available option in SharePoint Designer 2007 or 2010, hmm I wonder will it be in the next version? J Inquiring minds want to know.
You have two SharePoint Lists, data elements in List A are related to data elements in List B. You want to make a change to a singular item in List A and for every related element in List B, you want to effectuate a change as well.
In practical terms lets say that you have a pool of candidates that you plan to hire, those candidates are in List A, they will go through a list of interviews with individuals and teams. You want a workflow such that if (1) During the process, the candidate drops out of consideration [Cancelled], is put on a wait list [Deffered], or "knows someone" so they don't need all those formalities[Approved].. I know im stretching on the last one. But basically you want it, for as many people involved in that process [List B], for it to update the status of that candidate to those (for now) Deffered and Cancelled status.
How would you do it if you were limited to creating the workflow in SharePoint Designer 2010?
Above: List A – The Candidates Table (Before Shot)
Above: List B- The Interview Board Tasks (Before Shot)
Now, there are several post and guidance's out there in the Blog-osphere that speak to solutions that employ using Multiple List and Libraries to act as counters with delay activities to ensure that the timing is maintained between iterating through the items in LIST B when the helper table managing the counter is in a work state; now I have my opinions on those solutions, but notwithstanding that, I fully understand that those solutions in the past were necessary in order to get the job done. Enter today with SharePoint 2010 and Sandboxed Solutions; this affords us the ability to write targeted solutions that are scoped at the Site Collections level and accessible through SharePoint Designer tooling, here is an excerpt of what a Sandboxed Solution is taken from Microsoft's site.
"A sandbox is a restricted execution environment that enables programs to access only certain resources, and that keeps problems that occur in the sandbox from affecting the rest of the server environment. Solutions that you deploy into a sandbox, which are known as sandboxed solutions, cannot use certain computer and network resources, and cannot access content outside the site collection they are deployed in. For more information about solutions, see Solutions Overview(http://go.microsoft.com/fwlink/p/?LinkID=156638)."
Using Custom Workflow Activities, create a loop structure to look for changes in List A (on changed event fires) and then traverse List B, looking for the qualifying criteria that will count as a match in List A, then update that item. Loop through the entire list until all every list item has been evaluated. This logic will be encompassed in a Method of a Class you will create, the class must be scoped "public" and the method will take as a parameter "SPUserCodeWorkflowContext" object and it will return a type of Hashtable, also remember that your feature needs to be Scoped at "Site".
- Create a Visual Studio Empty SharePoint Project that is Scoped to the Sandbox
- Create Logic to use the SharePoint API to traverse items in List B based on changes in List A
- Deploy the Solution, open up SharePoint Designer for the Site Collection it is Activated on
- Use the Custom Activity in SharePoint Designer as you would for any other OOB Activity
- Create your SharePoint Project
Begin by launching Visual Studio and create an Empty Project, scoped at Sandboxed Solution in the Project Properties or as you are setting up your Project for the first time. Next add a Class to create the method.
You are not over quite yet, now you need to make this available to SharePoint Designer, we do that by adding an Empty Module to our project. In my example below I am calling it CASDefinition and it includes and Elements.xml file that I will modify as such…
You will notice that the structure of the file lends itself to how it will be viewed and used in SharePoint Designer; also there is a reference to the class file function names, class names[lines 4 through 8], what category (placement)[my self serving line 10] it will appear in SharePoint Designer. Next you have parameters, now certainly here I could have made this configurable by taking the List name as an input Parameter or maybe a specific parameter that I wanted to update rather than all, but this is a demo, you get the idea, for now I have an output parameter.
By now, your project should look like this below.
A few housekeeping notes here, I did mention it above but just to re-inforce it, please change the Feature File to "Site" Scope so it is available at the Site Collection level, and you can see in the project properties that the "Sandboxed Solutions" property is set to true. One more thing, you will see that there is another project in there, "CASTester", that is just a console app I use for testing ANY solution logic, it is not necessary for this to work.
Assemble your SharePoint Designer Workflow
Now that you have deployed your package, you should see it as an available option in SharePoint Designer 2010 under Workflow Actions.
Notice the Fabian Custom Actions section and the Name of the Custom Workflow Activity therein. Now at this point you can set this workflow to run on a Changed Event in List A, or set it for Manual, either way, when it runs, it will subsequently change all items related in List B accordingly.
Above: List A – The Candidates Table (After Shot)
Above: List B- The Interview Board Tasks (After Shot)
So now you have a tried and tested way of doing Loops in SharePoint Designer 2010 albeit through a Custom Workflow Activity within the boundaries of a Sandboxed Solution in SharePoint 2010.
Cheers, happy SharePoint-ing
There is no way that I could do this in 140 character or less; I tried, but it butchered the meaning/conveyance of my message. So, this week and the last I am working on a project(s) that are not necessarily hard as much as one of them, I needed a sanity check, and the other, I definitely needed help… it was JQuery and SharePoint Designer stuff (run on sentence I know), and as much as these events are not limited these two events or these two individuals, sometimes when good fortune falls on you, you have to make it known so that, in part, people who are struggling understand that there is a community out there to help.
So, that said, I want to thank Bart X. Tubalinal (@bart_tubalinal
) and Matthew Bramer (@ionline247
) for taking time out of their busy days, at times after work hours, over lunch time, to work with me [and im sure others] disseminating their hard earned knowledge FOR FREE to the benefit of others.
Thank you all for attending my Session at the inaugural Office 365 Saturday at the Microsoft Campus, Redmond Washington.
Here are my Slide Decks
Session 2: Migrating a Classic ASP Site to Office 36 with CSOM & REST Services – A Case Study
This table lists the services that appear on the Services on Server page in Central Administration and provides additional topology guidance, if it applies. Note that Search service application components are deployed to servers by using the Search Administration page, not the Services on Server page.
First, let me qualify the below by saying that “this is accurate at the time the blog post is written”… ok now that we got that out of the way. Second, This information below is compiled from my experiences (Ive done a few Office 365 (SharePoint Online) projects to date) information I have garnered from esteemed SharePoint/Office 365 Experts, and guidance from TechNet & MSDN. In fact for an exhaustive list of guidance on Office365 I recommend you go here
Office 365 for Enterprise Service Descriptions and pull down all the information you will need on Exchange, Office, Lync and SharePoint.
So, to the crux of the matter, as I prepared for another assignment at work, I began researching, the premise being, “What should you (the consultant or the client) consider BEFORE making a decision on implementing SharePoint On-Premises “or” SharePoint Online (Office 365). Now this is by no means an exhaustive list, in-fact I would dubb it, “things you should know before you consider SharePoint Online over SharePoint On-Prem”. But before the tar and feathering, you should understand that I like SharePoint Online, I am one of the biggest cheerleaders, but as with anything/any tool, you need to know “when” to use it.
Top 15 things you should consider when thinking about SharePoint Online (Office 365)
- Each My Site gets 500MB of personal storage. This amount cannot be adjusted.
- The My Content part of a My Site is not provisioned until the user clicks on My Content from their My Profile page. After they do, a personal My Site site collection is created. This does not count against the 300 site collection limit as that applies to non-My Site site collections.
- BCS within SharePoint Online does not support a direct connection to SQL Azure. A WCF endpoint is required. -- See my Blog on how to do this with WCF here http://www.sharepointfabian.com/blog/Lists/Posts/Post.aspx?ID=212
- Access reporting is not supported by SharePoint Online Access Services because SQL Server Reporting Services (SSRS) is not currently enabled for SharePoint Online. Access reporting requires SSRS.
- SharePoint Online does not support auditing capabilities to log the opening and downloading of files in a document library.
- SharePoint Online does not support PerformancePoint Services.
- SharePoint Online does not support Excel Services and PowerPivot for SharePoint
- PDFs and other types of files can potentially run scripts against sites. To prevent this security threat, SharePoint Online requires users to download these types of files. When the user tries to open a PDF document stored in a SharePoint Online document library, the user will see a “Save As…” window and must download the PDF file to their local directory.
- SharePoint Online does support Enterprise Search, but does not currently support FAST Search.
- Vanity URLs can only be applied to the public website. Customers cannot apply a vanity URL to an intranet zone site.
- Editing the Public Website with SharePoint Designer is not supported. SharePoint Designer 2010 cannot be used to edit the public website. This site can only be edited with the built-in Site Designer tool. SharePoint Online only supports SharePoint Designer 2010.
- SharePoint Online development patterns and practices are currently targeted at site collection level solutions.
- “Server Resources” quota, what are used to determine amount of processing power available to Sandboxed Solutions, is determined by the number of licensed user seats in a company's tenancy. To calculate server resource quota in Office 365, you can use the following equation: (#seats×200) + 300.
- SharePoint Online does not currently support customer use of Windows PowerShell for service administration.
- You cannot create property based search scopes in Office 365 (SharePoint Online) -- Credit Wictor Wilen at http://www.wictorwilen.se/Post/You-cannot-create-property-based-search-scopes-in-Office-365-SharePoint-Online.aspx
Things that Flat Out are not available in SharePoint Online but ARE available in SharePoint 2010 Server
- Timer Jobs
- BCS Profile Pages
- Business Data Integration with the Office Client
- Audit Opening and Downloading
- Records Center
- Word Automation Services
- Business Intelligence Center
- Chart Web Parts
- Data Connection Library
- Decomposition Tree
- Advanced Content Processing
- Tunable Relevance with Multiple Rank Profiles
- Business Intelligence Indexing Connector
- SharePoint 2010 Search Connector Framework
- Deep Refinement
- Federated Search
- Query Suggestions, "Did You Mean?” and Related Queries
- Relevancy Tuning
- Rich Web Indexing
- Similar Results
- Thumbnails and Previews
- Visual Best Bets
- Advanced Sorting
- Web Analytics
So, with this, I hope you are thus more informed and can make better decisions.
Cheers, and Happy SharePoint-ing See you at the next SharePint!
Part 1: All about the Data – Databases, LINQ to SQL, WCF Data Contracts
Part 2: In deep with WCF – Looking at the methods that will assist us in our ECT and Testing
Part 3: Introducing SharePoint Online BCS – All that you need to configure in SharePoint Online to consume WCF Services for ECT
Part 4: SharePoint Designer Components – Creating your ECT, EL, and your Results
This is truly an exciting time for SharePoint and especially BCS and it enters the realm of the Cloud. Data is now truly universal.
Introducing SharePoint Online BCS – All that you need to configure in SharePoint Online to consume WCF Services for ECT
There is a lot that can be said here but if you read the Acknowledgements section of part 1, you will get all the information you need. I will back fill this eventually with lessons learned, but for now the below shows what is available to you in the Admin Options for SharePoint Online. You will be using the Manage Business Data Connectivity Option to review the ECT’s and perhaps add permission to the groups or individuals that can see/use the ECT and create them in SharePoint Designer.
Above is the Admin Tools to drive SPOnline (O365) earlier on I used Secure Store when I was Direct Connecting to SQL Azure, but that is no longer supported. For the WCF I used basic Bindings over http, so no credentials are needed.
Below shows the ECT’s as are there now, you will notice in part 4 that a new one is added.