EventX part 1

by: Johan Olofsson

This is part 1 of 2 blog posts on the EventX application and provides an overview of  application features as well as installation / configuration instructions.

The upcoming part 2 post will deal with the project and the source code in little more detail.

A brief overview

EventX is an EPiServer module built to ease the administrative tasks when dealing with user registrations for events such as fairs, seminars et.c.

It was initially built for our own intern use at the EPiServer Day 2009 event, but as we have received some requests on such functionality, we have decided to share the project under open source.

You can find the complete project over at CodeResort: https://www.coderesort.com/p/epicode/wiki/EventX

For more installation options, please see the section Installation below.

The module is built around a bunch of Web Controls used in a few Page Templates, some Custom PropertyTypes and Dynamic Content providers.

Web editors interact with application by creating pages of EventX pagetypes, create registration forms using XForms, insert EventX Dynamic Content controls and querying / extracting data using Edit mode tools.

 

Features and functions

Registration codes

Every registration gets its unique registration code consisting of 10 randomly selected characters. (The code contains no vowels to minimize the risk of accidentally forming any offending words).

This registration code is used to change existing registrations and when “scanning” the users when they show up at the event

The Registration process

The registration is built as a Wizard consisting of 2..N steps with N being eventx2dependent on the number of “unique session dates” (more on this under Sessions below).

The initial wizard step asks the user to enter his/her email address and also any existing registration code.

The next step is gathering registration details, such as “Name”, “Company”, any dietary restrictions et.c.

In order for this form to be as flexible as possible EventX uses XForms to provide the form layout. Every single event may have its own unique registration details form. 

eventx3

Fig. XForms is used to define registration forms


Sessions

An event may contain zero or more sessions created using the EventX Session Page Type and pointed out by the Sessions Container property on the Event Page Type. Example of sessions may be:

09:00 – 10:00 “Keynote speech by our chairman”
10:00 – 12:00 “Introduction for the beginner”
10:00 – 12:00 “Advanced track for the experienced”
12:00 – 13:00 “Lunch”

If sessions exists for an Event, all dates for the sessions are extracted and then one wizard step is added to the registration wizard for each unique date.

If the three sessions in the sample above all defined the same start date, the registration wizard would contain one added wizard step.

Registration states

A registration is always “having” one of the below states. Transitions between some of the states results in emails being sent out as outlined in more details under each state description below:

  • Submitted
    A new registration is always assigned the submitted state upon first save.
    The standard workflow sends the “submitted” email when processing registrations with this state.
  • Confirmed
    The registration has been confirmed with a seat at the event.

    The standard workflow sends the “confirmed” email when processing registrations with this state
  • Standby
    The registration is on the standby list. This list is handled manually by the Event administrator and is not assigned automatically.
  • Participated
    The state is set when the user has been “scanned” at the Event’s reception, preferably using a bar code reader
  • Cancelled
    The user has manually and intentionally cancelled the registration.

    The standard workflow sends the “cancelled” email when processing  registrations with this state.
  • Deleted
    The registration has been deleted by the Event administrator using the administration tools found in EPiServer Edit mode.

Processing registrations

The task of “processing” submitted/changed registrations is handled by a workflow. This workflow takes care of sending out emails when registration states changes, automatically assign states when certain conditions are met et.c.

Which workflow to use is specified individually for every single event.

Emails

The emails sent out from the application is personalized using email templates with placeholders being substituted with contextual data at runtime.

Below is an example of such an email template with placeholder:

Hello [CurrentRegistration.FirstName]!

We are pleased to confirm your registration to [CurrentPage.PageName].

Kind regards,
Marketing

 

Event “badge” PDF’s

EventX lets each (confirmed) registered users print out “their” own event badge containing both standard event details as well as individual information such as registration code, personal session agenda et.c.

The fields used to provide the contextual data is in the same form as the placeholders in the email templates.

Installation

Installing EventX requires you to take a few manual steps:

Getting the files

Either way, when you're done you should have a subdirectory named EPiServer.EventX in your EPiServer’s web root folder containing a bunch of aspx/ascx files as well as few other resource files.

Preparing the database

  • Connect to your EPiServer database using SQL Server Management Studio (or its like) and open a new Query window.
  • Open and execute the SQL queries found in the DbScript.sql

    This creates the needed custom tables and procedures, all of which are prefixed with the name ‘EventX’

Making sure the binaries are installed

  • If you have chosen to download the prebuilt package (binaries only), make sure that the files:

    EPiServer.EventX.dll
    EPiServer.EventX.Data.dll
    EPiServer.EventX.WF.dll

    all exists in your EPiServers /bin folder.
  • If you downloaded the complete project, open the projects and rebuild everything. (The project layout will be covered a little more in depth in part II of this blog).

Configuring the default Workflow

  • Open up web.config for editing and add the below workflow definition to the section episerver / workflow / definitions

    <episerver>
       <workflow>
         <definitions>
         …

          <definition type="EPiServer.EventX.WF.ProcessRegistration, EPiServer.EventX.WF" name="[EventX] Process Registration" description="" />

Configuring Dynamic Content

  • Open up web.config for editing and add the below control definitions to the section episerver / workflow / definitions

    <episerver>
       <dynamiContent>
         <controls>
           <add description="Displays a property from current registration"
             name="[EventX] CurrentRegistration" type="EPiServer.EventX.PlugIns.CurrentRegistrationDynamicContent, EPiServer.EventX" />

          <add description="Displays a property from current sessionstep"
             name="[EventX] CurrentSession" type="EPiServer.EventX.PlugIns.CurrentSessionDayDynamicContent, EPiServer.EventX" />

          <add description="Displays statistics for an EventX event"
             name="[EventX] Statistics" type="EPiServer.EventX.PlugIns.StatisticsDynamicContent, EPiServer.EventX" />

Installing the Page Templates

  • In EPiServer Admin mode, go to Tools / Import Data and select the file EPiServer.EventX.PageTemplates.episerverdata which should be in your EPiServer.EventX folder.
  • [Optional]
    You may also install a sample event demonstrating most of the features by importing the EPiServer.EventX.Sample.episerverdata package found in the same folder as above.

    Note: If you do import the sample event, which is strongly encouraged, you must go into Edit mode of the event page (named The Big Event) and set the Process Registration Workflow property as this is not retained during import. If you don’t, an error will be thrown when you try to submit the last step in the registrations wizard.

    eventx_setprocessregistration
    Fig. Setting the Process Registration Workflow property

11 May 2009

Tags:


    Comments

    1. Installed and compiled from code, imported and set the workflow. Works like a charm! This is an impressive piece of work - looking forward to part two!
    2. It doesnt seems to send out the submit mail but the confirmation mail when a new registration is done? This cuses some misunderstanding and confuses the participant cause when he press Finish button the text says that it is registered but not confirmed yet and when the mail comes it says that it is confirmed?
    3. Thobias, the "problem" is that there is a slight delay when executing the workflow which decides to "confirm" the registration straight away and thus not sending out the submit email at all... If the page is refreshed, the new updated status (confirmed) would shown. I guess a solution could be to use some Ajax code to update the status text dynamically.
    4. Thanks, everything works just fine now. Excellent module!!
    5. I am looking to implement on Relate+ any thoughts about the setup?
    6. Hi Saar! Sorry for the late reply. It should be traight forward, EventX is all about a bunch of webcontrols hosted on a regular EPiServer page. /johan
    7. EventX part 2... when?
    8. Jorma! Heh, well yeah... I had an intention to finish it off quite some time ago, but "stuff" always seems to get in the way..you know...
    9. How do you configure episerver to send out the emails?
    10. Hi mlaies! See the answer in the EPiServer World forum thread: http://world.episerver.com/Templates/Forum/Pages/Thread.aspx?id=37051&epslanguage=en
    11. Hi Johan, when submitting your details on the final screen I am getting an "Access Denied" exception on the following line: WorkflowDefinitionInstance wdi = WorkflowSystem.InstanceHandler.StartInstance(wd.DefinitionId, args); in the WFHelper class. Any thoughts on why this occurs?
    12. Hi mlaies! In Admin mode, goto Workflows under the Tools section., select Edit for the EventX workflow and check under the tab Security if Everyone is allowed Read access.
    13. Thank you Johan. that worked like a charm!
    14. sorry to bother you again. It now works for logged in users but not for unauthenticated users. If I wanted to make my event available for unauthenticated users, what steps will I have to take?
    15. No problemo. Is it the same problem with the workflow giving "access denied" or is it something else? If you want we can take this thread over email instead? Is so please email me at: johan.olofsson (at) episerver.com Thanks
    16. Turns out that you need "Create" permissions as well as "Read" on the workflow security for Everyone.
    17. Hey, I am now looking at this module because my customer is interested in this module. I saw in the blogpost that this module requires sql server 2008, but my customer uses sql server 2005. I heard that the reason for 2008 is because of a datatype that exists in 2008 but not in 2005. Do you know which datatype it is? Is it possible to create that datatype in 2005 in a way?
    18. I havent tested it, but as the xmldatatype was introduced in SQl2005 so I guess it would work ok.
    19. This module looks promising! However, I cannot get hold of the source files. When clicking "Download the source as a .zip file." (on http://www.coderesort.com/p/epicode/wiki/EventX) it just says "FILE_VIEW privileges are required to perform this operation". It also says, at the top, "You need to be a member of this project to gain access to downloads and source code." I'm am logged in with my user on code resort. I thought this was freely available, am I mistaken? Or what am I doing wrong? :o
    20. Ah, I need to apply for membership in epicode as well, right?
    21. Anders: yes, they (coderesort) requires you to register to be able to download/browse/contribute to sources.
    22. Hi, I'm facing a problem with the installation. Everything worked out fine all the way, but when I try to browse the sample page "The Big Event" I just get an error saying that the page is not found. The same things happens if I manually create a new event (the editing/saving works great though) and try to browse it. In fact, I've tried to browse any of the .aspx-files in the EPiServer.EventX-folder with the same result. Any idea on what might be wrong here? :/
    23. Oh boy, I was so excited to try out the module that I forgot to change something in the aspx-files... For others to not repeat the same mistake: Please remember to update any references to your master-page files ;D
    24. If during import of the page templates you get "Error: Access to the path 'C:\Windows\Temp\Administrator' has been denied, give "Everyone" group Full Control on the "C:\Windows\Temp\" directory on the EPiServer webserver machine. In production environments you may want to be more precise by using IIS app pool account and less rights :-)
    25. You'll need copy the directory “EPiServer.EventX” above directory "service references" because that is where the code will look for it.
    26. The Access to Path and directory copy fixes were posted by me :-)
    27. Where do i set an if sentence so that if u havent selected a event, u shouldt be able to finish registration? any one knows+
    28. And how do I get the possibility to list up what event a person has registed on..
    29. Hi Jure! If you by "event" mean Session, then you could try to set the session as "mandatory", then they wont be able to "deselect" dyuring registration
    30. i was thinking more in a way, that if the sessions are full, that they wount be able to to prossed to next level and finish registrations. how it works now is that ither way if a session is fully booked a user can prossed and get an confirmation mail with code
    31. Ok, I see. I suggest you to then simply set the AutoConfirmThreshold value to the sum of all seats for your sessions. That way the registration wont be automatically confirmed when finishing registration.
    Post a comment    
    User verification Image for user verification  
    EPiTrace logger