Call a process from a GET Web API

Hello,

I need to build several Web API's that, besides doing their main purpose, register in the database the parameters received and the date & time that the call occurred (basically, a customized log). I've started by creating the web API's with their main purpose and then, in the same web API, to use the a!startprocess or a!writetodatastoreentity(), bu it doesn't work.

I've tried to isolate the problem and came to two main bottlenecks:

1) Can I call a smart service in web API's of the method GET?

2) Even if the method is post, is it possible, for example, to start a process AND write the data store entity in the same Web API?

 

Is there a way to do this?

 

Thank you

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    1) You can't call smart services with GET API's, only POST/PUT/DELETE methods will allow you to launch a smart service.

    2) Could you pass in the log info to the process and write to the data store inside of your process instance? To get around having to put this DSE node for the Web API log in each process you will invoke, you could create a pass-through process model that writes to the DSE and then invokes the start process node to start the relevant process model.
Reply
  • 0
    Certified Lead Developer
    1) You can't call smart services with GET API's, only POST/PUT/DELETE methods will allow you to launch a smart service.

    2) Could you pass in the log info to the process and write to the data store inside of your process instance? To get around having to put this DSE node for the Web API log in each process you will invoke, you could create a pass-through process model that writes to the DSE and then invokes the start process node to start the relevant process model.
Children
No Data