0

This is all within a single SharePoint Online site collection. I have a 2013 workflow built in SharePoint Designer 2013. Its purpose is to write from a list in its site, to a list in a parent site. To do this I needed to do the whole process of getting the request digest by posting to _api/contextinfo, which works fine. I can even log the request code without issue:

Stage:Get Security Context
    Build {...} Dictionary (Output to Variable: contextHeaders )
    App Step
        The actions of this step can read from and write to all items in this site.
            Call https://tenant.sharepoint.com/proj... HTTP web service with request (ResponseContent to Variable: contextResponse |ResponseHeaders to responseHeaders |ResponseStatusCode to Variable: responseCode )
            Log Got user context info.  Results: [%Va... to the workflow history list
    Get d/GetContextWebInformation/FormDigest... from Variable: contextResponse (Output to Variable: digestValue )

Not an issue. However, when I go to POST the list item to the parent list it behaves in a confusing way.

Else
    Call https://tenant.sharepoint.com/proj... HTTP web service with Variable: RequestContent (ResponseContent to Variable: ResponseContent |ResponseHeaders to responseHeaders |ResponseStatusCode to Variable: responseCode )
    Log Results: [%Variable: responseCode%] to the workflow history list
Get d/GUID from Variable: ResponseContent (Output to Variable: parentGUID )
Log Got parent record GUID: [%Variable: p... to the workflow history list
Set PortfolioParentRecordGUID to Variable: parentGUID

If the response is ANYTHING other than one of the 200 codes, the program logs correctly and proceeds with the workflow. If however, the Http request completed correctly (with what I can assume is a 201 code), the workflow stops immediately. It will not even log plain text immediately following the request step. I have played with this extensively. Log steps placed right before the http step do work. Anything after the http request silently fails.

I have no idea what is going on, as the other http request used in this flow reports and continues regardless of the type of response given, but this single one fails to continue when it succeeds.

A couple things of note:

  1. I have confirmed that the bugged request is succeeding, because the list item is added to the parent list correctly.
  2. I have tried moving the http step to other areas of the code, other blocks, and have removed and rebuilt it several times. The same results persist. I have tried deleting and remaking the variables used to store the responseCode as well.

Debugging is really hard to do in workflows when the logging steps themselves wont fire.

1 Answer 1

0

I have solved this error. Somewhat embarrassingly, the accept header was misspelled applciation/json;odata=verbose. Correctly spelling application/json fixed the problem.

This is definitely worthy of leaving as an answer here though because regardless of how the request was responded to the workflow should not just terminate. It seems that by not properly receiving a response the workflow simply silently terminates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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