• Blog
  • Documentation
  • Pricing
  • FAQ
  • Contact
Sign InSign Up

The modern toolkit for Accela developers

© Copyright 2025 Radishapps. All Rights Reserved.

Product
  • Documentation
  • Pricing
  • FAQ
Resources
  • Blog
  • Contact
Legal
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
    • Getting Started with RadishKit
    • Sign Up & Create Account
    • Set Up Your Agency
    • Install the CLI
    • Install VS Code Extension
    • Execute Your First Script
    • Team Collaboration
    • Overview
    • CLI Commands Reference

Execute Your First Script

Learn how to test and execute your first Accela script using the RadishKit CLI and web interface

Now that you have RadishKit set up, let's execute your first Accela script. This guide will walk you through testing a script safely and understanding the results.

Prerequisites

Before executing your first script, ensure you have:

  • RadishKit account with an agency and environment configured
  • CLI installed and linked to your environment
  • VS Code extension installed (optional but recommended)
  • Wrapper script installed in your Accela environment

Understanding Script Testing

Safe Testing with Rollback

RadishKit uses a rollback mechanism for safe script testing:

  • Test mode (default): Scripts run but changes are automatically rolled back
  • Commit mode: Scripts run and changes are committed to the database
  • Always test first: Never run in production mode without testing

Script Types

RadishKit supports several types of Accela scripts:

  • Solution Scripts: General-purpose scripts for data manipulation
  • Event Scripts: Scripts triggered by Accela events (ASA, WTUA, IRSA)
  • Batch Scripts: Scheduled or bulk processing scripts
  • SQL Queries: Direct database queries for data analysis

Your First Script Test

Step 1: Create a Simple Script

Create a basic test script to verify your setup:

// Scripts/Solution/HelloWorld.js
function main() {
    // Simple test script
    var message = "Hello from RadishKit!";
    console.log(message);
    
    // Return success
    return {
        success: true,
        message: message
    };
}

Step 2: Test the Script

Run your first script test:

accli test script Scripts/Solution/HelloWorld.js

Step 3: Understand the Results

The CLI will display:

  • Script execution status
  • Console output from your script
  • Return values from the script
  • Execution time and performance metrics

Interactive Parameter Mode

When you run a script without parameters, the CLI will ask:

Option 1: Run Without Parameters

Do you want to run without parameters? (y/n)
  • Yes: Execute the script as-is
  • No: Proceed to parameter selection

Option 2: Use Existing Parameter Set

Use existing parameter set? (y/n)
  • Yes: Select from previously saved parameter sets
  • No: Create new parameters

Option 3: Create New Parameter Set

Enter parameters for this script:
Parameter 1: value1
Parameter 2: value2
  • Enter parameters interactively
  • Parameters are saved for future use

Non-Interactive Mode

For automation and scripting, use the --param flag:

accli test script Scripts/Solution/MyScript.js \
  --param "recordId=PR2024-001" \
  --param "status=Complete" \
  --param "department=Building"

Testing Different Script Types

Solution Scripts

# Basic solution script
accli test script Scripts/Solution/UpdateRecord.js

# With parameters
accli test script Scripts/Solution/UpdateRecord.js \
  --param "recordId=PR2024-001" \
  --param "newStatus=Approved"

Event Scripts

# ASA (ApplicationSubmitAfter) event
accli test event asa Scripts/Event/ASA_Handler.js --record "PR2024-001"

# WTUA (WorkflowTaskUpdateAfter) event
accli test event wtua Scripts/Event/WTUA_Handler.js \
  --record "PR2024-001" \
  --task "Review" \
  --status "Complete"

# IRSA (InspectionResultSubmitAfter) event
accli test event irsa Scripts/Event/IRSA_Handler.js \
  --record "PR2024-001" \
  --inspection "Electrical"

Batch Scripts

# Basic batch script
accli test batch Scripts/Batch/DailyReport.js

# With parameters
accli test batch Scripts/Batch/DailyReport.js \
  --param "StartDate=2024-01-01" \
  --param "EndDate=2024-01-31" \
  --param "Department=Building"

SQL Queries

# Basic SQL query
accli test sql queries/MyQuery.sql

# Remove safety limit (use with caution)
accli test sql queries/MyQuery.sql --no-limit

Understanding Results

Successful Execution

A successful script execution will show:

  • Status: "SUCCESS" or "COMPLETED"
  • Execution time: How long the script took to run
  • Console output: Any console.log() messages
  • Return values: Data returned by the script
  • Database changes: What was modified (in test mode, these are rolled back)

Error Handling

If a script fails, you'll see:

  • Error message: What went wrong
  • Stack trace: Where the error occurred
  • Execution logs: Detailed error information
  • Suggestions: How to fix the issue

Rollback Confirmation

In test mode, you'll see:

  • Rollback status: "Changes rolled back successfully"
  • Data restored: Original data is restored
  • Safe testing: No permanent changes made

Monitoring and Logs

Viewing Execution Logs

  1. In the CLI: Results are displayed in the terminal
  2. In RadishKit Web: Go to your agency → Scripts → Executions
  3. Detailed logs: Click on any execution for full details

Understanding Logs

Execution logs include:

  • Script content: The actual script that was executed
  • Parameters used: All parameters passed to the script
  • Console output: All console.log() messages
  • Database changes: What was modified
  • Performance metrics: Execution time and resource usage

Best Practices

Development Workflow

  1. Write your script in VS Code with the extension
  2. Test locally using the CLI
  3. Review results in the web interface
  4. Iterate and improve based on results
  5. Deploy when ready using production mode

Testing Strategy

  1. Start simple: Test basic functionality first
  2. Add complexity: Gradually add more features
  3. Test edge cases: Try different parameter combinations
  4. Review thoroughly: Check all execution logs
  5. Get approval: Have team members review before production

Parameter Management

  • Save common parameters: Use the interactive mode to save frequently used parameters
  • Document parameters: Add comments explaining what each parameter does
  • Test variations: Try different parameter combinations
  • Version control: Include parameter documentation in your scripts

Troubleshooting

Common Issues

Script not found:

  • Check the file path is correct
  • Ensure the script file exists
  • Verify you're in the right directory

Execution errors:

  • Check the script syntax
  • Verify all required parameters are provided
  • Review the error message for clues

Connection issues:

  • Run accli status to check your connection
  • Verify your environment is properly configured
  • Check that the wrapper script is installed in Accela

Permission errors:

  • Ensure your Accela user has script execution permissions
  • Check that the wrapper script is properly installed
  • Verify your credentials are correct

Getting Help

For script execution issues:

  • Check the logs in the RadishKit web interface
  • Review error messages for specific guidance
  • Contact support at aaron@radishapps.com
  • Check documentation for additional help

Next Steps

Congratulations! You've successfully executed your first script. Now you can:

  1. Learn CLI Commands - Master all CLI commands
  2. Explore Data Queries - Use the web interface for SQL queries
  3. Manage Scripts - Organize and deploy your scripts
  4. Team Collaboration - Work with your team

Ready to learn more about the CLI? Continue to CLI Commands!

  1. Prerequisites
    1. Understanding Script Testing
      1. Safe Testing with Rollback
      2. Script Types
    2. Your First Script Test
      1. Step 1: Create a Simple Script
      2. Step 2: Test the Script
      3. Step 3: Understand the Results
    3. Interactive Parameter Mode
      1. Option 1: Run Without Parameters
      2. Option 2: Use Existing Parameter Set
      3. Option 3: Create New Parameter Set
    4. Non-Interactive Mode
      1. Testing Different Script Types
        1. Solution Scripts
        2. Event Scripts
        3. Batch Scripts
        4. SQL Queries
      2. Understanding Results
        1. Successful Execution
        2. Error Handling
        3. Rollback Confirmation
      3. Monitoring and Logs
        1. Viewing Execution Logs
        2. Understanding Logs
      4. Best Practices
        1. Development Workflow
        2. Testing Strategy
        3. Parameter Management
      5. Troubleshooting
        1. Common Issues
        2. Getting Help
      6. Next Steps