Appboard/2.4/builder/widgets/actions/write static value

Revision as of 00:14, 5 September 2013 by imported>Mike.berman (create page for AppBoard 2.4)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "Write Static Value" Action provides users the ability to either perform updates that will be written back to a data source or use the current record to invoke an operation on the data source. When the client data model receives a DataObject change event, it will send the data to the server in an "Update" action request.


Write changes back to a Data Source

An administrator may want to provide Users the ability to change the status of certain data elements. For instance, changing the 'Acknowledged' flag in the data and write it back to the data source. This is normally used for data backed by a database (excluding data returned by a stored procedure), or data backed by flat files (CSV, XLS). For places where the data change will be converted to a web service request or API request, it is recommended to use the 'operation' syntax.


For instance, if you had the adapter for IBM Netcool/ObjectServer registered, you may want to be able to allow the user to acknowledge or unacknowledge an alert. In this case, the administrator registers the "Write Static Value" Action on the alert data displayed in AppBoard. When the Appboard Client DataModel receives the DataObject changed event, it will package the alert inside of an 'update' action request to the server. The request will be delegated to the adapter, which will use the adapter configuration to create a connection to the data source (or pull from the data connection pool) and write the data back to the external system.


This Action can also be used to enable the end-user to manually modify system status flags that are shared between users.


Perform an Operation on a Data Source

A data source adapter would specify what operations are supported. Normally this is used where an adapter is written against an API or Web Service, where you typically use the record as context information and the system uses that data to fill in the required properties of the request along with the data source's adapter configuration to establish a connection.


Operations are dependent on the support provided by a specific adapter. For instance, an adapter may provide the ability to invoke the following operations on an event: 'acknowledge', 'unacknowledge', 'takeownership', and 'releaseownership'. With these operations, you would typically define a menu of operations to act on a type of data.


How To Create a Write Static Value Action

For instructions on adding an Action to a Widget, see the general instructions in How To Create an Action in a Widget.


How To Configure a Write Static Value Action

  1. Follow the instructions above to create the Action in the Widget Actions panel.
  2. Name: Enter a name for this Action. For convenience, a default name is provided. The Name is not used anywhere else in AppBoard, and only displayed on this configuration page.
  3. On selection of:
    1. Select "any" or "specific" for the type of data selection by the User that will trigger the Action. When selecting "specific", perform the following additional steps:
      1. Click the Filter button. The Filter Editor is displayed.
      2. Click Add Rule to create one or more rules that indicate what data should trigger the Action, when selected.
      3. Click Close to save the Filter settings.
    2. Select the Data Collection name. When the Widget is run, selection of data in this Data Collection will trigger the Action.
  4. Enter the following information:
    1. Field Name: Select the name of the field for the user-selected record that AppBoard will update.
    2. Value: Enter the value that AppBoard will write for the indicated field in the user-selected record.


Sample Use Case

Suppose a Table Widget displays data from the following source to a User:


Raw Error Acknowledgement Data on Server
Customer ID IP Address Error Acknowledged
0001 172.21.38.220 License Expired No
0001 172.21.38.226 Server Not Responding No
0002 172.26.11.101 Slow response time No
0002 172.21.38.105 License Warning Yes
0002 172.21.38.313 Temperature too high Yes


The Table Widget's Data Collection has a Client Side filter that only displays errors that have not been acknowledged (Acknowledged="No"). So the Table Widget displays the following data:


Filtered Error Acknowledgement Data in Table Widget
Customer ID IP Address Error Acknowledged
0001 172.21.38.220 License Expired No
0001 172.21.38.226 Server Not Responding No
0002 172.26.11.101 Slow response time No


Suppose that when the User clicks on a row, he acknowledges the error and it should then be removed from the display. To do this, you can create a "Write Static Value" Action that will write the Value "Yes" to the Field "Acknowledged".