CIM provides information to the user on what actions have already been executed. Each menu item displays the combined progress of all actions involved in that menu item.

The StatusMonitorStore keeps track of the amount of work needed to be performed to complete some task. This is done by keeping track of work for unique ids. The ids are usually the id for the menu item that starts some action. Each id has total work amount, work done, work left, a done flag, a status message and a list of children ids. The children ids are used to build a hierarchy for related tasks. The children ids are used to calculate the work done and if things are done.

StatusUpdateValidator is used to update when some amount of work was performed.

This example shows a menu with status information:

[C]        Enter Connection Details – Done
[T]        Test Connection – Done
*[S]      Create Schema
[I]        Import Initial Data

A custom persister saves and retrieves progress information from CIM persistence. In order to keep progress information specific to a product selection, all status information is cleared when product selection changes.

To set status within a step:

<validator phase="POSTSTEP" id="StatusUpdateValidator">
     <property name="statusId">
          <value>DATABASE_CONFIGURATION_WIZARDID</value>
     </property>
     <property name="statusMsg">
          <value>Database Configuration Complete</value>
     </property>
</validator>

To get a status:

StatusMonitorStore statusMonStore = StatusMonitorStore.getInstance();
//This has no effect if the StatusMonitor aready exists
statusMonStore.newStatusMonitor(DATABASE_CONFIGURATION_WIZARDID);
boolean dbConfDone =
statusMonStore.isDone(DATABASE_CONFIGURATION_WIZARDID);

Similar code would normally be used in a navoption provider, allowing you to modify navigation options based on the tasks the user has already completed.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices