Sharepoint workflow infinite loop workflow and fixes

As I notice a lot of people are reading my infinite loop post, hope I can share more info with everyone.

Here is some creative way to avoid infinite loop when working with SharePoint Designer. Every workflow is different, so the solution is really depends on what you are trying to do.

Other example and ideas are welcome!!!

Lets say this is what you want to do:

  • You have a object (a list object or infopath form)
    • For now lets call it a server build form which people submit to request for a server build and the server admin is suppose to use to form to track the progress of the server build as the build move between different stages.
  • You want the system to automatically time stamp the object every time someone makes a change to it (a change would means someone has completed a certain stage).
  • And let’s say you don’t want to use the version function as some end user doesn’t have the permission to do so, so you want the data to be store in a field (also for reporting and Business Intelligence purpose)
    • Using versioning requires custom coding and you want to stick with SharePoint Designer workflow

So a wrong way which result in infinite loop would be as follow:

  • Update time stamp field X every time someone change the object/content/list
  • This is a problem (and this will result in infinite loop and doesn’t work) if you try to build your workflow this way:
    • The workflow’s start conduction is every time the object change
    • The workflow action is to change the field when this occur
    • When a object change, the workflow starts again because the conduction is “every time the object change
    • Because the workflow change the object, a new workflow will start again and make another change again… creating a infinite loo

A sample workaround (again… it depends on what you want your workflow to do):

  • If you are trying to move object from stage to stage, instead of having the workflow monitor and starts every time the exact “changes” occur. Try setup the workflow to monitor each stages. Here is one sample:
    • IF Field X even became “Stage 3”, then instead current date into Field Y.

Of course, depends on what you want to do you have a lot of possibility than the above. The key here is be “creative” and normally you should be able to find your answer. Have FUN!  If you change the monitoring conduction, you normally will be able to find a workaround.

Tabs view using Infopath and Form Services

A lot of people ask me this question: how can I create tabs in Infopath forms (or Form Services):

Infopath and Form Services doesn’t support “tabs”, so you have to be a little creative.

– Give the form a background color (ex: blue)

– Using a table, using one of the cell, create tabs at the top of the table, merge the rest fo the area below the table as one large content area.

– The main area of the form should be all white (or what ever color you want)

– Insert a “button” into the cell area listed above (if you have two tab, then instead 2 button)

– Create 2 views in infopath (or as many views as you want base on the number of tabs you want)

– Then setup the button to switch between different views when click on it…

– Now, make the button invisible.

– Make the active tab (the cell since this is a table and your button is invisible) the same color as your form

– Make all the in-active tab match the color of your background color…

– Repeat the same thing to all your views.

With the above, you should be able to create a form with tabs and publishable to Form Services.

Little Known Facts (Issues) of MOSS Content Deployment Jobs (MOSS 2007)

I spend 1.5 years working on a MOSS project (yes, the project was that long…) developing a MOSS web content management platform. Here are some things I could like to share during my 1.5 years of my life (yes, I know a lot about MOSS web content management after 1.5 years of my life spend living with it)… things Microsoft didn’t want anyone to know…  on a side note, some of the problem can be fix using custom code, if you run into any of the problem email me…

I am sure most of you who uses MOSS know there is a thing in SharePoint call “content deployment” features which allow you to deploy approved content from server 1 to server 2. This function is created for web content management and web publishing. Here are some little known fact about this “content deployment”. I will try to update this post as I remember more of things we run into during the project…

  • Microsoft whitepaper say you can have a 3 stage deployment (Develop, Staging, and Production), but this is false!
    • What Microsoft is trying to say on their whitepaper is that you can do the following:
      • Develop to Staging
      • Develop to Production
    • There is no out-of-the-box solution for this one yet… you can have a workaround using custom code by coding a manual timer job
    • Technically you can only do 2 stage content deployment. This doesn’t really work for firm that is regulated by government such as the FDA that “WANTS” to have a 3 stage content deployment process (check your work before having the content go to the public for government regulation purpose).
  • MOSS web content management have a lot of bugs…
    • Content deployment within MOSS’s web content management is nothing close to perfect… Check out some of my other blogs for some of those errors…
    • A lot of those errors are “unexplainable”, and the only way to fix it is to recreate the deployment jobs.
  • Microsoft calls it “content deployment job”, but do you know technically all your content are deploy to the 2nd server?
    • In MOSS when you create a document it is call version 0.1 and when its publish it is then call version 1.0
    • Version 1.0 is then publish to the internet for the rest of the world to view.
    • BUT the way content deployment works is that it copy all version to 2nd server, then uses permission to mask the content from being display on the internet…
    • This means every version you have (even un approved version) are “technically ” on the 2nd server available to the rest of the world, the public just can’t view it because of permission.
  • Versioning
    • Depends on how your content deployment job is setup, the 1st server will copy and overwrite content in 2nd server. Not a big issue until you are trying to figure out the version in server 2 and dealing with the database size…
    • This is how it works:
      • when things is approve, server 1 copies the content to server 2.
      • Server 2’s content is then overwritten and the new content is rename as a new version.
      • Image the server does this every 15 mins (common schedules for MOSS web content management)… by week 2 you have on version 500+!!!
    • Why is this important? What if you are trying to build a report that shows you version in dev and production? You can’t build a report with this type of behavior…

DPM 2007 Known Issues

Hi all, here is a list of DPM 2007 known issues:  http://technet.microsoft.com/en-us/library/bb795594.aspx

DPM 2007 not showing Exchange Storage Groups on Small Business Server SBS 2003 server

This is a known issue, Exchange writer must be turned on for the Volume Shadow Copy service in Windows Small Business Server 2003
By default, the Setup program for Microsoft Windows Small Business Server 2003 turns off the Microsoft Exchange Server 2003 writer for the Volume Shadow Copy service. To protect data using DPM 2007, the Exchange 2003 writer must be turned on.

To turn on the Exchange writer
Click Start, click Run, type regedit, and then click OK.

Locate and then double-click the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem

Double-click the Disable Exchange Writer value.

In the Value data text box, change the value from 1 to 0, and then click OK.

Quit Registry Editor.

Click Start, point to Administrative Tools, and then click Services.

Stop and then restart the Microsoft Exchange Information Store service.

OpenSource DotNetNuke vs Microsoft Office SharePoint Server 2007 (the truth the DotNetNuke guys forgot to tell you)

OK guys, I found this little “thing” on the web for DotNetNuke vs Sharepoint… lot of the contents and “comparison” is incorrect…

As a evil Sharepoint guy clip_image001, I just want to comment on this as the comparison was misleading… Hope I don’t upset anyone here…  can’t we just all live together peacefully without pointing fingers at other?  Each products have its own pros and cons and nothing is perfect…

Here is the original link to the product comparison chart from Open Source DotNetNuke:  http://www.dotnetnuke.com/Default.aspx?tabid=970&EntryID=506

Comment from both DNN and Sharepoint people are welcome!

From the Site’s Features Matrix Showdown: (bold is my addition and correction to the "missing" functions as reported by dotnetnuke)

Feature DotNetNuke® MOSS 2007 and WSS 3.0 DotNetNuke® Benefits
Usability      
Portal Framework clip_image001 (Extensible) clip_image002
(Web Part Framework)
unlimited pages per site, unlimited modules per page, ability to display module on multiple pages

There is a 2000 object performance limit on the doc library in sharepoint, but you can always move the data to a SQL server…

Browser-Based Administration clip_image002[1] clip_image002[2]  
Intuitive Control Panel clip_image002[3] clip_image002[4]  
Inline Editing, Drag and Drop clip_image002[5] Yes you can.  With the out-of-the-box HTML Editor web part, inline editing and drag and drop is possible from MS Office app.  You can copy and paste from and all formatting is retain after the copy and paste. You can also copy and past from other app… you get full drag, drop, copy, and past function available in the desktop… you can even use explorer view in Sharepoint to drag and drop files into the system…  
Site Search clip_image002[6] clip_image002[7] does not depend on third party components or services such as Index Server, etc…

Index server is part of Sharepoint… its not a “third party components”… The Index server is a services within Sharepoint. No extra fee or add-on… Microsoft separated the index server so you can scale the server farm…

Content Import/Export clip_image002[8] Yes you can and there is as much as three different methods to do this…

1.  STSADM command
2.  simply copy and paste using the Excel view (for import from Excel) or export to Excel option.
3.  Explorer view, and just drag and drop content to site.

 
Templates clip_image002[9] Yes you can, in sharpeoint, you can do this with either Template (out-of-the-box feature) or using Master page and page layout when page it using Solution (this is what Microsoft themselves is using to distribute templates. ) site and page templates ( with content ) supported
MS Office Integration   clip_image002[10]  
Bundled Functionality      
Announcements clip_image002[11] clip_image002[12]  
Blog clip_image002[13] clip_image002[14]  
Contacts clip_image002[15] clip_image002[16]  
Documents clip_image002[17] clip_image002[18]  
Events clip_image002[19] clip_image002[20]  
FAQs clip_image002[21] clip_image002[22]  
Feedback clip_image002[23] clip_image002[24]  
Discussion Forums clip_image002[25] clip_image002[26]  
Photo Gallery clip_image002[27] clip_image002[28]  
Html/Text Content clip_image002[29] clip_image002[30]  
IFrame clip_image002[31] clip_image002[32]  
Links clip_image002[33] clip_image002[34]  
Media clip_image002[35] clip_image002[36]  
News Feeds clip_image002[37] clip_image002[38]  
Custom Reports clip_image002[39] In order to make custom reports in Sharepoint, you need to create a custom aspx page using the API to pull data… (not sure what they mean by Custom Reports)…

Depends on the type of data you need, you could use Infopath or Excel services to get your data, but not a simple task.

 
Directory clip_image002[40] Sharepoint comes default with Navigation control and Site Directory Template…  
Store clip_image002[41] Go to codeplex.com, I am sure you will find a “store” template/features for sharepoint  
Survey clip_image002[42] clip_image002[43]  
Custom Forms/Tables clip_image002[44] Yes you can do this using Forms services and Infopath (Forms services is part of Sharepoint)  
Banner Advertising clip_image002[45] You can have a pre-fix banner (or as many ad as you want) using Master Page, Page Layout, or Web Parts… combine it with Java scripts, and you can have different banner display also…

Additional comment: if you pay for Sharepoint, you properly don’t want ad, am I correct? 🙂

 
Newsletters clip_image002[46] Yes you can and there is as much as two different methods to do this…

– Announcements, email alerts functions

– or even the out-of-the-box workflow…

 
Event Logging clip_image002[47] Yes, they are there…

Out of the box Sharepoint comes with logger such as:  ULS Log, IIS Events Log, and usage analysis reports. There is also additional logs web parts in codeplex.com.

 
File Manager clip_image002[48] Yes, they are there…

File Management can be done thru Use Site Manager, Sharepoint Designer, and Explorer View (any one will work).

 
Recycle Bin clip_image002[49] clip_image002[50]  
Membership & Roles      
Plugin Membership Provider clip_image002[51] clip_image002[52] support for all Microsoft Membership Provider attributes
Active Directory Authentication clip_image002[53] clip_image002[54]  
Internet/Extranet Authentication clip_image002[55] clip_image002[56]  
Public, Private, Verified Registration Options clip_image002[57] Yes you can…

You can easily build one using Form-Based Authentication
There are open source add on which allow for registration and self services such as Windows Live ID web part:

http://blog.solanite.com

/keith/WLA

/Documentation

/Home.aspx

 
Plugin Roles Provider clip_image002[58] clip_image002[59] additional support for Effective Date, Expiry Date, Avatars, Subscriptions, etc…

Sharepoint can do audience targeting… you can have rules around the audiences you want the content to be display to…

If you are talking about Authentication provider you can use form-based authentication or other plug-in

Security Role Trimming clip_image002[60] clip_image002[61] role trimming control visibility at the Page, Module, and Folder level and also includes extensibility options for adding additional Permission types

If your sharepoint is setup correclty… you can secure it any way you want… Also Sharepoint is base on SQL, you can have various type of security setting for your file or database…

Sharepoint also support federated search of flat file network share… If it is a AD network share, it ONLY display files you are searching per your security permission.

User Profile      
Plugin Profile Provider clip_image002[62] clip_image002[63]  
Extensible User Profile System clip_image002[64] clip_image002[65]

Again… yes they are there… they are call MySite in Sharepoin… and it’s a out of the box features.  you can also use targeting to target content base on specify profile data

Profile items can be managed at run-time using an intuitive administrative interface. User interface controls generated automatically for collection of profile data.
Application Extensibility      
Integrated Component Architecture clip_image001[1] (Modules) clip_image001[2] (Web Parts)  
Rapid Development Model clip_image001[3] (User Controls) clip_image001[4] (User Controls)  
Developer Tool Support clip_image001[5] (All VS2005 SKUs) clip_image001[6] (VS2005 Pro)

In addition to VS2005 you can also use Sharepoint Designer or the build in web editor GUI.

supports FREE Visual Web Developer Express 2005 and SQL 2005 Express
Code Generation Templates clip_image002[66] Yes they are there…
There are a number of template and tools such as CodeRush and DxCore for code generation and code template:

http://www.devexpress.com

/Products

/Visual_Studio_Add-in/

/Coding_Assistance/

http://www.devexpress.com

/Downloads/

Visual_Studio_Add-in/DXCore/

Basic code template can also be found in TechNet and MSDN

uses integrated Visual Studio item templates
Automated Packaging clip_image002[67] Yes they are there…
You can package anything (contain, features, web parts, list, security settings, etc) into a WSP solution and automate distribution process using stsadm command.  You can also include several items into one package (or just a single object).
integrated with standard application

Using STSADM command, it package the files as a since CAB files…

Efficient Distribution clip_image002[68] Yes they are there…

You can package anything (contain, features, web parts, list, security settings, etc) into a WSP solution and automate distribution process using stsadm command.  You can also include several items into one package (or just a single object).

single ZIP file

Using STSADM command, it package the files as a since CAB files…

Run-time Installation clip_image002[69] Yes they are there…
Using WSP Solution, Features, and stsadm command.
integrated with standard application

Just combine DOS batch file and STSADM commands… you can automate anything.

Designer Extensibility      
Templating Architecture clip_image001[7] (Skins) clip_image001[8] (Master Pages) pre-compiled for maximum performance and flexibility
Design Tool Support clip_image002[70] clip_image001[9] (VS2005)

In addition to VS2005 you can also use Sharepoint Designer or the build in web editor GUI.

Supports ALL design tools ( PC and MAC )

Mac is supported if you use the web editor GUI

Automated Packaging clip_image002[71] Yes they are there…
Using STSADM command and batch scripts.
Or Sharepoint Designer personal web package
integrated with standard application

Just use DOS batch file and STSADM commands…

Efficient Distribution clip_image002[72] Yes they are there…
Using WSP (CAB files) Solution, Features, and stsadm command.
single ZIP file

Using STSADM command, it package the files as a since CAB files…

Run-time Installation clip_image002[73] Yes they are there…

Using WSP (CAB files) Solution, Features, and stsadm command.

integrated with standard application

Just use DOS batch file and STSADM commands…

Site Extensibility      
Site Virtualization clip_image002[74] clip_image002[75] supports multiple virtual sites from a single application/database based on URL
Friendly URLs clip_image002[76] clip_image002[77] flexible RegExp URL Rewriting engine
Localization      
Resource File Framework clip_image002[78] clip_image002[79]  
Run-time integrated editor clip_image002[80] Yes they are there…

Pages can be edit live. Just enable the Web Content Management Features which come out of the box with Sharepoint

 
Scalable clip_image002[81] Yes they are there…

Sharepoint is base on 3-tier architecture and can be configured as a farm allow scaling vertically and horizontally. There is no limit… you just build a server farm and load balance the request and workload… you can have as much as 100+ server for a single sharepoint farm if you want… within this server farm, you can also host as many site as you want (each can also have a different URL/domain name)

Does not use satellite assemblies ( satellite assemblies can cause memory consumption issues in hosted environments )
Automated Packaging clip_image002[82] Yes they are there…

Using STSADM command and batch scripts, or Sharepoint Designer personal web package

integrated with standard application

Using STSADM command, it package the files as a since CAB files…

Efficient Distribution clip_image002[83] Yes they are there…

Using STSADM command and batch scripts, or Sharepoint Designer personal web package

single ZIP file

Using STSADM command, it package the files as a since CAB files…

Run-time Installation clip_image002[84] Yes they are there…

Using WSP Solution, Features, and stsadm command.

integrated with standard application
Security      
Medium Trust Compliant clip_image002[85] Yes they are there and there are many option…

Options of forms-base, integrated, and AD authentication, you can even use Windows Live authentication.  SSL and Kerberos (symmetric key cryptography authentication) can also be enable.

 
Document Management      
Secure Document Storage clip_image002[86] clip_image002[87]

Sharepoint use ACL combine with Active Directory… you can secure it any way you want… Also Sharepoint is base on SQL, you can have various type of security setting for your file or database…

Sharepoint also support federated search of flat file network share… If it is a AD network share, it ONLY display files you are searching per your security permission.

supports storage on file system and in database

Sharepoint supports it too…

Infrastructure      
XCOPY Deployment clip_image002[88] Yes they are there…

Use STSADM command and combine it with a batch scripts.
SP2 of Sharepoint comes with a backup/restore web GUI option.

You can deploy a site using common line

 
No IIS Customization clip_image002[89] Yes they are there…

Sharepoint automatically create and configure IIS for you, no modification to IIS is needed out of the box.

 
Web Farm Support clip_image002[90] clip_image002[91]  
Multiple Database Support clip_image002[92] You can confiure unlimited content databases for a single site or for a number of sites

Unlimited database… you are limited by you’re your SQL server’s hardware…

 
Shared Hosting Optimization clip_image002[93] Multiple site can be hosted on a single MOSS server farm.  Each site can have its own cache optimization setting…  
Community      
Professional Plugin Ecosystem clip_image002[94]    
Professional Designer Ecosystem clip_image002[95]    
Support Forums clip_image002[96] Microsoft Premium Support comes default with most Enterprise most agreement and also with Software Assurance.
MSDN and TechNet is another methods (since its Support Forums)

You can also use Codeplex…

 

Content Deployment Job Failure – Checked Out Document

Problem

The following error message is displayed in the job status log and content deployment job fail.  The error message indicates a file is checked out.

Troubleshooting info for MOSS and Content Deployment2

Solution

This issue can happen due the following reasons.
1. A document is checked out in the destination site collection. Manually check in the document at the destination site and reran the content deployment job.