Please send me an email at firstname.lastname@example.org I send you the sample code by email.
Please note that this sample code is for investigation purposes only and is provided with no warranties.
The code is a custom action code that starts a workflow and logs some info about it. Check the file pleCustomActionEx.cs
One thing I forgot to mention in my previous note and that is that I've seen weird things happening on lists that have multiple workflows running concurrently.