I have a custom workflow, but I want to start the workflow and if exists a currently workflow created (and not completed) in the same document that I try to create a workflow, give a warning message. Where I can put this and how can I make this verification?
You can put your code on your workflow start task, in that throw an exception that will display your warning massage. So first, you need to check if the document attached is part of a workflow, if so check if it is on the workflow you are looking for. Then you can throw the exception; all this has to be done on your start workflow service task.