Check if workflows are used or not? - sharepoint

We are migrating content from one SharePoint (MOSS 2007) to new platform (SP 2013). We have situation where we have to fix some items manually on each site.
Is there a way I can know if any workflow is used in the site or not?
P.S: Workflow related features are enabled on all the sites. We can see the workflows in list settings ofcourse but I want to check on site level if workflow is used anywhere on the site.
Thanks in advance.

List workflows are run against items in that list. So my thoughts would be no. My recommendation would be open SPD and check the workflows there. If they're list workflows then they run against that list and to my knowledge that list exclusively.

The best way I can think of is that you need to custom code it in Visual Studio and log the sites with workflows, steps
Open Site
Iterate through the lists in the site
if(sPList.WorkflowAssociations.Count > 0 ) the site contains workflow somewhere in some list

Related

Create a 2010 workflow in Visual Studio 2012 for SharePoint Online

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?)
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
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.

Reusable Content List not showing in Sharepoint

I'm trying to get the Reusable Content List on my SharePoint site, for that i have activated the office sharepoint server publishing infrastructure feature, even when that feature is active the Reusable Content List is not being displayed. Does anyone knows what could be the reason of this?
Thanks in Advance, i really appreciate the help
Try activating the other publishing features, as well. The infrastructure feature is at the site collection level, but the "Office SharePoint Server Publishing" feature is at the site level. If that doesn't cut it, also ensure the "Office SharePoint Server Standard Site features feature" is enabled
Reusable Content shows up in the top level site collection.
Go to Site Setting>Go to top level Site collection > View all site contents > Reusable List.

Sharepoint workflow: creating a task at another site

is it possible to create a task in a task list in a site other than the site to which the workflow is deployed to.
thanks
Nope - this isn't supported. The workflow must be deployed to all sites.
I assume you are talking about a SharePoint Designer Workflow and not a Visual Studio workflow where pretty much anything is possible.
You can either create a custom Activity in Visual Studio for use in SharePoint Designer or you use something like the Workflow Power Pack to add a little bit of custom code directly into SharePoint Designer workflows.
Please note that I have worked on the Workflow Power Pack, so consider me somewhat biased :-)

Accessing list data from a different site in Sharepoint Designer workflow

Does anyone know if it is possible to Lookup list data from a different site when creating a workflow with Sharepoint Designer 2007? The Define Workflow Lookup dialog only allows you to pick from lists in the current Sharepoint site you are creating the workflow in.
Ideally I'd like to be able to pick from a list in the parent site, or a site from a given URL (eg. http://myserver/mysite)
You cannot do that with OOTB activities. However you can build a custom SharePoint designer activity to do the task you need. We usually create just a call web service activity and then we call a SharePoint we service we need.
Take a look at this CodePlex project for some custom SharePoint Designer activities.
SPDActivities on CodePlex are very useful. However, if your exact requirements are not covered by any of those activies then you may want to consider embedding c# or vb.net code directly into the SharePoint Designer Workflow (Without resorting to Visual Studio).
I wrote a blog article about how to do it exactly at the following location:
http://www.muhimbi.com/blog/2009/12/embed-c-or-vb-code-directly-in.html

SharePoint Workflows - How to associate with specific content types (particularly folders)?

I noticed when working with SharePoint Designer that each workflow has a config xml with tags. Does anyone know how to:
1) Associate the workflow with a specific content type?
2) Know if it is possible to associate a workflow with folders?
It is possible to associate workflows with folders. Apparently Visual Studio created Windows Workflow Foundation (WWF) development is the only tried-and-true way to create custom workflows that can be associated with different content types. There are some enterprise tools that can help a lot for creating custom workflows such as K2's Blackpoint (though I haven't had a chance to try the software).
I did find a couple of other workflow tutorials to start me off:
SharePoint Workflows for Folder Content Type - codeproject.com
Microsoft SharePoint Team Blog
I didn't find any information on the config xml tags yet.

Resources