Defining the Mobile Business Object for Server Notification

The server notification pattern supports any number of MBO definitions. For this example, create an MBO with one load parameter, map the parameter as a propagate-to attribute, then assign the MBO to a cache group that uses an Online policy.

The MBO definition described here allows retrieval of online results by the workflow application to which the MBO belongs.
  1. In Unwired WorkSpace, create an MBO from the sampledb database that has at least one load parameter. For example, you could define a Sales_order MBO as:
    SELECT   id,
      cust_id,
      order_date,
      fin_code_id,
      region FROM sampledb.dba.sales_order
    WHERE id = :order_id
    
  2. Preview the MBO by selecting Preview from the Definition tab. Enter 2001 as the value. The preview returns one row from the sales_order table based on the id attribute (2001).
  3. In the MBO Properties view, click the Load Parameters tab, select the id attribute as the Propagate to attribute that maps to the order_id load parameter. Change the parameter and data source datatype to INT, and include an integer value for the data source default value.


  4. Set the Online cache group policy for the MBO.
    1. Add the MBO to a cache group that uses the Online cache group policy. For example, create a new cache group named CacheGroupOnline and set the policy to Online.
    2. Drag and drop the MBO to CacheGroupOnline.
    The findByParameter object query is automatically generated based on the order_id load parameter:
    SELECT x.* FROM Sales_order x WHERE x.id = :order_id
  5. Deploy the project that contains the MBO to Unwired WorkSpace. Select Message-based in the deployment wizard.