SharePoint 2013 Workflows are not working issue

If you are facing following symptoms and your workflows are not working ;

01/17/2014 16:29:17.11 w3wp.exe (0x1740) 0x1500 SharePoint Foundation Authentication Authorization ajmmu Medium Permission check failed. asking for 0x10000, have 0x2000000000
01/17/2014 16:29:17.11 w3wp.exe (0x1740) 0x1500 SharePoint Foundation CSOM afxwb High System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.     at
Microsoft.SharePoint.SPSecurableObject.CheckPermissions(SPBasePermissions
permissionMask)     at Microsoft.SharePoint.Client.SPClientServiceHost.OnBeginRequest()
at

01/17/2014 16:29:17.13 w3wp.exe (0x210C) 0x2648 SharePoint Portal Server UserProfiles ae0sx Unexpected
Error trying to search in the UPA. The exception message is ‘Microsoft.Office.Server.UserProfiles.UserProfileApplicationNotAvailableException:
UserProfileApplicationNotAvailableException_Logging ::UserProfileApplicationProxy.ApplicationProperties

RequestorId: 688a2648-fa2d-617b-b6ef-c5059d97480d. Details: System.ApplicationException: HTTP 401 {“error_description”:”The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.”} {“x-ms-diagnostics”:[“3001000;reason=\”There has been an error authenticating the request.\”;category=\”invalid_client\””],”SPRequestGuid”:[“688a2648-fa2d-617b-b6ef-c5059d97480d”],”request-id”:[“688a2648-fa2d-617b-b6ef-c5059d97480d”],”X-FRAME-OPTIONS”:[“SAMEORIGIN”],”SPRequestDuration”:[“18″],”SPIisLatency”:[“2″],”Cache-Control”:[“private”],”WWW-Authenticate”:[“Bearer realm=\”ada7f9dd-5619-496c-9ad2-03bec5bb978e\”,client_id=\”00000003-0000-0ff1-ce00-000000000000\”,trusted_issuers=\”00000005-0000-0000-c000-000000000000@*,00000003-0000-0ff1-ce00-000000000000@ada7f9dd-5619-496c-9ad2-03bec5bb978e\””,”NTLM”],”X-AspNet-Version”:[“4.0.30319″],”X-Powered-By”:[“ASP.NET”],”X-Content-Type-Options”:[“nosniff”],”X-MS-InvokeApp”:[“1; RequireReadOnly”],”MicrosoftSharePointTeamServices”:[“15.0.0.4481″],”Date”:[“Fri, 17 Jan 2014 16:04:05 GMT”]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Check for your

TroubleShooting Steps:
1) Check that your SharePoint 2013 has latest CU has installed.
2) Check that Workflow Manager and Service Bus features has latest patches.
3) User Profile Service Proxy is up and running and the related Web Application has connected this service Proxy .

You can reset Proxy connection as below:
CA-> Application Management -> Manage Web Application
Select related your web application
Click Service Connections on the ribbon
Deselect/ Reselect UPA Proxy service connections.

4) Check and define all your Web Application’s Application pool , STS Service Application pool , UPA Service Application identities.

findstsapppool
5) Open CentralAdministration -> Application Management -> Manage Service Application
6) Select User Profile Service Application
7) Click the Permissios button on the ribbon
8) Add if any missing account belong to Web Application’s ,STS Service’s or UPA Service Applications’s pool identities with Full Control.

UPAPermissions
9) Open Central Administration -> Services on Server
10) Restart
*User Profile Service
*User Profile Syncronization Service .

ResetUPAServices

 

 

 

 

 

December 2013 CU for SharePoint 2013 has been released

Be aware that all Update for SharePoint 2013 require March 2013 PU for SharePoint 2013 to be installed first.

Please also have a look at the article that discusses how to properly patch a SharePoint 2013 farm which has Search enabled.

ATTENTION:

Previous releases of the SharePoint Server 2013 cumulative update included both the executable and the .CAB file in the same self-extracting executable download. Because of the file size, the SharePoint Server 2013 package has been divided into two separate downloads. One contains the executable file (identified as ubersrv2013kb2850024fullfilex64glb), while the other contains the .CAB file (identified as ubersrv_1). Both are necessary and must be extracted to the same folder to successfully install the update. Both are available by clicking the same Hotfix Download Available link in the KB article for the release.

See the KB article of the SharePoint Server CU for more details.

KNOWN ISSUE:

After installing the SharePoint 2013 Server December 2013 CU PerformancePoint Dashboard Designer no longer loads. When you try to open Dashboard Designer in SharePoint 2013, you receive an error message. You should not install the SharePoint Server 2013 CU listed below if you need PerformancePoint Dashboard Designer.

See the KB article of the SharePoint Server CU for more details.

For More Info:

http://blogs.technet.com/b/stefan_gossner/archive/2013/12/20/december-2013-cu-for-sharepoint-2013-has-been-released.aspx

 

How to remove “Open this webpart page in maintenance view” message

Assume following scenario

1. Add wiki page in wiki page library
2. edit properties of this page, there is an message

“Open this web part page in maintenance view to delete the problem web parts and remove the personal settings.”

at the bottom of the editing property page.

wmm0

this message is usually a false alarm but it can make users annoying. You can remove this message by using JQuery easily.

  1. Integrate the Jquery with your master page.
    http://blogs.msdn.com/b/yojoshi/archive/2010/06/17/using-jquery-with-sharepoint-2010.aspx
  2.  Go to the related Library Settings -> Advanced Settings.
  3. And select “Launch forms in a dialog” option to “no” and click ok.That would provide to open dialog boxes as a page and you can use the ribbon to change edit mode of the editform.aspx page.

    wmm1

  4. Find the item in the library and Click edit Properties
    wmm2
  5. Click Site Actions -> Edit Page while EditForm.aspx in browsing.
    wmm3
  6. Add a “Content Editor” web part to related Document Libraries’ EditForm.aspx
    wmm4
  7. Click HTML-> Edit HTML Source
    wmm5
  8. Type following Script inside of the HTML Source Windows.

    <script type=”text/javascript”>
    $(document).ready(function() {
    $(“a:contains(‘Open Web Part Page’)”).parent().css(‘display’,’none’);
    });
    </script>

    wmm6

  9. Click OK and Save the page. IF everyhing is ok you shouldn’t able to see the WebPartMaintenace Message like below.

    wmm7

  10.  Go to the related Library Settings -> Advanced Settings.
  11.  And select “Launch forms in a dialog” option to “YES” for revert back and click ok

SharePoint 2013 Workflows – Requirements

If you are interested in SharePoint 2013 Workflows. I can say SharePoint 2013 workflows has never been powerful as before. Which is come us with a tremendous improvement and completely new architecture. As every new System and new architecture brings new problems as always been , thats the nature of the new releases , so before going into dark side , you have to sure that you have working with last updates.

For the overview of SharePoint 2013 Workflows you can find more info from MSDN:

Workflow Manager 1.0:
http://msdn.microsoft.com/en-us/library/windowsazure/jj193528(v=azure.10).aspx

Windows Workflow Foundation:
http://msdn.microsoft.com/en-us/vstudio/jj684582.aspx

I would like to share some important upgrade and suggestions that may prevent your pains when you try to adapting the new SharePoint 2013 workflows.

First thing is the prerequisites ;

-> Bold Lines extra requirements and fixes many issues

*Workflow Manager 1.0 RTM (Shipped with SP2013 RTM)
*Workflow Manager 1.0 Service Pack 1
*Workflow Manager 1.0 Client for SharePoint 2013 Servers .
(If you installing Workflow Manager 1.0 via Web Platform installer it is automattically installs if your machine already installed SharePoint 2013)

*Service Bus 1.0
*Service Bus 1.0 Service Pack 1

I would suggest to use Web Platform Installer for install and setup and tracking for new upgrades for Workflow Manager and Service Bus.

*SharePoint 2013
*SharePoint 2013 and at least March PU update.
http://www.andrewconnell.com/blog/Workflow-Improvements-Changes-SP2013-March-PU-and-RTM-Developer-Tools
*I have suggested that Install Latest Current CU (Currently October 2013 CU for SharePoint 2013)

 *.Net FrameWork 4.5 (It is also SharePoint 2013 prerequisites)
*Always check the .Net FrameWork 4.5 Hotfixes.

For Developers :

*Visual Studio 2012 with latest Upgrade
*Office Developer tools for Visual Studio 2012 RTM (Again use Web Platform Installer for tracing new updates)
*Worflow Manager Tools 1.0 for VS 2012 (
If you installing Workflow Manager 1.0 via Web Platform installer it is automattically installs if your machine already installed VS2012)

 

Here Some other Suggestions;

* When after you register your workflow service as below command:

Register-SPWorkflowService -SPSite “http://blog.bugrapostaci.com” -WorkflowHostUri “http://workflow.bugrapostaci.com:12291” -Scope “Workflows” -AllowOAuthHttp
Make sure that you are using -WorkflowHostUri as full FQDN name , otherwise you may face some funcy Access denied issues.

*When you are using developing or testing don’t use System account. You may face also some System.Unauthorize exceptions which is also described technet it is not supported.

*Sometimes when you are working with Visual Studio you may face your latest build doesn’t deployed to the farm. That is a VS Caching problem. Always use latest VS bits. (Restarting VS or killing vshost exe can fixes that issue on next deployment)

How to ensure the SharePoint 2010 workflows end in given period

Many question has been asked about this problem.

in SharePoint Best Practices;

* For performance consideration ; you have to plan your timer jobs will always finish on time.
* You need to choose appropriate schedule interval to do it.

But this is not suitable for every condition ; Let me give some information about the issue.

You have planing to develop a custom timer job  for example this job has responsible to get some remote data from a remote System in 1 minute interval .
And what if the remote operation has taken more than 60sec. or what if that the timer job has faced with some problems and not getting finished itsjob in given period. You got the idea 🙂

In some conditions ; you may need to ensure no matter what ,the timer job has to be finished its job in given period . and If doesnt , you may want to terminate the running instance of the timer job and start a new instance of it.

The problem is here ;

If a timer has over its period and continue to running ; After the period has elapsed the new instance wont be started by  default behaviour of the SharePoint.
In SharePoint there is no way to run  two instance of a same timer job definition at same time

And even you have implemented some control logic in that timer job which responsible for the check and terminate if previous instance has running to stop it. It doesnt work because the timer job code wont be run again so it is never step through the SPTimerJob.Execute() method one more time.

And there is no way in OOB configuration to provide this functionality.

Resolution;

Resolution of this problem is easy but tricky. First you need to have 2 timer job.

EnsureTimerJobFinished

1)  Controler Timer job: (Scheduled) Has responsible to run worker timer job in defined interval and responsible to timing. (if the worker timer job has still running it can kill the previous one and start a new instance)

2)  Worker Timer Job. (Once) : Does the execute actual operation.

3)  If the Controler has detected that the previous instance of the worker timer job still running. It can terminate it. (Or you can extend your solution and make your own decision here)

4) After termination , The Controller can run another instance of the worker timer job.