Event module with event subscription by users

0
I'm working on an event registration module but I'm struggling with using the available mendix features. I was able to create entities with associations (Event, subscription) so I was set to build a the event management part (based on one entity was created including create, edit and read only pages.) The app will be used to register events and enable users to subscribe to events. Then the problems began. Because I wanted to get users to subscribe to the events. So I editted the event detail view page and added a block to subscribe to a certain event based on the Subscriptions entity (which is linked to user and event). Mendix forces me to use a microflow so I created one that will store information in the Subscription object. The information stored includes infor from both user, subscription and event table. Then one error remained which was "Selected microflow should have one parameter of type Events.Event" Can someone point me to an example which I can use to fix this? Basically I would like to know how to setup a screen with event details and a subscribe block that enables the logged in user registrate to the event.
asked
5 answers
1

This microflow this actually passed the event (e.g. line) that is currently selected. Add the event entity as input in the microflow. In most cases you will need it.

answered
1

You need to add a parameter to your microflow:

Parameter

Drag the highlighted item from the toolbar to your microflow and open to select the object type. Then, where you call this microflow, you need to retrieve the object to pass and put this object in the microflow parameter.: alt text

answered
0

It would be nice to have a picture of your domain model and see how you did model the reference between a user and an event. Since each user probably can register to multiple events, and that each event has multiple users this is a reference set.

Now the register part. On the page of an event create the subsribe button passing the event object (On click settings, pass entity). In the microflow you now have the event object and you always have the current user. Now it depends if you are working directly with users or may be you created another entity and did you an inherite from user. If you did the last you first need to cast the object before you add it to the reference between event and user.

The error you get is that the microflow did not have an event parameter. Add a parameter to the microflow (the yellow icon when you are in a microflow) and select the event object. Parameters are the method to pass things from forms to microflows. Hope this helps a bit.

Regards,

Ronald

answered
0

http://postimg.org/image/lt4odup5z/alt text

answered
0

See attached: [url=http://postimg.org/image/btnscqqer/][img]http://s13.postimg.org/btnscqqer/microflow.jpg[/img][/url] [url=http://postimg.org/image/9nthi8myb/][img]http://s13.postimg.org/9nthi8myb/model.jpg[/img][/url]

answered