How to Install 'Approval - SharePoint 2010' workflow template in SharePoint 2013 Server - sharepoint

I am fairly new in SharePoint Development and configuration. I need to create a list that when a entry is created, it will email the selected person to approves the entry.
Right now, I have already created the list and will be setting-up the workflow configuration, but the problem is that the 'Approval-SharePoint 2010' Workflow template is missing.
How can I work around this? Or can I download the template and install it in the Server SharePoint 2013?

You haven't mentioned which version of SharePoint you are running. I presume because you don't have the option available you are running SharePoint 2013 Foundation.
SharePoint 2013 Foundation doesn't use support the Workflow Manager and uses the same workflow engine that SharePoint 2010 Foundation uses- this doesn't include the approval workflow.
The Approval-SharePoint 2010 workflow template comes with SharePoint Standard or SharePoint Enterprise. See here for feature comparisons between versions:
https://blog.blksthl.com/2013/01/14/sharepoint-2013-feature-comparison-chart-all-editions/
Unfortunately, having tried various things myself, the options are upgrade to at least SharePoint standard or build a custom workflow. Customer workflows can be built using SharePoint Designer or as part of a code solution. There are quite a few guides already out there. This is just the first one I came to:
http://plexhosted.com/billing/knowledgebase/226/How-to-create-a-simple-approval-workflow-in-SharePoint-Designer.html
If I am being too presumptuous and your version is higher than Foundation then it might just be that you need to activate the Workflows feature in the site collection features.

Related

sharepoint 2013 workflow is not showing stages and actions

[SharePoint 2013 workflow logic not visible][1]
[SharePoint example][2]
I was trying to make workflow in SharePoint Designer 2013 and when I choose list workflow, give name and select SharePoint 2013 workflow and appears windows no Stage no such thing. [1]: https://i.stack.imgur.com/o4wsK.png
I followed this site [2]: https://www.sharepointsky.com/server-side-activities-have-been-updated-you-need-to-restart-sharepoint-designer-to-use-the-updated-version-of-activities/....and tried everything. It won't work in my system. I could not identify the issue.
Awful issue. I don't know the reason but copying file:
"Microsoft.SharePoint.WorkflowServices.Activities.Proxy.dll"
from any of your SharePoint sites where Workflow 2013 is available into this folder:
"C:\Users\USER\AppData\Local\Microsoft\WebsiteCache\(Site where Workflow 2013 is missing)\15.0.0.4455"
will do the trick.
Let me know if it worked for you.

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.

Identify SharePoint Foundation or SharePoint 2010

I've a SharePoint installation in my virtual machine. How do I find whether it is SharePoint Foundation or SharePoint 2010? I've run this command -
Get-SPFarm | Select BuildVersion
and it is giving me the build version as 14.0.4762.1000. How do I identify the version from that?
Okay, should have searched a bit longer. I found it here - https://sharepoint.stackexchange.com/questions/3886/how-to-detect-the-edition-of-sharepoint-2010-installed. We can verify a regedit key to identify the GUID which matches to a SharePoint edition.
There is a page on MSDN http://msdn.microsoft.com/en-us/library/ff721969.aspx using registry access to list installed SharePoint products. However, sometimes you don't have enough permissions to look to the registry, or you want to use SharePoint API only - not to depend on registry paths. (You may need this check in some code that you deploy with a SharePoint solution where the registry access could be an unnecessary requirement.)
Your link to stackexchange above points out also a way using the SPFarm.Products property in PowerShell. This would be a complete code to check the SharePoint Server release in C#:
// B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0 : SharePoint Server 2010 Standard Trial
// 3FDFBCC8-B3E4-4482-91FA-122C6432805C : SharePoint Server 2010 Standard
// 88BED06D-8C6B-4E62-AB01-546D6005FE97 : SharePoint Server 2010 Enterprise Trial
// D5595F62-449B-4061-B0B2-0CBAD410BB51 : SharePoint Server 2010 Enterprise
Guid[] serverGuids = { new Guid("B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0"),
new Guid("3FDFBCC8-B3E4-4482-91FA-122C6432805C"),
new Guid("88BED06D-8C6B-4E62-AB01-546D6005FE97"),
new Guid("D5595F62-449B-4061-B0B2-0CBAD410BB51") };
// If a Server ID cannot be detected we are running on Foundation.
bool isServer = SPFarm.Local.Products.Any(productGuid =>
serverGuids.Contains(productGuid));
--- Ferda
For a customer project based on SharePoint 2013 we had the same problem. For this case we developed a simple Helper, which can be easily adapted for SharePoint 2010. More Informationen about the helper and how to use it can be found here:
http://msscorner.de/2014/06/11/identify-which-sharepoint-2013-edition-is-in-use/
If you wanna use this Helper for SharePoint 2010, you only have to change the SharePoint 2013 SKUs with the SharePoint 2010 SKUs, which are listed above.
I hope this will help you!

How can I add parameters to a workflow in sharepoint 2007

I'd like to create a custom workflow for SharePoint 2007 (NOT 2010) in Visual Studio. My need is to have a custom parameter when this workflow is attached to the list. These would be parameters that I can reference in the Workflow, like a SharePoint ID, email, or other kind of string.
Does anyone know how to accomplish this?
Sure. They are called Workflow Association (setting default values for workflow) and Initiation (setting/modifying values when starting workflow for each item) Forms:
Association and initiation forms are displayed for users to complete
before any workflow actually starts. You can use these forms to enable
users to set parameters and other information for the workflow in
advance.
You can read Accessing Data from Workflow Association and Initiation Forms in Windows SharePoint Services 3.0 on MSDN
Somwhere on the way in the article you can encounter the following sentance:
The code shown below is based on the Feedback Collection workflow
sample that is provided with the Windows SharePoint Services 3.0 SDK
To have these examples at hand, i would suggest you download and install (so you can see how it's done by yourself):
Windows SharePoint Services 3.0: Software Development Kit (SDK)
SharePoint Server 2007 SDK: Software Development Kit (if you use
MOSS)

SharePoint workflow to XAML?

I have one workflow deployed on SharePoint server.
Now can I reverse engineer that and create (workflow)XAML out of it?
if yes how?
SharePoint 2007 does not support reuse of XAML/SharePoint Designer Workflows. I have not see people succeeded doing so, as it is designed in such a way that WF is pinned to a specific list or Doc Lib. But same process is supported in SharePoint 2010.

Resources