[Event System] Event System vs. Reactive Web Application
Question
Forge component by Leonardo Fernandes

Leonardo,

As I  understand, Event System doesn't work with Reactive Web Applications (RWA). Do you plan to implement some solution working with RWA?

Regards

Tomasz

Tomasz M. Lipinski wrote:

Leonardo,

As I  understand, Event System doesn't work with Reactive Web Applications (RWA). Do you plan to implement some solution working with RWA?

Regards

Tomasz

Hi,


Since the RWA use mobile components, they already add a event into development as default.


Can check?


Cheers


Hi,

Events are for communication from a WebBlock (Block) to its current parent. It is not the only usage of Event System. It  serves also for sending messages from the parent to its block-child (e.g. "validate your data"). It can be achieved using On Parameters Change event but it is not so friendly. It serves also for communication directly between block-siblings (blocks placed on the same screen). It can be achieved via their parent but again: it is not so friendly.

In both cases Event System makes the architecture clearer and easier to maintain.

Therefore my question (and petition :-))  is still valid.

Regards

Tomasz


Hi 


I do agree with Tomasz. This has been one of the most valuable components I have ever used and it helped a lot on our projects. Indeed Reactive brings some functionalities that replace this component, but not all and having the possibility to communicate between parent -> child like this does, is a very big feature. So ya, is there any plan to bring this to reactive?


Cheers


Luís

Hi Tomasz and Luís,

I've just published a small Forge component that does some of what you are asking for, namely to make it possible for a parent to ask a (child) web block to validate himself for the case of reactive applications. It is called Enhanced Web Blocks - Reactive. Maybe it suits your needs. Let me know if it helped. Let me also know if you have any comments.


Greetings, pedro

Hi @Pedro Rodrigues 

I downloaded your solution and looking it on a nutshell, I have implemented something similar on my company as well. But we had an issue with it and I haven't tried yours yet to check if it also has. What happens if the action you're calling on the wb has a Server Action? Will it run the Server action? Because on our solution it 'jumped' the action, and only after the client action was finished, the server one would run. I will then play a little bit your solution to also test this.

Hi Luís,

that's a good one. I didn't try that one. I'll give it a try and I will let you know.


Greetings,

pedro

Hi @Luis Serpa,

my solution has exactly the same problem you reported. When the screen action that is being called in the web block has a server action in it, the screen action as a whole is executed asynchronously. As a result, the runtime properties are not available immediately after the call to that screen action.

I'll dig into it to come up with a solution. Thanks for reporting this issue.


Greetings,

pedro

Hi @Pedro Rodrigues ,

Thanks. I'll be checking.

Regards

Tomasz

Hi @Pedro Rodrigues , no problem, please let me know if you find out a solution, I would really like to know one. 

Cheers

Hi @Luis Serpa,

I've just uploaded version 1.0.1 of the component with a solution to the problem you mentioned. I've also added an example of a web block containing a call to a server action in the screen action that reveals its runtime properties to the demo application. Let me know if you find any other issues.

@Tomasz M. Lipinski Please make sure you also use version 1.0.1 of the component in case you had already downloaded version 1.0.0.


Greetings,

pedro

Alright, cool. I'll check it out and then I'll let you know.

Hi @Pedro Rodrigues 

I've tried with the inclusion of a server action on a client action, and this is the flow example that I have: 




And by debugging the app, the server action is running after the callback to the screen. Maybe I'm missing something now on my example?


Cheers

Hi @Luis Serpa ,

Could you share your module in here? Then I can take a look.
I would expect that in the SaveOnClick action the result of the call to the GetRuntimeProperties would be checked and that only then the server action Ticket_Create would be called.

You can also take a look at the demo application. The EvenNumberInput web block has a call to a server action in the screen action that exposes the runtime properties. You can try to debug the whole flow and see that the flow in the SubmitOnClick screen action of the Home screen only proceeds beyond the EvenNumberInput_GetRuntimeProperties once the whole RuntimeProperties_Expose screen action of the EvenNumberInput web block has been executed.


greetings, Pedro

Hi @Pedro Rodrigues sorry, maybe I'm being a noob, but indeed wasn't able to make it work. I took a look into the demo, but as far as I could tell, it didn't have a server action being called on the flow. But yes, here is my oml. I did a new one, cuz the other one had a lot of crap that didn't matter. This is a more simplified version of it,

Cheers

Demov3.oml

Hi @Luis Serpa ,

it's my fault I guess. Apparently something went wrong when uploading the application files to the Forge. The same application files as those of version 1.0.0 of the component ended up being uploaded :( 

I've just upload the correct application files. They are available under version 1.0.2 of the component. I've checked and these seem to be ok. I've also checked your OML with version 1.0.2 of the component and it works as expected (on my machine :) ). 

Could you try to download the component again and check whether your demo modulo works as expected on your machine?

Sorry for the confusion.

Greetings, pedro


PS: @Tomasz M. Lipinski version 1.0.1 of the component ended up with the same application files as those of version 1.0.0. Please make use of version 1.0.2.

Hi @Pedro Rodrigues 

Yes, it's working perfectly, really nice. Now, one improvement that I would suggest. What if instead of having an action for each type of data, you have a structure similar to what Event System has. A structure with integer, text, date, etc, but also a JSON, where then the user can pass whatever he wants.


Great job, it looks amazing.


Cheers

Hi @Luis Serpa ,

thanks for your suggestion. I thought on it and I decided not to expose a structure with multiple data types as you suggested. I believe it is less error prone to have one single GetRuntimeProperties for each data type instead of having one single GetRuntimeProperties action exposing the structure you suggested. Time and feedback will tell :)

I've just published version 1.0.3 of the component where you can find enhanced web block templates and corresponding GetRuntimeProperties action for the following extra data types: Decimal, Date, Date Time, Time, Boolean, and Binary Data.

I'm curious to hear more feedback if you happen to use this component on your projects. 

Thanks again for all the feedback you already provided. It is much appreciated and the component has improved substantially with it.


Greetings,

pedro

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.