Feeds:
Posts
Comments

Wow, it has been a really long time since I last posted on this blog.  Surprisingly, I’m still getting quite a few hits on a number of blog posts, though.

Here’s a quick update on what’s going on with me:

My wife and I have a new addition to our family!  Woohoo!  That’s probably one of the big reasons I haven’t really been paying much attention to this blog lately.  Our daughter, Fiona, is a wonderful little girl.  She’s spunky like her mom… which is going to be trouble sooner or later!

Professionally, I’ve shifted gears a little bit in the last 9 months.  I’m no longer focusing on SharePoint, but am now working with a few well-known open source projects.  Among them are MonoRail and ActiveRecord from Castle Project.  Working with ActiveRecord means that I’m now using NHibernate as an object-relational model.  I’ve been using NVelocity for web site templating, Scriptaculous for animations and PrototypeJS because it’s incredibly useful.  I’m back to using TestDriven.net for unit testing, CruiseControl for continuous build integration, and NAnt for build scripts and other automated functionality.

Hopefully, I’ll start blogging about some of these technologies I’ve been using.  If nothing else, posts can serve to remind me of trouble spots I’ve run into and how I fixed certain problems.

Peace and Blessings to you!

I’ve recently had a need to model a looping workflow with a SharePoint Designer workflow.  Designer doesn’t have a ‘Start Workflow’ action available by default, so I installed the Useful SharePoint Designer Workflow Activities on Codeplex.

My workflow would be designed like this

  1. Collect Data From Users with Task Form
  2. Set Workflow Variable to Step 1 Task ID
  3. Check for repeat condition on Above Task
    1. Start a new instance of this workflow
  4. (Workflow Done)

Looks great, but when running this workflow, I kept getting the following error:

Exception from HRESULT: 0×8102009B

at Microsoft.SharePoint.Library.SPRequest.AddWorkflowToListItem(String bstrUrl, String bstrListName, Int32 lItemID, Int32 lItemLevel, Int32 lItemVersion, Guid workflowPackageId, Guid& pWorkflowInstanceId, Guid workflowTaskListId, String bstrStatusFieldInternalName, Int32 lAuthorId)

I searched around and found out that you cannot start an instance of a workflow on an item when the same workflow is already running on that item.  Lucy’s blog had a code sample which checked the target item for the duplicate WF and removed the WF if it was found.  I wanted to keep the data from the first workflow, and this would remove it.  Not exactly what I wanted.

Here’s a simpler approach I took:

Modify the original workflow (Workflow A)…

  1. Collect Data From Users with Task Form
  2. Set Workflow Variable to Step 1 Task ID
    1. Check for repeat condition on Above Task
    2. Start a new instance of the LookBack workflow
    3. Stop this workflow and log the message ‘Completed – Looping’
  3. (Workflow Done)

Create a second workflow called ‘LoopBack’:

  1. Pause for 1 minute
  2. Start a new instance of Workflow A
  3. (Workflow Done)

I can start an instance of LoopBack at the same time as Workflow A.  Then, LoopBack waits while Workflow A completes.  After that, it starts Workflow A over again.  The pause is there since Workflow A takes some time to fully complete.

Note, if you’re not running SP1, the Pause for 1 minute step will take 30 minutes to complete.  Installing SP1 will fix this issue.

This is a really simple way to model a looping workflow without going into Visual Studio.

Fahrenheit 451, by Ray Bradbury

Everyone must leave something behind when he dies, my grandfather said.  A child or a book or a painting or a house or a wall built or a pair of shoes made.  Or a garden planted.  Something your hand touched some way so your soul has somewhere to go when you die, and when people look at that tree or that flower you planted, you’re there.  It doesn’t matter what you do, he said, so long as you change something from the way it was before you touched it into something that’s like you after you take your hands away.  The difference between the man who just cuts lawns and a real gardener is in the touching, he said.  The lawn cutter might just as well not have been there at all; the gardener will be there a lifetime.

Proverbs 30:8-9

Keep falsehood and lies far from me;
       give me neither poverty nor riches,
       but give me only my daily bread.

Otherwise, I may have too much and disown you
       and say, ‘Who is the LORD ?’
       Or I may become poor and steal,
       and so dishonor the name of my God.

Not only did DST rob me of an hour of sleep this weekend, it’s also slowing down my content deployment jobs!  Thanks a lot, Benjamin Franklin!

This KB article seems to explain the problem as beeing that the OWSTIMER has its own clock which is separate from the system clock.  I scheduled a job for 11:17am this morning and it showed a status of ‘preparing’ until 12:17pm, at which time it ran smoothly.

A couple of solutions: set your jobs to run as if you were still in non-DST.  Right now, that would mean that I would schedule a job for one hour from now if I wanted it to run immediately.  Second solution: change your server time zone to a non-DST time zone and disable automatic time updates.

Update 2008-03-11:
Install SP1 to alleviate this problem!  I assumed the server I was working on had SP1, but I was wrong.  Running the update fixed the problem immediately.

If you use the CssRegistration and CssLink controls on a SharePoint page, core.css is always added to the HTML page last.  This means that any styles in core.css will override the styles you’ve defined in your custom stylesheets.  Does this make sense?! No.  But, like many other things in SharePoint, that’s the way it is.

A quick way to fix this is to just use a plain <link …> tag to include your stylesheets.  Since those aren’t processed server-side like links in the controls mentioned above, they will be loaded in the order you define in the HTML.

Heather Solomon has a blog post about this issue as well.

SkyDrive

I just found out about Windows Live SkyDrive. I bet there are a million file storage sites out there just like it, but it seems pretty nice:

  • 5 GB of storage
  • You can store EXE file (something I can’t do in wordpress.com without renaming files)
  • Public/Private/Shared folders
  • Easy Interface
  • FREE

I was just looking for this exact type of file storage service since I’m moving off of a paid hosting service and onto totally (or mostly) free services. Thanks Microsoft!

SharePoint has a nifty little feature which allows logged-in users to tell which other users are logged in (or away, or idle, etc.)  While this is a handy thing to have in an intranet setting, having your users prompted with the Name.dll download on a public web site isn’t desirable.  Here’s how to get rid of that pesky download prompt:

http://support.microsoft.com/kb/931509

Ever have SharePoint Designer tell you that something is checked out, but you know that it really isn’t? Here’s a link forwarded to me by a coworker:

 http://robgarrett.com/cs/blogs/software/archive/2007/12/14/sharepoint-designer-and-sharepoint-out-of-sync.aspx

Here’s a useful article with instructions on how to add new reports to the Site Actions / View Reports menu:

http://blogs.msdn.com/ecm/archive/2006/11/15/report-rapport.aspx

Older Posts »