SharePoint and workflows - sharepoint

With MOSS 2007 (the question is probably applicable to WSS as well but I'm working in MOSS at the moment) is it possible to have the same Workflow on every Pages list within the site collection?
We're deploying a site with a basic 2-stage approver workflow so I'm not developing a custom one, just using the existing Approver workflow but having 2 approval groups working sequientially (see this blog post: http://www.sharepointblogs.com/tommysegoro/archive/2008/08/18/configuring-sharepoint-moss-2007-multi-stage-approval-workflows.aspx).
The problem is that when you create a Publishing Site it gets (by default) a single approver workflow, not the one I want.
Can I have the workflow enforced across the site collection and for any child site collections? Or do I need to create my own site template (and can that even define the workflow as it's deployed?)?
Edit
Just to clarify, I'm wanting to have the ability to create a new MOSS publishing site which has some slight modifications to the standard Approver workflow which is out of the box within SharePoint. I'm not wanting to deploy a different workflow, just modify the existing.
When you create a Publishing Site you get a "Parallel Approver" workflow which assigns workflow tasks to a group called Approvers and is set to run the workflow tasks in parallel. I need to change the groups (add a new one) and set it to be sequential.

You can create a feature which will add the second work flow to the Pages library when activated using the SPFeatureReceiver class, and staple that feature to the existing Publishing Site site definition using feature stapling.
Here are MSDN posts on using feature event receivers and feature stapling:
http://msdn.microsoft.com/en-us/library/bb862634.aspx
http://msdn.microsoft.com/en-us/library/bb861862.aspx

Related

Creating subsites in Sharepoint Online on a Site generated by a Teams team

I want to create a Subsite in Sharepoint Online within a site that was automatically generated via a MS Teams team but the option to do so doesnt exist.
The option to create Subsite seems to ONLY exist if a Site was created from within Sharepoint Online.
I can understand that a workaround would be to create it as another Site within Sharepoint Online and then link the relevant Sites together under a HUB.
Am I missing something or this feature does not exist in Sharepoint Online unless I create the Subsites as Sites and then link them up via a Hub?
Thank you in advance for the help.
There is a setting in the SharePoint Online Admin Center to Hide or Show the create subsites option.
Microsoft is discouraging the use of subsites, and the creation of subsites is likely to continue to be phased out as more features and capabilities are added to Hubs. While there are still exceptions to the rule, since there are still aspects that Hubs cannot accomplish (like connecting Hubs together to a parent Hub), you should seriously consider building your solution to use separate site collections.
Depending on how the rest of your SharePoint environment is architected, a better approach would be to setup that team site as a hubsite, then create the additional site collections you need, and link it to the new hubsite. This way you kind of mimic the subsite structure ( but not all its features ) while preserving every site independent.
For more information on best practices on SharePoint site Architecture, see https://learn.microsoft.com/en-us/sharepoint/information-architecture-modern-experience.

SharePoint Online Add-In workflow tasks do not appear in "My Tasks"

I have created a SharePoint provider hosted application. In the SharePoint Add-In, I've created a custom workflow that creates tasks in a new workflow task list hosted in the App Web.
I'd like the tasks to appear in "My Sites" tasks list so that all of my tasks from SharePoint host, apps, etc. are aggregated together.
Is there any way to use the host web tasks list in a SharePoint Add-In workflow, or any way to add the App Web to the task aggregation in "My Sites"?
Do not plan anything related to My tasks as they are obsolete and will be removed soon. Actually they should be removed already (4th of September 2015). See here: https://support.microsoft.com/en-us/kb/2998445

Transferring Nintex workflows to another site

In production environment, we have a SharePoint site with some Nintex 2007 workflows. Now we need to replicate the production site for testing purposes.
The target server already had Nintex installed when I restored the SharePoint backup.
Unfortunately, it turned out Nintex license has expired on it so we're a little paralyzed.
The workflows seem to have been moved with the backup, however some workflow steps in Nintex designer show exclamation marks with this tooltip:
queryListActivity1 of type Nintex.Workflow.Activities.QueryListActivity is unrecognized by Nintex Workflow
When I activate Nintex license, how can I ensure that Nintex workflow is deployed correctly? I see the following options:
copy Nintex database to the new server and try hook it up with Nintex instance (how?);
save existing workflows on source server using Nintex Export feature and upload them on target server.
What is the best one, or are there any other options available?
The preferred method is to export your workflow from the Developer License site and then import the workflow in your newly licensed site.
Once you have imported the workflow, simply save and publish.
Be aware that copying workflows between sites doesn't always result in a working result.
For example if your workflow queries a list, the connection to the list is implicitly based on the List unique ID (GUID) on the development server. When you move the workflow to the production server the equivalent list will have a different GUID.
You will often have to open these steps in the editor and re-create the list query (pointing at the right list) to get them to run.
I would be very keen to find a tool that can migrate Nintex workflows and automatically fix up things like site URLs and list GUIDs myself.

How can I reverse engineer an existing workflow in moss

I know that we can reverse engineers sites definitions and other sharepoint moss entities but can we take a workflow that has been created via the UI and reverse engineer it to a vs.net based workflow?
Yes.
Each of the OOTB workflows in MOSS are acctually what you call "vs.net based workflows".
IE - the OOTB workflows are provisioned via features, which you can find the manifests for in 12Hive/Templates/Features.
Find the feature.xml for the workflow you want to reverse engineer and it will point you to the dll. You can use Reflector to then see inside the assembly.
On top of the VS workflow, all the OOTB workflows add .aspx initiation forms to the workflow. These forms collect the parameters (IE approver's email) that get passed into the workflow.
This should get you pretty far down your path.

Create list in existing site collection from a feature

I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some page-templates, some site columns (grouped to match each page-template) and som custom list templates etc. I have also created a site collection, some sites and pages based on my feature.
Now I have upgraded the code in my feature - I wanted a ListInstance to be created based on my custom list template. When I have upgraded my SharePoint (using WSPBuilder), the ListInstance and default data are visible if I create a new site collection, but existing site collection does not get the ListInstance and data. Is there anything I can do to update existing site collections to contain the ListInstance when upgrading?
Unfortunately your only choice here is to programmatically create the list in all existing sites in the feature's FeatureActivated method in a feature event receiver. This is a gaping hole in sharepoint's deployment model, and a painful one at that.
-Oisin

Resources