Web Services

An application is using web services and can be accessed by getPro.aspx and listPro.aspx (URL: server:port/.../getPro.aspx)
Using tools like postman, we can access (post and retrieve) the web services without authentication or any further attributes other than the URL.
If we do a get, we can pass parameters to get specific information.
1. How could I use these in Appian Web Service Smart service or HTTP Query Smart service or scripting.
a. retrieve information (GET) from the web service
b. post information (POST) from Appian to the web service

2. set up a web service listener in Appian to accept data posted by the other application web service which triggers
a. Save to database
b. Initiate a process model

OriginalPostID-266881

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    @eltonr we have few expressions which will help you, interacting with GET and POST service

    For GET
    =======
    httpQuery()

    For POST
    ==========
    httpWrite()

    However we have some additional Shared component, which makes our job more easy, named as "Send HTTP Request Plug-in" which provides httpget() for retrieving information from GET, httppost() for posting information from Appian to the Web service using POST

    Please explain point no: 2 in detail
  • For second point -
    1) You can publish your process model as webservice which external system will call to send data. This way your process first node will be saving data in DB and then invoke your business process.
    2) You can create a web api which has logic to initiate a process model and it will be exposed as REST service which can be invoked from external systems.
    3) Create a process model which has a recursive timer event of 1 hour which invokes the external system and fetches data in batch and initiates the process model.
    4) Or May be write a JMS message from external system and create a receive message event in Appian which will receive message and initiate process model.
  • Thanks Alok and Sagar, For Item 2. there are two applications..
    a. Appian would have a web service that once data is received saves directly tot he database
    b. Appian would have another web service that when the data is received, it spawns a process model and triggers tasks for user to accept or reject data sent. The response is sent back to the "sending" application along with other details e.g if rejected, why; if accepted, the who approved it. (I am assuming that the httpWrite() function can be used for this.
  • 0
    Certified Lead Developer
    @eltonr what i understood from you above comment is, you are getting the response from a webservice and once you get the response, you are starting a process, which will have a User Input Task, which assigns a Task to a Group/User, where user will accept the Reject the request, so the same approval status along with few more data you are wanted to send to the service.

    Here i have 2 questions:
    1) Whats the Method for this service, from which you are getting the response, before spawns of a process model, i believe it's GET, however let us know the method of this Service, as you can use httpWrite() only for POST call, where you need to send the Body

    2) Do you want to send the approval status along with few more data to the same service from where you have got the response before spawns of the Process Model.