Description
    WMReportTask class to perform operations on Workflow Manager (Classic) Reports.
    Class hierarchy
    workflowmanager/BaseTask
|_workflowmanager/WMReportTask
    Constructors
        
    Properties
      
        |
        | disableClientCaching | Boolean | The indicator to disable client browser caching. | 
        | proxyURL | String | The proxy URL. | 
        | token | String | The token string if security is on. | 
        | url | String | The base URL for Workflow Manager (Classic) service. | 
      
    
    Methods
      
        |
        | generateReport(reportId, user, callback, errback) | none | Generates a report and returns the output as formatted HTML. | 
  
        | getAllReports(callback, errback) | Object | Get a list of all the reports (Report[]) that are configured in the ArcGIS Workflow Manager (Classic) system. | 
        | getReportContentURL(reportId, user) | none | Returns the URL string for the report content. | 
        | getReportData(reportId, user, callback, errback) | Object | Executes a report and returns the raw result set (ReportData). | 
        | getReportStylesheet(reportId, callback, errback) | none | Get the XSLT stylesheet for the specified report. | 
        
      
    Constructor Details
      
        
        Constructor for WMReportTask. Disable client caching is default to be true.
      Parameters:
        
          | <string>url | Required | The base Workflow Manager (Classic) REST URL. | 
        
        Sample: 
require([
    "workflowmanager/WMReportTask", ...
], function(WMReportTask, ...) {
    var wmReportTask = new wmReportTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    });
    ...
});
   
         
       
    Property Details
      
        <Boolean> disableClientCaching
The indicator to disable client browser caching.
       
      
        
        
        The token string if security is on.
       
        
        
        The base URL for Workflow Manager (Classic) Service.
       
     Method Details
      
        generateReport(reportId, user, callback, errback)
Generates a report and returns the output as formatted HTML.
      
      Input Parameters:
        
          | <int> reportId | Required | The report Id. | 
          | <string> user | Required | The user name. | 
          
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        Code Snippet: 
require([
    "workflowmanager/WMReportTask", ...
], function(WMReportTask, ...) {
    
    var wmReportTask = new WMReportTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    var reportContent;
    wmReportTask.generateReport(401, "demo", function (data) {
        reportContent = data;
    });
    ...
});
        
                 
        
       
        getAllReports(callback, errback)
Get a list of all the reports (
Report[]) that are configured in the ArcGIS Workflow Manager (Classic) system. If the request is successful, the user-specified callback function is invoked with the result as a 
Report[]. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
        
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        Sample 
require([
    "workflowmanager/WMReportTask", ...
], function(WMReportTask, ...) {
    
    var wmReportTask = new WMReportTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    var reports = new Array();
    wmReportTask.getAllReports(function (data) {
        reports = data;
    });
    ...
});
        
           
              
      
        {string} getReportContentURL(reportId, user)
Returns the URL string for the report content.
      
      Input Parameters:
                  
          | <int> reportId | Required | The report Id. | 
          | <string> user | Required | The user name. | 
          
        
        
		- Returns:
- {string} URL String for the report content.
Sample 
require([
    "workflowmanager/WMReportTask", ...
], function(WMReportTask, ...) {
    
    var wmReportTask = new WMReportTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    var reportContentURL = wmReportTask.getReportContentURL(401, "demo"); 
        window.open(reportContentURL, "_blank");
    });
    ...
});
        
               
        
      
        getReportData(reportId, user, callback, errback)
Executes a report and returns the raw result set (
ReportData). If the request is successful, the user-specified callback function is invoked with the result as a 
ReportData. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
                  
          | <int> reportId | Required | The report Id. | 
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
   
        Code Snippet: 
require([
    "workflowmanager/WMReportTask", ...
], function(WMReportTask, ...) {
    
    var wmReportTask = new WMReportTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    var reportData;
    wmReportTask.getReportData(401, "demo", function (data) {
        reportData = data;
    }); 
    ...
});
 
        
              
        
      
        getReportStylesheet(reportId, callback, errback)
Get the XSLT stylesheet for the specified report. If the request is successful, the user-specified callback function is invoked with the result as a string. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
                          
          | <string> dataWorkspaceId | Required | The dataWorkspace Id. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        Code Snippet: 
require([
    "workflowmanager/WMReportTask", ...
], function(WMReportTask, ...) {
    
    var wmReportTask = new WMReportTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    var styleSheet;
    wmReportTask.getReportStylesheet(401, function (data) {
        styleSheet = data;
    }); 
    ...
});