0

I install and configure workflow manager and register it to sharepoint 2013. I create a very simple workflow to set a column. and I set that workflow can start automatically when an item added or changed. when I add an item, select it and click on workflows button of list item ribbon, the workflow is on started mode, after about one minute it’s status changed to canceled without any errors. What’s wrong?? How could I debug it and find the problem???

I did not configure user profile service, Is this necessary to workflows??

Any idea???

Thanks in advance!

1

UPS isn't required for workflows. That being said, what you'll want to do to debug the workflow is attach your Visual Studio instance that has your WF loaded up to the following processes:

  • w3wp.exe (the one running the right app pool account; if you're not sure which one it is, just attach to all of them)
  • owstimer.exe (there should just be one of those)

It should then hit breakpoints like any other application. Note that depending on what the workflow is doing, it could run from either process (as a general rule, asynchronous activity runs from OWSTimer and synchronous stuff from w3wp) so it's necessary to attach to both.

I also highly recommend making use of your workflow history list: write to it every time a stage has completed and especially whenever it throws an error. For the most part, any error thrown and not caught in your code is just going to cause the workflow to cancel itself with no other record.

That should at least get you started. Otherwise, I have no idea why it's dying, of course, because I can't see what it's doing, but I will say that in my experience the #1 reason why workflows die without errors is that the workflow can only store basic objects like strings and numbers. If you have, for instance, a separate SPList object that you need to access, you can't just make a global SPList variable that gets called over the course of your workflow. You would need to save, for instance, the GUID of the list globally and then call it separately in every separate function you utilize it.

  • This is good advice. Personally before I dig into the timers, I would set and check the workflow history first. Just to see where my workflow fails. More of a preference thing though. Andrey made a good point too about checking the configuration, SharePoint 2013 Workflows are a pain to setup. – Oddity Mar 17 '14 at 17:50
0

In SharePoint 2013 UPS is used for Workflow authentication, because SP2013 Workflow acts as a SharePoint App. Thus not-configured UPS could be the cause of the issue.

TechNet reference:

The user who deploys and runs a workflow must be added to the User Profile service. Check the User Profile service application page in Central Administration to confirm that the user you are using to validate workflow installation is in the User Profile service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.