Check for checked-in status in workflow

I’ve had a few users launch an approval workflow of documents they haven’t checked in yet and it causes all kinds of issues.

I need to create a workflow that will show an error if it’s launched while the document is checked-out. Can this be done?

Hello

I can suggest solution which was described on Stack Overflow

[quote]The fix to this is to have the workflow checkout the document, make any changes and then check it back in.

In code you would do this with a custom event handler. Check out the sharepoint SDK or MSDN for info on the object model.

In SharePoint Designer set your workflow to look like this:

Check “Automatically start this workflow when a new item is created” or “Automatically start this workflow when a new item is created” or select both options.

Hit next.

On the following page leave the conditions section blank.

In the action settings setup your workflow to look like this:

Check out item in <Current Item> then Wait for <Whatever fields you need to be set or actions you need> then Check in item in <Current Item> with comment: <Comment>
You can break this out into steps as well. For instance:

Step One - Check out current item Step Two - Custom stuff you need to do Step Three - Check in current item [/quote]