Issue with 'Find a document by path or GUID

I am having problems running the connector.

When using the correct Document GUID (either with or without the curly brackets) The connector fails with a 'BadGateway' error.

    "code": 502,
    "source": "uk-001.azure-apim.net",
    "clientRequestId": "bf53866f-0f29-4393-9b77-17350fb878c7",
    "message": "The response is not in a JSON format.",
    "innerError": "Cannot read server response."
  }
}, clientRequestId: bf53866f-0f29-4393-9b77-17350fb878c7

If I enter an incorrect GUID the connector returns a 'Document NotFound' error as expected - although the full error does not seem right:-

"statusCode": "notFound",

"error": {
"message": "Folder with path '' not found."
The connection is working as it is using the same values as other Document Creation and modification connectors which are running ok.
Has anyone else had success with this connector?
  • Hi Peter, 

    First part #2 with incorrect GUID... you probably have provided a malformed GUID (i.e. one with missing character, or extra characters) so Flow treats it as path to a document and not a GUID, hence the error.

    To test with correct GUID please do this:

    1. Create a Find document action and manually navigate to THAT document (there is a picker control on the right of the input field. Sometimes it takes a few seconds for Flow to load it, so be patient!). This will fill in the path. Does it work?

    2. If step #1 works, then add second Find by GUID and use document GUID variable from #1. Does it work?

  • I'm having a similar issue with the Fetch documents by saved search. Works fine when the search returns nothing but when the search returns a dociment(s) I get the same error. The error message seems to indicate that the response from the server is not valid json.

    îžş
    BadGateway.
    
    4 retries occurred.
    View

    INPUTS

    ProjectWise Project
    MTX-D-001 - Infrastructure Upgrades
    Connection
    Infrastructure Projects
    Saved Search
    ./Saved Searches/Global/Waiting for Approval
    Environment for result
    BS1192 Document Attributes

    OUTPUTS

    Status code
    502
    Headers
    Key
    Value
    Timing-Allow-Origin
    *
    x-ms-apihub-cached-response
    true
    Date
    Fri, 31 May 2019 04:57:32 GMT
    Set-Cookie
    ARRAffinity=069c15e49204eb27ef45f864b390545b41f4daf5e364ab5b01ef1dd5fa890037;Path=/;HttpOnly;Domain=connect-projectwiseflow.bentley.com
    X-Powered-By
    ASP.NET
    Content-Length
    410
    Content-Type
    application/json
    Body
    { "error": { "code": 502, "message": "{\r\n \"error\": {\r\n \"code\": 502,\r\n \"source\": \"australia-001.azure-apim.net\",\r\n \"clientRequestId\": \"f18427cc-26e6-48fd-96f3-1fa370fc7f1a\",\r\n \"message\": \"The response is not in a JSON format.\",\r\n \"innerError\": \"Cannot read server response.\"\r\n }\r\n}, clientRequestId: f18427cc-26e6-48fd-96f3-1fa370fc7f1a" } }
    Condition
    0s
    îžş
    ActionConditionFailed. The execution of template action 'Condition' is skipped: the 'runAfter' condition for action 'Find_documents_by_saved_search' is not satisfied. Expected status values 'Succeeded' and actual value 'Failed'.
    If yes
    Send me a mobile notification 2
    0s
    If no
    Send me a mobile notification
    0s
  • We have noticed that in some situations saved search fails when document attributes are requested. The work around for this problem is to select no environment in Find documents by Saved Search. The action will return documents but without environment attributes. If you need attributes, you can use Find Document by path or GUID action for each single document.

    It is a known issue and will be fixed in future versions of ProjectWise/WSG.