SharePoint 2013 cancel Workflow but page workflow status unchanged - sharepoint-2013

I have created a custom workflow solution that I deployed to my SharePoint publishing site.
Using CSOM and C#, I have written some server side code that will cancel a running workflow on a publishing page. I know my code works because the workflow completes and I have sent a payload message to my workflow which shows up in the logs.
But when I open my site in a browser and navigate to the /pages/forms/Allitems.aspx page, I see a list of pages within that site.
So far so good.
But a closer look shows the approval status column of draft.
Why is that as I thought canceling the workflow would update the page's approval status column automatically.
Tom

Cancelling a workflow does not change the approval status column. You can first update the status, and then cancel your workflow.

Related

how to maintain current state of the web application when refreshed and not navigate to the starting page?

I am new to web development. I have few requirements for a web application.
I have two Qualtrics surveys and the flow of the application is that a user lands on the first survey and upon completing it gets redirected to a chat room and then to the second and final Qualtrics survey. The whole flow is also created as a task for workers on the Amazon Mechanical Turk.
When a user refresh the first survey(in any of the 4 pages of the first survey), it maintains the current state as well as the selected answers and it doesn't navigate back to the Introduction page of the first survey. But when a user refreshes from the final survey, it lands the user on the Introduction page of the first survey. It only happens when I deploy the whole flow into Amazon Mechanical Turk. When I test the whole flow without deploying on Mechanical Turk, it doesn't redirect the user to the first survey upon refresh and behaves as intended.
As far as I can understand Mechanical Turk must be overriding the Qualtrics way of maintaining the page state. Now I am unable to figure out how to solve this. I can only use Qualtrics JS API to solve this but if MTurk is causing the issue, it won't do any good. Any suggestions on what might be the issue and how to solve this?

Azure LogicApp runs webjob and send email

I want to create an Azure LogicApps that has to launch and verify the status of a webjob. This is because I want to take an action if the webjob finishes its activities with an error and, in this case, the LogicApps has to send an email with an alert and restart the webjob.
I have tried to find some documentation about it on LogicApps site and in the editor but I can't find any connectors.
Any ideas, documentation or samples? Thank you
I thought my way could meet your requirements.
You could use a HTTP trigger to get the latest_run property with GET method. The URI would look something like https://{webapp-name}.scm.azurewebsites.net/api/triggeredwebjobs/{webjob-name}/. Then click advanced options, choose Basic Authentication. You could get username and password from publish profile or go to Webjobs on the Kudu then click the Properties. The trigger would be like the pic shows.
Then add a compose action, use HTTP Body as Inputs. After this , you could judge the status property. The whole flow would be like the below pic.
Note:when you use condition to judge status, you need to switch Designer to Code view, then change the value. The value should be "#outputs('Compose')['latest_run']['status']". Or you could refer my code view page.
Hope this could help you , If you still have other questions, please let me know.

Sorry this site has not been shared with you

Windows Standard 2012 R2
SharePoint Foundation 2013
SQL Server 2014
I have a SharePoint Application page that is throwing the above error when clicking on any Button on the page. I even added a button with nothing in the method and still get the above error.
Note that I am NOT challenged when accessing the Application page initially and am NOT challenged when clicking the button. None of the code in the original method gets executed. In fact, it appears that the page cycle is never processed. I have logging in the method, the page_load even and in the page_unload event and nothing is logged.
The site is configured for claims authentication and I have verified that my account, application service account are both in Owners and both are admins on the box. Application Service account has SYSadmin on the SQL server (also located on the same box).
I changed SharePoint to allow access requests and to send me an email for those requests. Now the page shows:
The website declined to show this webpage
HTTP 403
Most likely causes:
•This website requires you to log in.
Any suggestions?
One more thing: this is a one-page application. There are no redirects, etc. within the page/application.
Thanks,
John
Turns out this was a permissions issue for the application service account. Never could find out specifically where but reverted to a previous service account and it works now.

Facebook Page Webhook stopped working. It was working from last 1 year

We have configured webhook in facebook app earliear.
After subscribing the facebook page we were able to receive real time update on our server from facebook page.
Now webhook was stopped working.
We are not getting any real time update for new post from facebook page.
We have pre-configured setup as per bellow guide:
https://developers.facebook.com/docs/pages/realtime/
I'm able to view that my page has installed my app by using bellow sample api:
GET graph.facebook.com/PageID/subscribed_apps
But not getting real time update
Any help will be appreciated.
In general, if a webhook stops working: For Remove the webhook, and then add it again. (This helps in most such cases. Facebook will stop sending updates if your endpoint is too slow to respond or responds with errors over a certain period of time.)
One thing to add,My facebook app is not live but it has been working from last year.
If you want updates from a “live” page (as opposed to one created by a test user), you need to set your app live now as well.
Previously apps in dev mode were mostly unrestricted, but with the current changes in light of Cambridge Analytica, they changed that.

Workflow error in Sharepoint Online

I am having this error in Sharepoint Online when I run a workflow to create an Enterprise Project from a list
The details of the error was
Retrying last request. Next attempt scheduled in less than one minute.
Details of last request: HTTP Forbidden to
https://xxxxxxxxxxxxxx/sites/pwa/_api/ProjectServer/WorkflowActivities/CreateProjectFromListItem(webId='923e34ac-7127-4707-b6e1-83ac3235ef67',listId='a352ed9d-3b99-4405-b2a3-2fc3c2678335',itemId='2',eptId='09fa52b4-059b-4527-926e-99f9be96437a')
Correlation Id: f9d2736f-8a66-4425-a5cc-cb30adf980ff Instance Id:
3e7695ad-5913-4bb0-b6c8-cbf29e4e877a
PJClientCallableException: GeneralSecurityAccessDenied
GeneralSecurityAccessDenied
I tried changing my workflow to just send an email to check whether there is something wrong with the workflow but emailing work
I suspect it has something to do with the workflow engine service user (if there is such a thing) trying to create and Enterprise Project.
I and the admin so I have the full access but for some reason the workflow is running as a different user on my behalf.
It is a simple workflow and it looks like this
And the list looks like this with its mapping with the Project Web App Fields
Any reasons why this is happening?
How do I resolve the issue?
If its a workflow service user what is the user that I can give full access to creating Enterprise Projects
Since this is SharePoint Online we are talking about it leverages Azure Workflows. Impersonation is discontinued in SharePoint Designer so you will have to use the App Step, to do that you will need to first to activate Allow workflow to use app permissions feature, then create App Step action where you will place your create project action.
You can find more information on how to add App Step as well as how to setup permissions here:
App step in SharePoint Designer
(MSDN) Create a workflow with elevated permissions by using the SharePoint 2013 Workflow platform
Do you have schedule template associated with your EPT?
if yes, then you have to include that template to that group's category within selected projects section.
Go to the category of that user's group, select the project template and include it into selected projects.
You can find steps and details in this blog by my colleague: http://www.epmpartners.com.au/blog/sharepoint-list-workflow-failing-when-creating-project-from-list-item/
hope this helps.