How to open view form through startprocess webapi

Hello Devs,

I have created a webAPI of template type : "StartProcess". Now this webAPI is starting the process when triggered but I want to open a form as a result of it. How can I achieve that? 

Do I have to handle it inside body ? inside httpResponse of onSuccess? how to achieve that. Here is my current code for the webAPI:

a!startProcess(
processModel: cons!PFM_APPIANFORMTOLAUNCHROUTER_PM,
processParameters: {
formToLaunchLabel_txt: http!request.queryParameters.formToLaunchLabel_txt,
formToLaunchParameters_txt: http!request.queryParameters.formToLaunchParameters_txt,
processInstanceAppianId_int: http!request.queryParameters.processInstanceAppianId_int,
},
onSuccess: a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(
name: "Content-Type",
value: "application/json"
)
},
body: a!toJson(
{
taskID:getactivetaskidsforprocess(
fv!processInfo.pp.id
)
}
)
),
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"
}
)
)
)

  Discussion posts and replies are publicly visible

Parents
  • To open Appian tasks or forms, the user must visit the Appian site, As stefan mentioned, you can provide a link to the task or other resources. Howeven if you've created a Web API, I assume your goal is to complete the work within the external system itself, if thats the case you can use Embeded inetrface's functionality provided by Appian.

Reply
  • To open Appian tasks or forms, the user must visit the Appian site, As stefan mentioned, you can provide a link to the task or other resources. Howeven if you've created a Web API, I assume your goal is to complete the work within the external system itself, if thats the case you can use Embeded inetrface's functionality provided by Appian.

Children
No Data