Calling Web API

Hi,

 

I have a Web API which Start a Process (To Generate a text document with request and response).

with(
a!startProcess(
processModel: cons!PG_TEST_DOCUMENT_GEN_PROCESS_MODEL,
processParameters: a!fromJson(
a!toJson(
http!request.queryParameters
)
),
onSuccess: a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(
name: "Content-Type",
value: "application/json"
)
},
body: a!toJson(
fv!processInfo
)
),
onError: a!httpResponse(
statusCode: 500,
headers: {
a!httpHeader(
name: "Content-Type",
value: "application/json"
)
},
body: a!toJson(
{
error: "There was an error starting the process"
}
)
)
)
)

I want to know how I can call this Web API in local variable within my expression rule.

Example:

with(

local!request:"sample request",

local!response:"A Rest based Web service call",

local!generateDocument: "Call web API to generate document"

)

Thanks

  Discussion posts and replies are publicly visible