Packagecom.esri.drs
Classpublic class DashboardTask
InheritanceDashboardTask Inheritance DRSBaseTask Inheritance com.esri.ags.tasks.BaseTask

Provides functionality to retrieve dashboard results from an ArcGIS Data Reviewer for Server Dashboard REST resource. Dashboard results summarize default and custom (user-defined) fields in a Reviewer workspace's REVTABLEMAIN and REVBATCHRUNTABLE tables. Summary values show the number of occurrences of a unique value in a field in these tables.



Public Properties
 PropertyDefined By
 InheritedcreateReviewerSessionLastResult : ReviewerSession
ReviewerSession returned from last call to the createReviewerSession function.
DRSBaseTask
  getDashboardFieldNamesLastResult : Array
Array of field names returned from last call to the getDashboardFieldNames function.
DashboardTask
  getDashboardResultsLastResult : DashboardResult
A DashboardResult object instance returned from the last call to the getDashboardResults function.
DashboardTask
 InheritedgetLifecycleStatusStringsLastResult : Array
Array of lifecycle status strings returned from last call to the getLifecycleStatusStrings function.
DRSBaseTask
 InheritedgetReviewerSessionsLastResult : Array
Array of ReviewerSession object returned from last call to the getReviewerSessions function.
DRSBaseTask
Public Methods
 MethodDefined By
  
DashboardTask(url:String = null)
Constructor
DashboardTask
 Inherited
createReviewerSession(sessionName:String, sessionProperties:SessionProperties, responder:IResponder = null):AsyncToken
Creates a new Reviewer Session.
DRSBaseTask
  
getDashboardFieldNames(responder:IResponder = null):AsyncToken
Requests available Dashboard field names.
DashboardTask
  
getDashboardResults(fieldName:String, filters:ReviewerFilters = null, responder:IResponder = null):AsyncToken
Requests dashboard results by fieldName.
DashboardTask
 Inherited
getLifecycleStatusStrings(responder:IResponder = null):AsyncToken
Retrieves a list of localized lifecycle status strings from the reviewer workspace.
DRSBaseTask
 Inherited
getReviewerSessions(responder:IResponder = null):AsyncToken
Returns an array of sessions in a Reviewer workspace.
DRSBaseTask
Events
 Event Summary Defined By
 Inherited Dispatched when createReviewerSession operation successfully completes.DRSBaseTask
  Dispatched when there is a problem accessing the Reviewer Map Server.DashboardTask
   Dispatched when the getDashboardFieldNames operation successfully completes.DashboardTask
   Dispatched when the getDashboardResults operation successfully completes.DashboardTask
 Inherited Dispatched when getLifecycleStatusStrings operation successfully completes.DRSBaseTask
 Inherited Dispatched when getReviewerSessions operation successfully completes.DRSBaseTask
Property Detail
getDashboardFieldNamesLastResultproperty
getDashboardFieldNamesLastResult:Array

Array of field names returned from last call to the getDashboardFieldNames function.

This property can be used as the source for data binding.


Implementation
    public function get getDashboardFieldNamesLastResult():Array
    public function set getDashboardFieldNamesLastResult(value:Array):void

See also

getDashboardResultsLastResultproperty 
getDashboardResultsLastResult:DashboardResult

A DashboardResult object instance returned from the last call to the getDashboardResults function.

This property can be used as the source for data binding.


Implementation
    public function get getDashboardResultsLastResult():DashboardResult
    public function set getDashboardResultsLastResult(value:DashboardResult):void

See also

Constructor Detail
DashboardTask()Constructor
public function DashboardTask(url:String = null)

Constructor

Parameters
url:String (default = null) — DataReviewerServer Server Object Extension (SOE) URL

Example
         var dashUrl:String = "http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer";
         var task:DashboardTask = new DashboardTask(dashUrl);
         
Method Detail
getDashboardFieldNames()method
public function getDashboardFieldNames(responder:IResponder = null):AsyncToken

Requests available Dashboard field names. On completion the getDashboardFieldNamesComplete event is fired and the optional responder is called.

Parameters

responder:IResponder (default = null) — The responder to call on result or fault.

Returns
AsyncToken
getDashboardResults()method 
public function getDashboardResults(fieldName:String, filters:ReviewerFilters = null, responder:IResponder = null):AsyncToken

Requests dashboard results by fieldName. fieldName can be any of the following:

You can also specify custom (user-defined) fields from REVTABLEMAIN for fieldName. On completion the getDashboardResultsComplete event is fired and the optional responder is called.

Parameters

fieldName:String — Field name for dashboard results. Use the getDashboardFieldNames function to get field names to use in this parameter.
 
filters:ReviewerFilters (default = null) — filters used to narrow down dashboard results. Similar to a where clause.
 
responder:IResponder (default = null) — The responder to call on result or fault.

Returns
AsyncToken

See also


Example
         
         import com.esri.drs.DashboardResult;
         import com.esri.drs.DashboardTask;
         import com.esri.drs.DataReviewerTaskEvent;
         import mx.events.FlexEvent;
         import mx.rpc.AsyncResponder;
         import mx.rpc.Fault;
         import mx.rpc.events.FaultEvent;
         
         protected function application1_initializeHandler(event:FlexEvent):void
         {
             var url:String = "http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer";
             var dashboardTask:DashboardTask = new DashboardTask(url);
             dashboardTask.getDashboardResults("SEVERITY", null, new AsyncResponder(resultHandler, faultHandler));
         }
         
         private function resultHandler(result:DashboardResult, token:* = null):void
         {
             for each (var item:Object in result.fieldValues)
             {
                     trace("Severity " + item + " " + result.getCount(item));
                 }
             }
         
         private function faultHandler(fault:Fault, token:* = null):void
         {
                 var msg:String = fault.faultString;
             if (fault.content != null && fault.content as Array != null)
                     msg = fault.content[1].message;
         
                 trace("Error: " + msg);
         }
         
Event Detail
fault Event
Event Object Type: mx.rpc.events.FaultEvent

Dispatched when there is a problem accessing the Reviewer Map Server.

getDashboardFieldNamesComplete Event  
Event Object Type: com.esri.drs.DataReviewerTaskEvent
DataReviewerTaskEvent.type property = com.esri.drs.DataReviewerTaskEvent.GET_DASHBOARD_FIELDNAMES_COMPLETE

Dispatched when the getDashboardFieldNames operation successfully completes. The event result contains an array of field names as strings.
getDashboardResultsComplete Event  
Event Object Type: com.esri.drs.DataReviewerTaskEvent
DataReviewerTaskEvent.type property = com.esri.drs.DataReviewerTaskEvent.GET_DASHBOARD_RESULTS_COMPLETE

Dispatched when the getDashboardResults operation successfully completes. The event result contains an instance of a DashboardResult object.