You are viewing the documentation for Blueriq 14. Documentation for other versions is available in our documentation directory.

If you want to experiment with Blueriq as a Service (BAAS) that includes a data mapping, you can start with the steps as described in the visual Call to BAAS.

Once you have that working, you can "step it up a notch" by separating the web service (interface) module and the interaction module where the actual calculation is done:

Close your project to edit your project structure, and add a new interaction module. Now make this new module your entry point, instead of the web service module. Open your project again and go to this new module, and create a domain model, the required logic elements and optionally a Flow. In the WebCalculator example, this could be as simple as one Input entity with two attributes to hold the input values, one Output entity with an attribute to hold the result, and a Decision table to do the appropriate calculations.

Your new module typically has no pages for user interaction, and even a Flow is not always needed. If you create a flow at all, it should be exposed, and it will just contain service calls to create instances and/or set attribute values and/or relations. In other words, to create all that is necessary to fill the response. 

The consequence of separating the web service (interface) module and the interaction (business) module is that you will need a data mapping between the two modules. Now that your BAAS is the service provider, the data mapping is the other way around as when you are the service requestor: Now the web service interface model is the source model, and the business model becomes the target model. Consequently, the forward mapping now translates the incoming request into understandable data for your business model, and the backward mapping transforms the resulting business data into a response that adheres to the interface contract. See also How to do a mapping

Note

The data mapping creates only thoses instances that are part of the mapping. That means singletons in the business model that are not part of the forward mapping, must be created explicitly in a flow or must be pre-defined as a static instance. And the other way round: instances that are required for the response, should be part of the backward mapping.

The web service in the configuration module determines which operations you expose. Each operation can refer to a data mapping and optionally trigger a Flow. You can only select a flow from the entry point module, and the flow should be exposed and automated (i.e. contain no pages).

When you have the data mapping in place (and used by the Web service!), you can test if the BaaS works by calling it from SoapUI, as described in the visual Call to BAAS.

  • No labels