Creating First Feature

Designing Feature in FlexStudio

To create the first feature, login to FlexStudio. Enter into the "FirstApplication".

Right click on "FirstApplication" text on top left corner. Click on "Add Module".

A module entry right pane will emerge. Enter the module name and description. Click Save.

In the left pane you will see "Order" module added under the "FirstApplication".

Right click on "Order" and select "Add Feature". On right hand side a pane will appear to add the feature details.

Enter the Feature Name, Action and Description. Click Save.

On the left pane, expand the module "Order". You will see the feature "AddItemToCart" is created. Click on feature. You will see the graph tool in the center.

You can start designing the feature / API using the graph tool.

Right click on "Start". Select "View" and press enter.

Right click on the form. Select "onSuccessEvent". A form pop-ups. Fill the domain event details and click "UPDATE" as shown below

The "Itemaddedtocart" event is created.

Click on "Save Graph" button in the top left corner. The feature diagram is now added to the application.

At this stage, you can define the domain entity for the feature. Right click on setting and then click on "Domain Entities". You can create "Order"domain entity for "AddItemToCart" feature

On the left pane, right click on "Order" Module and select "Architect View"

Edit the domain entity mapping of the feature. Save.

"Order" domain entity is mapped to "AddItemToCart"

Publishing the Feature using FlexGen

Now open FlexGen. Select "Order" module under "FirstApplication". Then select the row.

Click on "Generate" button in the top right corner. Enter the "Job Title" and click "Continue"

You get feature code generation notification

Click on "View Code" to view the code folder structure

Click on "Copy To Local" button to copy the code to the solution folder. Now you can view the code in Visual Studio

Now you are set to code the domain