+1
Answered

object/domain mapping

edwin 5 months ago in Studio • updated by Genie 5 months ago 4

Hi, 


How do you suggest we do object/domain mapping in warewolf? 


Thanks

Answer

Answer

Hi Edwin,


Thanks for the extra information. That is a great use case for Warewolf. So at a basic level using the example above, I would do the following:


Create a Warewolf service for each "Read" action i.e. a Warewolf service to read from the db, one for the POS and one for the Bookings in each of these you would mark the data retrieved as outputs and any inputs and that would be needed to filter or need to be passed to the source endpoint.


Then I would create a "GetCustomerService" that takes an input(s) to identify a customer. You would then call each of your "Read" action services and mark only the data you are interested in as outputs.


This is a rough outline of how to implement it. If you require further help, please let us know.


Thanks 

Under review

Hi Edwin,


It would depend a lot on what you mean/context of the object/domain mapping you are speaking about? If you could provide some detail on the problem you are trying to solve, that would go a long way in helping us assist you,


Thanks

Let's say we want to expose a "Customer" service, and we need to aggregate information from a few different sources:


From database1:

- Field 1

- Field 2 

- Field 3


From POS System: (Rest API)

- Tab Limit


From CRM System: (Rest API)

- Bookings



What we want to expose is similar to:


- FirstName => database1.Field 1

- LastName => database1.Field 2

- DOB=> database1.Field 3

- Tab Limit => POS.TabLimit

- HasBookings => CRM.Bookings.Count >0 




Thanks


Answer

Hi Edwin,


Thanks for the extra information. That is a great use case for Warewolf. So at a basic level using the example above, I would do the following:


Create a Warewolf service for each "Read" action i.e. a Warewolf service to read from the db, one for the POS and one for the Bookings in each of these you would mark the data retrieved as outputs and any inputs and that would be needed to filter or need to be passed to the source endpoint.


Then I would create a "GetCustomerService" that takes an input(s) to identify a customer. You would then call each of your "Read" action services and mark only the data you are interested in as outputs.


This is a rough outline of how to implement it. If you require further help, please let us know.


Thanks