Why disabling Workflows to start automatically in SharePoint through ListSettings>Change a Workflow, does not work? - sharepoint

I had several workflows created in SharePoint Designer 2013 for SharePoint 2013, and I needed to disable some of them before "Creating New Items" in bulk by using a Quick-Edit view, so they would not send e-mails/change values/or create new items, as they were supposed to do if the setting: "Creating a new item will start this workflow.", would have been enabled in the List Settings/Change a Workflow page.
I uploaded the new records with the quick edit method, and then I whent to look for a change that one of the Workflows that I left enabled... ...long story short: Workflows that were disabled, were running... All of them!!
Does someone know why if I disable workflows through the SharePoint UI,so they DO NOT get executed automatically when adding or updating items, they still get executed when adding new items or editing values. Or why the same setting does not seems to be changed if I open the workflow configuration in SharePoint Designer 2013? Do I need to make a change in SharePoint and through SharePoint Designer so the change is honored?
To clarify: If I uncheck the box that says "Creating an item will start this workflow." through the SharePoint UI. Then, save the changes to the list, then; however, if I open SharePoint Designer I see that the box "Start workflow automatically when an item is created" IS ENABLED!!!
Does it is needed to make a change in SharePoint and through SharePoint Designer so the change is honored?

Related

How to customize SharePoint Designer Workflow Task form in SharePoint Online?

I'm trying to customize layout, add javascript and change some other visuals in SharePoint Designer workflow task form. I'm using SP Online and this is related to SharePoint 2013 Workflow (not SharePoint 2010).
Previous versions generate InfoPath or ASPX forms for each task. 2013 does not. Instead it uses content types for tasks but tasks always open in edit mode using a common EditForm.aspx located in ../WorkflowTasks/EditForm.aspx
I suppose changing this form will affect all workflows on that site, which is not the goal.
Is there a way to force SPD to create a dedicated edit form for each individual workflow task? I tried to change the Edit Form attribute on a content type used with my existing tasks but it has no effect.
I can browse WorkflowTasks folder contents in SPD and each associated content type gets a respective folder. I thought SPD would put task forms in there but that's not the case.
Anyone has an idea?
How do I go about creating SPD workflow and edit the ASPX task forms?
Thank You!
Create a custom content type based on Workflow Task (SharePoint 2013) content type.
You can then select a custom content type in your task.
See https://sharepoint.stackexchange.com/questions/171646/custom-task-forms-edit-display-new-in-sharepoint-2013-online-office-365 for additional info.

Why does SharePoint workflow fail to start when document uploaded by another workflow?

Office 365 - SharePoint 2013 Workflow
I have two Document Libraries:
Work In Progress
Archived
There is a SharePoint 2013 List Workflow Add Document attached to Work In Progress with attribute "Start workflow automatically when an item is created" set. This workflow copies the new document to the Archived library.
There is a SharePoint 2013 List Workflow Archive Rename attached to Archived with attribute "Start workflow automatically when an item is created" set. This workflow renames the new document.
Both Workflows were designed in SharePoint Designer - there is no custom code.
The Archive Rename Workflow is not starting when the document is copied by the Add Document Workflow, although it does start correctly when a document is uploaded manually through the UI.
I've seen a similar topic here [SharePoint workflow does not start for automatically uploaded documents][1]
[1]: SharePoint workflow does not start for automatically uploaded documents but that is concerned with custom code. This project cannot use custom code.
Does anyone have any ideas why the second Workflow is not being triggered?
Thanks
Edward
This is done to prevent workflow recursion. You can start another workflow using Start Sharepoint 2010 workflow action or rest api. There is one possile solution in details: http://blogs.msdn.com/b/sridhara/archive/2014/08/21/fix-sharepoint-2013-workflow-recursion-prevention-part-2.aspx

sharepoint notify new items to list

I'm creating a sharepoint hosted app, two pages, default.aspx and admin.aspx.
When I update the list in the appweb thru a function in default.aspx, I want that a notify windows will popup to the client that are watching the admin.aspx page, that a new items is added to the list.
Is that possible in sharepoint 2013?
It is not exactly the same, but I think "AJAX automatic refresh can help". See this article: http://www.rdacorp.com/2010/01/sharepoint-2010-auto-refresh-web-parts-with-ajax-options/

SharePoint designer workflow not changing after publish

I'm working on SharePoint workflow (SharePoint 2010) in SharePoint designer 2010. I was published it many times without problems. But after many publishes (I thing 30) SharePoint stop to changing workflow (I published it without any error and I can find new workflow release in SharePoint web interface).
I published new version (with new commands) but workflow still use old one. But when I modified one of commands which was in workflow previously the modification will appear in next run. I need to add to workflow new commands. My only option is to rewrite whole workflow to new one. But this is much complicated workflow and rewriting takes me long time. Is this behavior normal? Is it some bug? is there any patch or workaround?
This happens most of the time due to the caching mechanism in SharePoint/SharePoint Designer. What you need to do is the following:
Close your SharePoint Designer
Navigate to the following directory: %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
Delete everything in this directory
Navigate to the following directory:
%APPDATA%\Microsoft\Web Server Extensions\Cache
Delete everything in this directory
Open SharePoint Designer and try to publish your workflow again.
Everything should now work.
For SharePoint Designer 2013 you need to do the following steps:
Go to File > Options > General > Application Options
In the General tab, under the General header, check if the "Cache site data across SharePoint Designer sessions” is ticked. If it is, unchecked it.
Open your SharePoint Designer again and try to publish your workflows.
There is an easy workaround: You need to enable major versioning for the Workflows list. By default, that list is not visible but you still can get to the admin page:
Open SP Designer
Goto All Files
Right-Click Workflows list -> Properties
On the ribbon click Administration Web Page
On the admin page go to Versioning Settings
Enable major versioning
Save your workflow

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.

Resources