Hi Community,
I am trying to create a WEB API to run a test for an application following this link. The following is the code which uses a constant to start rule test application APPLICATION_TO_TEST.
a!startRuleTestsApplications( applications: cons!APPLICATIONS_TO_TEST, onSuccess: a!httpResponse( statusCode: 200, body: fv!testRunId ), onError: a!httpResponse( statusCode: 500, body: concat("Error message: " , fv!error) ) )
It works fine but it means the API only works for a specific application and it is not possible to inject application. So I would like to change it to the following:
a!startRuleTestsApplications( applications: http!request.queryParameters.id, onSuccess: a!httpResponse( statusCode: 200, body: fv!testRunId ), onError: a!httpResponse( statusCode: 500, body: concat("Error message: " , fv!error) ) )
The problem is the function (startRuleTestsApplications) accepts the list of applications which is environment-specific (it is application id) so somehow I need to pass Application UUID and inside the WEB API code convert it to Application id
Question is: is there any function or plugin in APPIAN which accepts UID and return application id?
Regards,
Discussion posts and replies are publicly visible
Hi mohsenm0001,We have a function but it will return you String with all the details, you need to trim rest and only get application id .getcontentdetailsbyuuid()
Hope this will work.
Thanks,Sandeep
sandeepd it worked. Thanks mate.
I have sent you one expression rule as well in your message. Please check.Thanks,Sandeep
I have got it working mate. ta