REST and support for ProDataSet inputs for invokable method calls?
 
Forums / SmartComponent Library - Developer Forum / REST and support for ProDataSet inputs for invokable method calls?

REST and support for ProDataSet inputs for invokable method calls?

3 posts, 0 answered
  1. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    11 May 2023
    Link to this post
    Is there any plans, or new ideas to get these supported? We would probably, at least, want to use them together with Business Tasks for 3rd party integration calls. We would prefer to expose REST endpoints instead of the JSDO because of easy of use. Of course we can create our own webhandlers etc. but that is more/different work.

    "Due to limitations of the ABL reflection API, we currently do not support ProDatasets passed as the input to Business Task and Business Entity methods. This limitation has been accepted in our design process as we expect a majority of use-cases for RESTful invocation of Business Task and Business Entity methods just requires to return data in ProDatasets, not to receive data. So, the only input message to the invokable messages supported through the RESTful interface is the parameter object instance. 

    As ABL reflection is not capable of providing the schema of the ProDataset parameters we've had to balance the requirement to provide the schema of the ProDataset parameters manually (through code in the Business Tasks) with ease of use. The schema of ProDataset parameters is required as the loosely typed JSON messages do not allow the AVM to securely create an input ProDataset "on the fly" without losing schema compatibility with the strongly typed Dataset's used within Business Tasks and Business Entities. "
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    11 May 2023 in reply to Patrik Wikström
    Link to this post
    What you can do already is to use an input object (JsonSerializable) with one or multiple properties of type JsonObject.

    That way you can pass as many datasets as you want as inputs with your request and READ-JSON them into your dataset.

    As the ABL does not support DATASET properties on the parameter object, this seems acceptable.

    And for being able to define parameter names and dataset names directly in the @RestMethod annotation we'd probably have to add a hell lot of additional arguments to the annotation. Not sure if that would be more developer friendly.
  3. Patrik Wikström
    Patrik Wikström avatar
    68 posts
    Registered:
    15 Oct 2018
    11 May 2023 in reply to Mike Fechner
    Link to this post
    Aah, I see. We can test that, thanks!
3 posts, 0 answered