Skip to main content
sunus0001
October 28, 2021
Question

Web API that connects to process model -I need to pass input parameter different and get a different output parameter can anyone help me out?

  • October 28, 2021
  • 8 replies
  • 0 views

Hi Appian team,

Web API that connects to process model -I need to pass input parameter different and get a different output parameter can anyone help me out with this , now whatever am passing as input parameter to processparameter same am getting as output parameter as process info.Please edit below code accordingly

below is the currently used web API code snippet:

a!startProcess(
processModel: cons!xxxxxxxxx
processParameters: {
xxxxxxxxxx : a!fromJson(
http!request.body
)
},
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"
}
)
)
)

8 replies

selvakumark
October 28, 2021

Hi,

I think you are expecting to get the processed results from the process model. If so, you have to do activity chaining up to the node where the data is processed.
docs.appian.com/.../Process_Model_Recipes.html

sunus0001
sunus0001Author
October 28, 2021

Hi Selvakumar,

No am not asking that right now what ever i passed as input the same parameters am getting as output parameter in WEB API,how can i pass input parameters different and get a different output parameter.

selvakumark
October 28, 2021

Sorry I'm not getting what you mean by passing different input parameters. Seems like you're passing a JSON text as API's request body. Do you want to pass data other than that? Then you can make use of query parameters.

And what do you mean by different output parameters?