New Version of SalesBuilder using LiveCycle Data Services

I have often felt that we needed a more real-life/complex sample application to adequately demonstrate LiveCycle Data Services, and specifically the Data Management Service. So, I wrote a new version of Salesbuilder that uses LCDS to persist data at the server side. “Salesbuilder LCDS” demonstrates advanced LCDS features such as associations, lazy loading, etc.

This application will also be packaged as a sample in the next version of LiveCycle Data Services currently in private beta.

Here is a quick look at the destinations and associations used in the application:

<destination id="account">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.AccountAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="accountId" undefined-value="0"/>
            <many-to-one property="salesRep" destination="sales-rep" lazy="true"/>
            <many-to-one property="industry" destination="industry" lazy="true"/>
            <many-to-one property="category" destination="account-category" lazy="true"/>
            <many-to-one property="state" destination="state" lazy="true"/>
        </metadata>
    </properties>
</destination>

<destination id="contact">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.ContactAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="contactId" undefined-value="0"/>
            <many-to-one property="account" destination="account" lazy="true"/>
            <many-to-one property="manager" destination="contact" lazy="true"/>
            <many-to-one property="salesRep" destination="sales-rep" lazy="true"/>
        </metadata>
    </properties>
</destination>

<destination id="opportunity">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.OpportunityAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="opportunityId" undefined-value="0"/>
            <many-to-one property="account" destination="account" lazy="true"/>
            <many-to-one property="salesRep" destination="sales-rep" lazy="true"/>
        </metadata>
    </properties>
</destination>

<destination id="industry">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.IndustryAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="industryId" undefined-value="0"/>
        </metadata>
    </properties>
</destination>

<destination id="sales-rep">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.SalesRepAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="salesRepId" undefined-value="0"/>
        </metadata>
    </properties>
</destination>

<destination id="account-category">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.AccountCategoryAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="categoryId" undefined-value="0"/>
        </metadata>
    </properties>
</destination>

<destination id="state">
    <adapter ref="java-dao" />
    <properties>
        <source>com.salesbuilder.assembler.StateAssembler</source>
        <scope>application</scope>
        <metadata>
            <identity property="stateId"/>
        </metadata>
    </properties>
</destination>

Installation instructions:

Prerequisite: You need to have LiveCycle Data Services installed on your system before executing the steps below.

  1. Download salesbuilderlcds.zip
  2. Unzip salesbuilderlcds.zip in /salesbuilderlcds

  3. Copy the content /salesbuilderlcds/webapp/WEB-INF/classes to the WEB-INF/classes directory of your web application
  4. Add the destinations defined in /salesbuilderlcds/webapp/WEB-INF/flex/data-management-config.xml to the data-management-config.xml file of your web application
  5. Start the salesbuilder database
    1. Open a command prompt and go to /salesbuilderlcds/db
    2. Run startdb.bat (Windows) or startdb.sh (Unix-based systems)
  6. Start your application server
  7. Double-click /salesbuilderlcds/salesbuilderlcds.air to install the air application
  8. Run the application

Configuration Note:

By default, the application tries to connect to the localhost server using the RTMP protocol on port 2037. If your server configuration is different, edit config.xml in the salesbuilder installation directory (”Program Files\Salesbuilder LCDS” on Windows).

If you are not familiar with the Salesbuilder application, here is a quick walkthrough:

Sales Pipeline
The sales pipeline features many “direct manipulation” options:

  1. Grab the background of the chart with your mouse and scroll it left and write to navigate along the time axis.
  2. Grab a vertical grid line, and move it left and right to zoom-out/zoom-in.
  3. To modify your pipeline directly, grab a bubble with your mouse and move it up and down or left and right to adjust the probability and the expected closing date respectively. The projected revenue is automatically updated in the chart title. When you release the mouse button, the opportunity is automatically updated (probability and close date) in the database.
  4. You can also double click a bubble to open a details view for the opportunity.

Search and Summary Screens

  1. Type a few letters in the search box (upper right corner): matching accounts, contacts, and opportunities appear.
  2. Use the arrow keys to navigate in the search results popup.
  3. Use the Enter key to open the selected item.
  4. Alternatively, you can also open the summary screens (”Accounts”, “Contacts”, and “Opportunities” buttons in the menu bar), and open individual items from there.

Working with Data

  1. Open the “Alpha Corp” account.
  2. Make some changes to the Alpha Corp data (for example, change the phone number), and click “Save””.
  3. In the Contacts view of the Alpha Corp tab, you can grab an org chart item with your mouse and move the org chart around.
  4. To open the details view for a contact, either double-click an org chart item or click the Grid button (lower left corner) and double-click a contact in the datagrid.
  5. Add a contact by clicking “Quick Contact”. Make sure you select a manager, click save and notice that the org chart is updated automatically.
  6. Continue to add and modify accounts, contacts, and opportunities. The data is persisted using the Data Management Service.

Native drag-and-drop

  1. Click the “Opportunities” menu button.
  2. Drag the dashboard title on the desktop: the chart is saved as a JPG on the desktop. Note: it can take a few seconds before you actually see the drag icon.
  3. Open a Word document, drag the dashboard title again, and, this time, drop it directly in the Word document.
  4. Select some rows in the datagrid, and, without releasing the mouse button, drag the selected rows and drop them on the desktop. The rows are saved as an Excel document on the desktop.
  5. Double-click the Excel document to open the spreadsheet.
  6. Drag some rows from the Datagrid again, and, this time, drop them directly somewhere in the Excel spreadsheet.


Comments

6 Responses to “New Version of SalesBuilder using LiveCycle Data Services”

  1. Dan Nelson on February 9th, 2008 1:08 pm

    What version of AIR is required for your application? I keep getting the message “This application requires a version of the Adobe Integrated Runtime (AIR) which is no longer supported. Please contact the application author for an updated version”.

  2. Vinny Carpenter’s blog - » Daily del.icio.us for February 17th through February 22nd on February 22nd, 2008 9:00 pm

    [...] New Version of SalesBuilder using LiveCycle Data Services : Christophe Coenraets - I have often felt that we needed a more real-life/complex sample application to adequately demonstrate LiveCycle Data Services, and specifically the Data Management Service. So, I wrote a new version of Salesbuilder that uses LCDS to persist data at the s [...]

  3. Zdenek Mikan on March 13th, 2008 12:37 pm

    I like this sample very much. Is there any sample demonstrating the opposite destination association - one-to-many?

    To Dan Nelson: Try to make a new application with the name salesbuilderlcds and use the new file salesbuilderlcds-app.xml from this new application.

  4. Nikki on March 17th, 2008 4:26 am

    I keep getting the same error as Dan Nelson (wrong version of AIR). i have tried importing the project into flex, but can’t seem to get it quite right and end up with loads of errors.

    are there any other solutions to this?

  5. Wim Vervoort on March 21st, 2008 6:02 am

    Dear Christophe,

    This is very nice and awsome that it is open source…..But i just can’t get this right on lcds or blazeDS. Maybe a quick tutorial will help us all out! I want to convert this to a web application…..thanks already!

    Greetzzz,

    Wim Vervoort

  6. Marc Truitt on March 27th, 2008 11:51 am

    Does it require livecycle es or livecycle enterprise?

Leave a Reply