Sharepoint 2007 workflow vs powershell script -
in sharepoint 2007 document list, have need have column expiry date, column indicator if expiry date has passed.
i have spoken end user , having additional views show documents have expired not enough - want column show word "expired".
i can achieve having workflow on item created event waits date less today. run workflow , work flow remain in "in progress" state until item expires (which 5 years)
i can via powershell , run scheduled task every night iterate items in list , manually set column text if criteria met.
my question best document list have on 100,000 documents. there impact on having workflows run 5 years.. , lots of them @ that?
having ten thousand workflows paused , waiting 5 years bad idea. not put unnecessary load on workflow timer service, you'd run risk of ten thousand workflows entering error state if workflow timer service stops unexpectedly @ point within 5 years, force terminate , restart 10,000 workflows keep process going.
a scheduled task triggering execution of console app or powershell script better approach, or write own sharepoint timer job in visual studio. either way use sharepoint server-side object model query list, means of spquery object. important thing when using sharepoint server-side object model use efficient queries possible.
you not need iterate through items in list, ever. caml query should specific enough return subset of items indicator column not equal "expired" , expiry date less today's date.
add column indexing both of columns reduce strain of query on database.
Comments
Post a Comment