How to approve the requests exposed as a web-service from Appian?

Hi All,

I have exposed a web-service from Appian which contains all the requests which are in pending status of not getting approved. I want to approve some of the requests from the web-service exposed. How can i achieve this? Can anyone help me on this.

  Discussion posts and replies are publicly visible

Parents Reply
  • Of course it's possible, I just don't understand why it's "a requirement". What is being able to achieve this outside of Appian giving, in terms of value, to the Users?

    Assuming this requirement cannot be challenged, you need to do as I said: treat the two stated aspects as TWO different WebAPIs: one to get the list to be approved, and the second to implement the actual Approval. Depending on your requirements you may design the second to approve only one Approval at a time, or approve an array of Approvals in a batch.

Children
  • Can u please let us know how to implement the second Web API where the approval/ rejection actions can be performed? 

  • The basic principle is that you need a value that correlates with the individual Approval available in your first Web Service, and that your second WebAPI will receive that value and update the Approval to be either Approved or Rejected. AT this point it depends on what your implementation is of an Approval. If it's a database entity, then your WebAPI can make a call to the Database using a!writeToDataStoreEntity() - you'll need to fetch the whole case first (which is why you need the correlating value), and change the value that represents the case status (Approved, Rejected) before writing it back to the database.

    If you have a different implementation of your Approval case then the design principle holds true but the details of how to find and update the case might be different.