Ask AI
Skip to main content

Calling Actions in NoCode-X: Complete Guide

Introduction

In NoCode-X, actions are the building blocks of your application's logic. Understanding how to call actions with different execution modes and caching strategies is crucial for building performant, scalable applications. This guide covers the four primary ways to execute actions in NoCode-X, each optimized for specific use cases.


Overview of Action Execution Modes

NoCode-X provides flexible action execution strategies that allow you to optimize performance based on your specific needs:

Execution ModeWaits for CompletionReturns ResultBlocks UIBest For
Synchronous✅ Yes✅ Yes✅ YesSequential operations, immediate results needed
Asynchronous (No Frontend Answer)❌ No❌ No❌ NoFire-and-forget tasks, background processing
Asynchronous (With Frontend Answer)⏳ Partial✅ Yes❌ NoLong-running tasks with results needed
With Cache⚡ First time only✅ Yes⏳ First time onlyRepeated operations with same inputs

1. Synchronous Execution (Default)

What is Synchronous Execution?

Synchronous execution is the default mode in NoCode-X. When you call an action synchronously, the system waits for the action to complete before continuing with the next operation. The calling process is blocked until the action returns a result.

How It Works

User Action → Call Action → Wait for Completion → Receive Result → Continue

Characteristics

  • Sequential Processing: Operations execute one after another in strict order
  • Blocking: The UI and subsequent operations wait for completion
  • Immediate Results: Results are available immediately after execution
  • Predictable Flow: Easy to debug and understand

When to Use Synchronous Execution

Use synchronous execution when:

  • You need the result immediately for the next operation
  • The action completes quickly (< 2 seconds)
  • Order of operations is critical
  • You're performing data validation before proceeding
  • Creating, updating, or deleting data that affects subsequent logic

Avoid synchronous execution when:

  • The action takes a long time to complete (> 3 seconds)
  • You're loading images or large files
  • Making external API calls with unpredictable response times
  • The user doesn't need to wait for the result

Example Use Cases

  • Form Validation: Checking if a username exists before registration
  • Data Creation: Creating a record and immediately using its ID
  • Sequential Workflows: Multi-step processes where each step depends on the previous
  • Calculations: Computing values needed for display

Configuration in NoCode-X

  1. Open the Functions editor
  2. Add a Call Action block
  3. Select your target action
  4. Leave the execution mode at default (synchronous)
  5. Connect the output to subsequent blocks that need the result

2. Asynchronous Execution (No Frontend Answer)

What is Asynchronous Execution Without Frontend Answer?

This mode executes the action in the background without waiting for it to complete. The calling process continues immediately, and no result is returned to the frontend. This is a "fire-and-forget" pattern.

How It Works

User Action → Trigger Action → Continue Immediately ↓ (Executes in Background)

Characteristics

  • Non-Blocking: UI remains responsive
  • No Return Value: Results are not sent back to the caller
  • Background Processing: Executes independently
  • Improved Performance: Doesn't slow down user interactions

When to Use Asynchronous (No Frontend Answer)

Use this mode when:

  • Logging or audit trail operations
  • Sending notifications or emails
  • Triggering background data processing
  • Analytics or tracking events
  • The result doesn't affect the user experience
  • You want to improve perceived performance

Avoid this mode when:

  • You need the result for subsequent operations
  • Error handling is critical for the user flow
  • The operation must complete before proceeding

Example Use Cases

  • Audit Logging: Recording user actions without slowing down the interface
  • Email Notifications: Sending confirmation emails after registration
  • Analytics: Tracking user behavior for reporting
  • Background Sync: Updating external systems without blocking the user

Configuration in NoCode-X

  1. Open the Functions editor
  2. Add a Call Action block
  3. Select your target action
  4. Change execution mode to Asynchronous (No Frontend Answer)
  5. The action will execute in the background without blocking

3. Asynchronous Execution (With Frontend Answer)

What is Asynchronous Execution With Frontend Answer?

This mode executes the action in the background but returns the result to the frontend when complete. The UI doesn't block, but you can still access the result once it's available.

How It Works

User Action → Trigger Action → Continue with UI ↓ (Executes in Background) ↓ Result Returned → Handle Response

Characteristics

  • Non-Blocking: UI remains responsive during execution
  • Returns Result: Result is available when processing completes
  • Better UX: Users can interact with the app while waiting
  • Callback Handling: Requires handling the response asynchronously

When to Use Asynchronous (With Frontend Answer)

Use this mode when:

  • Loading images or media files
  • Making external API calls
  • Processing large datasets
  • Operations take > 3 seconds
  • You need the result but don't want to block the UI
  • Improving user experience during long operations

Avoid this mode when:

  • The next operation immediately depends on the result
  • The action completes very quickly (< 500ms)
  • Synchronous execution is simpler and sufficient

Example Use Cases

  • Image Loading: Loading profile pictures without freezing the UI
  • API Calls: Fetching data from external services
  • Report Generation: Creating complex reports in the background
  • File Processing: Uploading and processing large files

Configuration in NoCode-X

  1. Open the Functions editor
  2. Add a Call Action block
  3. Select your target action
  4. Change execution mode to Asynchronous (With Frontend Answer)
  5. Handle the response in your UI logic

Demonstration Example

As shown in the NoCode-X Campfire session, loading images asynchronously dramatically improves user experience:

Synchronous Image Loading:

  • User clicks "Load Image"
  • UI freezes for 5 seconds
  • Image appears
  • User can interact again

Asynchronous Image Loading:

  • User clicks "Load Image"
  • UI remains responsive immediately
  • User can continue working
  • Image appears when loaded (5 seconds later)

4. Execution With Cache

What is Cached Execution?

Caching stores the result of an action execution so that subsequent calls with the same inputs return the cached result instantly, without re-executing the action.

How It Works

First Call: User Action → Call Action → Execute → Store Result in Cache → Return Result

Subsequent Calls (Same Inputs): User Action → Call Action → Check Cache → Return Cached Result (Instant!)

Characteristics

  • Performance Boost: Dramatically faster for repeated operations
  • Input-Based: Cache key is based on action parameters
  • Automatic Management: NoCode-X handles cache storage and retrieval
  • First-Call Penalty: First execution takes normal time

When to Use Caching

Use caching when:

  • The same action is called multiple times with identical inputs
  • The action performs expensive operations (database queries, calculations)
  • Results don't change frequently
  • You want to optimize performance for repeated operations
  • Loading reference data or configuration

Avoid caching when:

  • Results change frequently
  • Each call requires fresh data
  • The action has side effects (creates/updates/deletes data)
  • Memory constraints are a concern

Example Use Cases

  • Dropdown Options: Loading the same list of countries repeatedly
  • User Permissions: Checking permissions multiple times in a session
  • Configuration Data: Loading app settings
  • Reference Data: Product categories, status codes, etc.
  • Expensive Calculations: Complex computations with the same inputs

Configuration in NoCode-X

  1. Open the Functions editor
  2. Add a Call Action block
  3. Select your target action
  4. Enable Cache option
  5. The first execution will cache the result
  6. Subsequent calls with the same parameters return instantly

Demonstration Example

From the NoCode-X Campfire session:

Without Cache:

  • First execution: 5 seconds
  • Second execution: 5 seconds
  • Third execution: 5 seconds

With Cache:

  • First execution: 5 seconds (normal execution + cache storage)
  • Second execution: Instant (< 100ms from cache)
  • Third execution: Instant (< 100ms from cache)

Combining Execution Modes

Asynchronous + Cache

You can combine asynchronous execution with caching for optimal performance:

  • First call: Executes asynchronously in background, caches result
  • Subsequent calls: Returns cached result instantly
  • Best of both worlds: Non-blocking + fast repeated access

Load Gallery:

Trigger async action to load all images (with cache enabled) UI remains responsive Images load in background Results cached Next time user opens gallery: instant load from cache


Action Block Color Coding

NoCode-X uses color coding in the Functions editor to help you visually distinguish different types of actions:

  • Data Creation Actions: Specific color
  • Data Deletion Actions: Specific color
  • API Call Actions: Specific color
  • Other Action Categories: Each with distinct colors

This visual system helps you quickly understand your action flow at a glance.


Best Practices

Performance Optimization

  1. Use asynchronous execution for I/O operations: API calls, file uploads, image loading
  2. Enable caching for reference data: Dropdown options, configuration, permissions
  3. Keep synchronous actions fast: < 2 seconds execution time
  4. Batch operations when possible: Combine multiple calls into one

User Experience

  1. Show loading indicators: For asynchronous operations with frontend answers
  2. Provide feedback: Let users know background operations are in progress
  3. Handle errors gracefully: Especially for asynchronous operations
  4. Don't block unnecessarily: Use async when the user doesn't need to wait

Debugging and Testing

  1. Test with realistic data volumes: Cache performance varies with data size
  2. Monitor action execution times: Identify candidates for async conversion
  3. Clear cache during testing: Ensure you're testing actual execution
  4. Use application logs: Track asynchronous operation completion

Security Considerations

  1. Validate inputs before caching: Don't cache results from invalid inputs
  2. Consider cache invalidation: For data that changes based on permissions
  3. Audit background operations: Especially for data modifications
  4. Handle timeout scenarios: For long-running async operations

Troubleshooting Common Issues

Issue: Synchronous Action Takes Too Long

Solution: Convert to asynchronous execution with frontend answer

  • Improves perceived performance
  • Keeps UI responsive
  • Still provides results when needed

Issue: Cached Data is Stale

Solution:

  • Implement cache invalidation logic
  • Use shorter cache TTL (if available)
  • Disable cache for frequently changing data

Issue: Asynchronous Action Errors Not Visible

Solution:

  • Implement proper error handling
  • Use application logs to track background operations
  • Consider using async with frontend answer for critical operations

Issue: Too Many Concurrent Async Operations

Solution:

  • Implement rate limiting
  • Queue operations
  • Use synchronous execution for critical path operations

Additional Resources


Summary

Understanding action execution modes in NoCode-X is essential for building performant applications:

  • Synchronous: Default mode, blocks until complete, use for quick operations needing immediate results
  • Asynchronous (No Answer): Fire-and-forget, use for logging, notifications, background tasks
  • Asynchronous (With Answer): Non-blocking with results, use for long operations like API calls and image loading
  • With Cache: Stores results for repeated calls, use for reference data and expensive operations

Choose the right execution mode based on your specific requirements for performance, user experience, and data freshness. Combine modes strategically to build responsive, scalable applications.


This tutorial is based on the NoCode-X Campfire session and official documentation. For the latest features and updates, always refer to docs.nocode-x.com.