Alerts  Creating an SMS alert using Mobile Web Studio

Chapter 7: Using Unwired Accelerator Alerts

Requirements and restrictions

The following list describes requirements and known limitations of the alert functionality:

StepsCreating alerts

This example procedure shows you how to create an alert in Mobile Web Studio.

  1. Use the sample database application (sampledb) included with the product.

    1. Log in to Mobile Web Studio.

    2. Select Applications from the Build menu on the left pane.

    3. Click New to access the Application Builder.

    4. When the Application Builder displays, click the down arrow to the right of the Add button and select Database Element.

    5. For this example, when the Mobile Web Studio – New Element window appears, select Connection Cache.

    6. Complete the remaining fields:

      • Conn Cache Name – name of the connection cache for the sample database; for this example:

        sampledb
        
      • SQL Query String – enter this SQL statement:

        select c.lname, p.name, si.quantity, si.id, si.prod_id 
        from customer c, sales_order s, sales_order_items si, product p 
        where c.id = s.cust_id and s.id = si.id 
        and si.prod_id = p.id
        
    7. Click Preview to see the data that corresponds to the SQL query you entered.

  2. Click Next.

  3. On the next three windows (Split, Define, and Filter), click Next.

  4. In the Window Preview, enter Sales Update for the Element Name, then click Next.

  5. In the Continuous Capture window, click Finish. Do not click Continue in this window.

  6. In the Application Builder, click Save and complete these options on the Web Studio – New Application Finish window:

    1. Content tab – enter Sales Update for the application name.

    2. Roles tab – click Add All to add all roles to the Assigned Roles list.

    3. Presentation tab – select Alert, Display Within IFrame, and No Popup. Accept the default entries shown for the other options.

    4. Click Finish.

    5. In the confirmation pop-up window, click OK.

  7. Click Close to exit the Application Builder.

  8. Select New from the Application Manager Status menu.

  9. Right-click the new Sales Update application in the right pane and select Approval Status | Approved.

    In the confirmation pop-up window, click OK.

  10. Add the new application to a page.

    1. Select Pages from the Web Studio Build menu.

    2. Select New from the Page Builder Status menu, then click New.

    3. When the Page Builder displays, select the full layout icon (the far right layout icon), then click Add.

    4. When the Search window appears, click Search.

    5. Select the Sales Update application in the Results pane and click Add.

    6. In the Page Builder, click Save and complete these options:

      • Name – enter Sales.

      • Type – select Catalog from the drop-down list.

      • Active – verify that this option is selected.

      • Roles – click Add All to add all roles to the Assigned Roles list.

      Click OK.

  11. When you see the confirmation that the page was saved, click OK.

  12. Click Close to exit the Page Builder.

  13. On the Mobile Web Studio main window, select New from the Page Builder Status menu, right-click the Sales page, and select Status | Approved.

    When you see the message that the page was saved, click OK.

  14. Make the new page and application available to Portal Interface users.

    1. Select Approved from the Page Builder Status menu.

    2. Right-click the Sales page in the detail pane and select Update Users.

    3. When you are prompted to reconfirm that you want to perform an update operation, click OK.

    4. When a message displays that the update operation succeeded, click OK.

  15. Log out of Mobile Web Studio.

  16. Alerts do not start until you set up rules for the alert in Portal Interface. To set up rules for the application you created in the previous steps:

    1. Log in to Portal Interface.

    2. Click Manage Pages.

    3. In the Add Page Group window, enter Information as the page group name, and click Done.

    4. Click Add Page.

    5. In the Add Page window, add the pre-made catalog page “Sales,” and click Done.

    6. In the Sales page, click the “!” icon in the Sales Update application.

    7. In the Alert window:

      • Name – select Playback from the drop-down list.

      • Rule Data – enter the text you want to receive as a message in the alert. For this example: Sales data update.

      • Description – enter a brief description of the alert. For example: Sales data has been updated.

      • Under Rules:

        • Rule Relationship – select “and”.

        • Select Fields By – select “label”.

        • Execute Alert When – select “field3”, “is greater than”, 25 in the three columns, then click +.

        • Enter another rule using the same values for Rule Relationship and Select Fields By.

        • Execute Alert When – select “field1”, “equals(text)”, enter Devlin, then click +.

    8. Click Done.

    9. In the confirmation pop-up, click OK.

    10. Click Cancel to close the Alert window.

  17. Set up a schedule for the alert:

    1. Click MyInfo, and click the Alert tab.

    2. In the Alert window, select Trigger Alert Based on a Schedule.

    3. Select the Start Time, Recurrence, and Range.

    4. Select No End Date.

    5. Send Alerts To – enter the e-mail address where you want to receive the alert.

    6. Click Done.

    7. Click Start.

  18. Log out of Portal Interface.

  19. Log in to Mobile Web Studio to create a database update application, which can change the quantity of the Tee Shirts for Devlin in the sampledb and trigger an alert.

    1. Select Applications from the Build menu on the left pane.

    2. Click New to access the Application Builder.

    3. When the Application Builder displays, click the down-arrow to the right of the Add button and select Database Element.

    4. For this example, when the Database Element Definition window appears, select Connection Cache.

    5. Complete the remaining fields:

      • Conn Cache Name – name of the connection cache for the sample database; for this example:

        sampledb
        
      • SQL Query String – enter this SQL statement:

        update sales_order_items set quantity = @OP["quantity"="13"]
        where id = @OP["id"=”-1”] 
        and prod_id = @OP["prod_id"=”-1”]
        
  20. In the Split, Define, Filter windows, and Database Element windows click Next.

  21. In the Location: Database Element window, check all three variables (prod_id, id, and quanity).

  22. In the Preview Window, in Element Name, enter:

  23. In the Continuous Capture window, click Finish.

  24. In the Application Builder, click Save and complete these options in the Finish window:

    1. On the Content tab, enter Devlin for the application name.

    2. On the Roles tab, click Add All to add all roles to the Assigned Roles list.

    3. On the Presentation tab, select Alert, Display Within IFrame, and No Popup. Accept the default entries shown for the other options.

    4. Click Finish.

    5. When you see the confirmation message that the application was saved successfully, click OK.





Copyright © 2005. Sybase Inc. All rights reserved. Creating an SMS alert using Mobile Web Studio

View this book as PDF