Start a Workflow on a custom event.
Hello guys. I'm developping a WSS 3.0 intranet for STAS, on a Windows Server 2003 and I'm also using Sharepoint Designer 2007.
Using Workflows :
I was kinda stuck when came the moment to add workflows on my Sharepoint site. This probably works great, when you add workflows on a documents library or any other list, but I would like to know if it's possible to start a workflow on a custom event.
More precisely :
Each week, a tiers program update some PDFs(1 per department/project) and I need an approbation by the project's responsible, but I dont use a Documents Library for those files, especially because I need em to stay on the network, because they are updating every week. Then I use a custom web part that only links the files.
But the real thing is :
How can I start a workflow each week on a specific event, without using a Documents Library?
Exemple :
Each Monday, when the user comes to his team site, he needs to approve the Document.
Thanks
www.stas.biz
[1234 byte] By [
lurked] at [2008-1-1]
A workflow in SP 2007 needs to be owned by a List or Document Library. With that said, you could create a dummy list that does nothing but house the workflow. You would need some type of timer event (or a filesystem listener) to fire the workflow programatically when the file is updated on the network. It would have to create a List entry in that list and technically the workflow then runs against that list item, but all Tasks created could reference the external document. Whatever process (timer or listener) kicks off the workflow would likely have to add the path to the external document to the List item so that it is accessible to SPD. From there, you can create To-Dos in the workflow which assign Tasks to users, and reference the link to the external document.
With that said, this is quite a bit of a hack. Did you know that SP DocLibs are UNC addressable so they can look to all the world like network folders? "Updating every week" is no problem for SharePoint - in fact, SP could bring many benefits. I don't know all of your requirements so I won't completely second-guess your design, but so far it sounds like a DocLib fits the bill.
-Dave
DaveM wrote :
With that said, this is quite a bit of a hack. Did you know that SP DocLibs are UNC addressable so they can look to all the world like network folders? "Updating every week" is no problem for SharePoint - in fact, SP could bring many benefits. I don't know all of your requirements so I won't completely second-guess your design, but so far it sounds like a DocLib fits the bill. What you wrote just let me really interested.
If I could do a DocLib instead of all the trouble I already went through, this would be great.
But the program that updates files every week is an accountancy application, and those files are the department timesheets. So, is that safe to add in the Sharepoint's database those confidential informations?
Another question is: If the program modify the file without passing by sharepoint, only by using the UNC adress, will sharepoint detect this modification and start the workflow?
Those questions maybe sounds precipated, but I need to get some informations before to jump into this, because my project's responsible needs to be informed before I modifiy the already in-place structure.
Thanks alot for your answer, I'll see if I can get those files into the SQL database(It's not me who takes this kind of decisions), but else i'll try what you just told me with the dumb doclib. And sorry if my english is kinda strange... It's not my mother language.
www.stas.biz
No problem on the language....English is my native language and I have trouble with it sometimes...
;-)
Anyway, a few clarifications:
1. If you add the file to SP via the UNC path, it IS in the SP document library, so yes, SP would detect any modifications. If you configure your workflow to start automatically when a document is created or modified, then it will start for items added via UNC path.
2. I don't know the details of your network security, but it is possible that Sharepoint offers BETTER security than your network file share. Add on top of that the capabilities for auditing, records management, versioning, etc that you get with SP and it really might be a technically better solution. That doesn't mean that you will be able to use it though. As you pointed out, sometimes things are out of our control.
I hope those help. Let me know if you need more.
Dave
Thanks a lot Dave.
I tested it and it works great. I'll probably use the Documents Library finally, i just need to wait on confirmation from my project's responsible, since i'm changing the current information structure of the enterprise.
Thanks again, you just stopped my hairs' fall! 
www.stas.biz
As I said, it is because something needs to own the workflow. In SharePoint, that owning construct is a List or DocLib. That's just the way the SharePoint workflow host is set up. If you wanted to have a straight Workflow Foundation workflow, you could do that but then you lose the SharePoint and Office integration - you would have to do all of that manually.