Question

I have a solution in VS2012 with a SharePoint 2013 sandboxed project. I have created some custom workflows in 2013.

What I really need to do is to have an approval workflow to publish content, and send out an email when a new document is approved.

My first thought was to use the OOB approval 2010 workflow and use an event receiver on the list. When an item becomes approved, I would send out an email, but I'm unable to send emails programmatically in SharePoint online.

My second thought was to recreate the workflow in 2013, since I know I can send emails out that way, but it looks like the activities related to content approval were removed for 2013 workflows. I can try and do the approvals via rest calls, but my concern was that my workflow will fire every time the item in the list changes (even if it's not a publish), so I will have to check (in the workflow) if the item is being published or not. This will cause the workflow history for the items to become pretty useless as it will be filled with mostly white noise. Also, as far as I can tell, the checkbox when you create an association for "Start this workflow to approve publishing a major version of an item." does not apply to 2013 workflows.

I believe my best answer at this time would be to create a custom 2010 workflow, but I don't see how I can do that from inside VS2012. Can anyone help me (or maybe suggestion another alternative to achieving my goal?)

Was it helpful?

Solution 2

I ended up using an OOB 2010 Workflow and modifying it with SharePoint Designer. Not really the solution I wanted (which was to package ALL of my customizations into a single WSP), but I've spent more time than I should have trying to get it to work.

OTHER TIPS

You can just turn on the old (2007) approval workflows. It sounds like those might work for you.

This article references how to do that, but in short it is under Site Settings -> Site Collection Administration -> Site Collection Features -> enable the feature 'SharePoint 2007 Workflows'

Configuring SharePoint 2013 to use legacy workflows

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top