SPNINJA on Workflow DR

Here’s a quick tip with regard to developing workflows:  ALWAYS DESIGN FOR DISASTER RECOVERY.  Below are some guidelines on how to do this.

TRACK INITIATORS:  Allow a “business initiator” to be chosen at workflow startup.  Do not assume the person starting the workflow is the “business initiator”.  Track them separately.  This has major implications for making workflows restartable.

RECOVERABILITY:  The workflow should be restartable from any point in time.  Include the necessary logic to jump to any point in the workflow depending on workflow state values.

WORKFLOW STATE: Store workflow state in list item fields or InfoPath variables.  Ensure that they are editable and make sense to the business user.

BUSINESS DESIGN:  Design workflows with the business user in mind.  You want business users to maintain this and not page you every time a restart needs to occur.  (Visualization workflow tools like Nintex REALLY help in this area.)

UPFRONT VALIDATION:  Validate all state values upfront and notify the initiator if there are problems.

GOLDEN RULE:  Any workflow change/upgrade will result in a workflow restart with the latest version.

Following these guidelines will enable you to AUTOMATE your workflow deployments.  Suddenly, deployments are much more simplified – requiring little or NO custom code because your workflows contain all the logic to start right where they stopped.  Additionally, a script can now be written to automate the restarts.

Hmmm…what scripting technology would allow me to:
1.  Pass in the list and workflow names to the command line for targeting a workflow that needs to be restarted.  Therefore it would be reusable on any workflow.
2.  Access to the SharePoint Object Model for:
 – finding running workflows
 – for each workflow found, stopping the current running workflow and starting the latest version
 – report on any workflows with errors
3.  Run the script and walk away.

It would indeed be very POWERful, taking the (sh)HELL out of workflow deployments!  Next post on how to do this

Advertisements

~ by spninjablog on January 4, 2010.

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: