Analytic development workflow

The following workflow is a suggested approach for developing analytics. To make it easier to isolate errors, the workflow separates developing the body of the script from adding the analytic header. The workflow is a suggestion only and you are free to develop analytics in whatever manner best suits you.

For additional guidelines, and information about best practices, see Analytic development guidelines.

  1. Write a script

    Write a regular ACL script in ACL Analytics. Do not use any custom dialog boxes for user input, or any other features that require user interaction during the running of the script. Instead, temporarily create variables at the top of the script for storing test input values. For example:

    ASSIGN v_AnalysisTable = "Trans_May"

    Analytics allow user input prior to running an analytic, but unlike scripts do not support user interaction during the running of the analytic.

  2. Test and debug the script

    Test and debug the script until it executes without errors.

  3. Add an analytic header

    Add an analytic header to the script. For more information, see Adding analytic headers. Copy the variable names from the top of the script to the corresponding tags in the analytic header. For example:

    //TABLE v_AnalysisTable "Table to classify"
  4. Include the log in the results

    Include the following line at the end of the analytic header to ensure that a log is available every time you run an analytic in AX Client, AX Web Client, or the Analysis App window, whether the analytic succeeds or fails:

    //RESULT LOG

    The log is a crucial tool for diagnosing the cause of analytic failures, but can also be important when analytics succeed but give unexpected results. The log is automatically output when an analytic fails, but it is only output when an analytic succeeds if you specify the line above. You can choose to remove the line prior to distributing an analysis app to users.

  5. Validate the analytic header

    Validate the analytic header. For more information, see Validating analytic headers. You can validate the analytic header as frequently as you want.

  6. Assign temporary test values

    Using the assignment syntax (:=), assign temporary test values to all analytic tags that require user input. You can copy the test values from the temporary variable assignments at the top of the script. For example:

    //TABLE v_AnalysisTable "Table to classify" := "Trans_May"

    A space must separate the tag name from the assignment syntax. Character test values must be enclosed in quotation marks. Date test values must be enclosed in backquotes and use the supported formats (YYYYMMDD or YYMMDD) – for example, `20141231`

  7. Delete the temporary variables

    Delete the temporary variables from the top of the script, or comment them out if you think you might want to use them again.

  8. Step through the analytic

    Step through the analytic by clicking Step , or by pressing F10 repeatedly. Review the contents of the Variables tab in the Navigator to ensure that all variables in the analytic header are being created correctly, with the correct assignment of test values.

    Test and debug the analytic until it executes without errors.

    Note

    If you want to exit the analytic before it completes, press Esc and click Yes in the confirmation prompt.

    Tip

    You can delete all variables and variable assignments from the ACL project by entering DELETE ALL OK in the command line. Clearing the Variables tab prior to stepping through an analytic gives you a clean start.

  9. Delete the temporary test values

    Delete the temporary test values and the assignment syntax from all analytic tags.

  10. Repeat the process for each analytic

    Repeat the same process (steps 1 to 9) for each additional analytic you are including in the analysis app.

  11. Delete redundant table layouts

    Once all analytics and any subscripts in the analysis app are tested, debugged, and executing correctly, delete any table layouts from the ACL project that you are not going to include in the analysis app. Redundant table layouts will clutter the analysis app in AX Client, AX Web Client, and the Analysis App window, and could be confusing to end users.

  12. Open the analysis app in the Analysis App window

    Open the completed analysis app in the Analysis App window by right-clicking the ACL project entry in the Overview tab and selecting Open as Analysis App.

    You can also click Open as Analysis App  in the Script Editor toolbar.

    If the analysis app fails to open and you get an error message stating that analytics have identical names, check the name value in the ANALYTIC tag for each analytic specified in the error message. The analytic name values must be unique in an ACL project.

  13. Run the analytics

    Run all the analytics in the analysis app to confirm that they are functioning correctly. For more information, see Running analytics in the Analysis App window.

    Observe the correct order for running the analytics if you are using the TYPE option with the ANALYTIC tag and creating import, preparation, and analysis analytics.

  14. Check the log

    If an analytic fails, open and review the log file (analytic_name.log). The log should include an entry, marked with a red X, that indicates why the analytic failed.

    If the error was caused by an incorrectly entered input value, you can immediately re-run the analytic with a correctly entered input value. If the error occurs in the analytic header or the body of the script, you need to exit the Analysis App window, correct the error in ACL Analytics, and then reopen the analysis app in the Analysis App window and re-run the corrected analytic.

    An analytic may succeed but the result table may not contain the results you were expecting. In this situation, review the log entries in sequence, and check the input values that have been passed to the analytic, to ensure that the analytic is functioning in the manner you intended.

  15. Package or import the analysis app

    Once you are satisfied the analysis app is working as intended, package it for distribution and use in the Analysis App window, or import it to AX Server for use in AX Client or AX Web Client. For more information, see Packaging analysis apps for the Analysis App window, or Importing analysis apps to AX Server.

  16. Run AX analysis apps

    If you are developing analytics for use in AX, run all analytics using both AX Client and AX Web Client to ensure they work as intended.



(C) 2015 ACL Services Ltd. All Rights Reserved.