Project Description

IPY4SPD - When the need to get it done overwhelms the need to do it right!
This project adds an IronPython script activity to SharePoint Designer giving developers added flexibility in their workflows.

Need to do a complex string manipulation? No problem.
ipystring.png

Scripts have access to the .NET framework and SharePoint object model. They can return variables to the workflow.
lookupscript.jpg
Scripts can be stored in a SharePoint list and included with other scripts. Here we will 'pass' some variables to a script that sets a field in an InfoPath form. The script is stored in a list called IronPython Scripts:

scriptlist.jpg

With great power comes great responsibility. Make sure your script list is locked down tight!

lookupscript2.jpg

Script errors are formatted and reported in the workflow history.

IPYSPDError.jpg

Notes:

Returning a value from a script variable is optional.
References to System and Microsoft.SharePoint are passed to your scripts by default (just import to use them)
The following contextual workflow variables are available to your scripts (those are double underscores):
__actprops__ (workflow activation properties)
__site__ (the current SPSite)
__web__ (the current SPWeb)
__list__ (the current SPList)
__item__ (the current SPListItem)
__user__ (the current SPUser)

Last edited Jan 21, 2011 at 4:28 PM by nfreeze, version 36