Here is the thing:
1. I setup and config the SP 2013 on a Server
2. I add a web application of SP 2013 called Http://mySPsite2013 and a subsite called Http://mySPSite2013/mySubsite
3. I find the Workflow 2013 is not configed by default, so I go to the web platform to install and config the Workflow Manager 1.0
4. Everything goes well until I use the SPD 2013 to add a List workflow on the subsite Http://mySPSite2013/mySubsite
5. I'm not using the System\Account, and the Command I have runed:
Enable-SPFeature -Identity WorkflowServiceStore –Url http://mySPsite2013
6. I can successfully add and publish the SP 2013 workflow(2013) on subsite, but when I try to add a List item and trigger the workflow, the workflow will start but will not complete.
7. When I try the same list workflow on Main Site Http://mySPsite2013, the workflow worked.
8. I go to the Center Admin and Add a new web application called http://myTestSite2014:8000, on this site I create a subsite and both main site and sub site works find for the SP 2013 workflow(2013)
9. The workflow is very simple, it's a list workflow, and the workflow will log a "string" into the workflow history list when it triggered, so I believe it is not the workflow issue.
My main point is, the first web application http://mySPsite2013 is added before I config the Workflow Manager 1.0 for SP workflow(2013), then the workflow is not complete for the subsite. But the web application http://myTestSite2014:8000 is configed after workflow(2013), then everything work find.
I googled for a week and try lots of ways, but it still not working for the subsite.
I check the WorkflowDBlog table by SQL Query
select * from WFInstanceManagementDB.dbo.DebugTraces
order by CreationTime desc
The error log is this.
Attempt 9 of the HTTP request to 'http://mySPSite2013/mySubsite/_vti_bin/client.svc/sp.utilities.utility.ResolvePrincipalInCurrentcontext(input=@ParamUser,scopes='15',sources='15',inputIsEmailOnly='false',addToUserInfoList='False')?@ParamUser='i: