Blank Modules Issues

  

Hi,

I'm having some issues working with blank modules.

I'm building an app which will have some features that are shared by the web and the mobile version of the app. To avoid duplication, of code i created a separated "CORE" project which will contain the resources and business logic share by the 2 app.

The core project is a blank module in which i defined some public functions that will be called from the web and mobile app. But however, I'm having issues to test this functionalities because:

  1. The queries on my public functions are to returning any results. I have tried to remove all the filters and conditions and just leave an old play "select * from a"  and still have no results when i test my query or run the app. Does it have anything to do with the fact that i cannot preview data on a table in a blank module, even if the table has data??
  2. While trying to test what was wrong with my app i also tried debug my app but even though i could hit tech breakpoints on the mobile app, i never managed to hit the break points which were on the blank module where my public functions were created.


Can someone please explain what are are the reason for those behaviors? 

  • Is there something special about blank modules that i'm missing?
  • If Blank modules are do not have access to the db and should not contain logic that queries that db and etc. Where would be the best place to put such business logic
  • or architecture to use on the development in scenarios where wish to isolate your business logic into a separate module/application.

Thanks in advance

No, I can test query or view data from a blank template module.

Can you provide oml? 

Hi Harling, 


Please find attached the oml for the module with the business processes. 

Ferox Neto wrote:

Hi,

I'm having some issues working with blank modules.

I'm building an app which will have some features that are shared by the web and the mobile version of the app. To avoid duplication, of code i created a separated "CORE" project which will contain the resources and business logic share by the 2 app.

This seems a standard approach to reusing business concepts and logic.

The core project is a blank module in which i defined some public functions that will be called from the web and mobile app. But however, I'm having issues to test this functionalities because:

  1. The queries on my public functions are to returning any results. I have tried to remove all the filters and conditions and just leave an old play "select * from a"  and still have no results when i test my query or run the app. Does it have anything to do with the fact that i cannot preview data on a table in a blank module, even if the table has data??
  2. While trying to test what was wrong with my app i also tried debug my app but even though i could hit tech breakpoints on the mobile app, i never managed to hit the break points which were on the blank module where my public functions were created.
  1. Are you using SQL?... that "SELECT * FROM a" is quite dangerous and error-prone (basically a no-go). Blank modules are like any other module, except they don't have any UI elements/references. That means you can use the regular preview data on a Entity.
  2. You might want to check these lessons from the online training. They explain how to debug producer modules.

Hope this helps.

Hi Jorge

First of all, thanks for your feedback it was very informative, and thanks for the links; I did have a look at that video lesson it was very helpful. 

Now regarding your answer


Jorge Martins wrote:

  1. Are you using SQL?... that "SELECT * FROM a" is quite dangerous and error-prone (basically a no-go). Blank modules are like any other module, except they don't have any UI elements/references. That means you can use the regular preview data on a Entity.

I do understand your point and it makes sense but im probably missing something because i cannot preview data on my blank modules, even without doing anything special.

Please see attached print screens from  my mobile app, and my core app.
On each i went to the user tables and tried to preview data,  one returns me values, and the other does not.

You can also see at the bottom on the debug tab I only have the option to debug the module I'm currently on. While the modules i'm consuming are not available for selection.


Regards

Solution

Hi Ferox,

In the screenshot you sent, it seems that your DAG_GFV_BP module has the User Provider defined as (Current eSpace), so it is quite natural that you do not see aany info in the Users entity. You should define it to the same user provider that is used by your other modules (probably Users).




Cheers,

Tiago.

Solution

Hi Thiago,


You are absolutely right. I probably changed that unintentionally. 

I made the change and now i have the desired output.  
Thanks a lot for your assistance,