I call an Appian WebApi from an external application. It's a webapi to upload a document. Upload work fine but I want to start a process and an parameter of my process is a value stored into the header of the request. IO can't retrieve this value. To test I return it in httpresponse.
a!httpResponse( statusCode: 200, headers: { a!httpHeader( name: "Content-Type", value: "application/json" ) }, body: a!toJson({ "id": document( http!request.body, "id" ), "originalId": index(http!request.headers,"AppianDocumentId",0), "user": http!request.headers.user }) ),
OriginalId and user are always null.
If I use the TestRequest, value are present.
Also If I just return request.headers, values are well returned.
Discussion posts and replies are publicly visible
Hi there, have you referenced our documentation? docs.appian.com/.../passing-a-web-api-document-into-a-process-model.html
If originalId is something you sent to Appian, you may want to consider storing it in a local variable at the top of your web-api
I know this page. It is I do. Now I'm using queryString in place of headers and it works.
I am trying to achieve it. Could you tell me how you process the values from queryString in the web api ?
Just use http!request.queryParameters.xxxx