Run (Activity)


  • Purpose: This is a more generic scripting or code execution activity. The specific type of code it runs might be configurable or depend on the workflow engine's capabilities.
    It could be designed to execute:
    • JavaScript (as an alternative to the "JavaScript" activity, or with different configuration options).
    • Python scripts.
    • Other scripting languages supported by the workflow engine.
    • Potentially, even compiled code or external executables in more advanced scenarios.


  • Functionality: The "Run" activity is a flexible code execution component. Its configuration would depend on the specific type of scripting or code execution it's designed for, but it generally involves:
    • Code Editor/Script Input: An area to write or paste the code to be executed.
    • Language Selection (Potentially): If it supports multiple languages, a dropdown or setting to choose the scripting language (e.g., JavaScript, Python).
    • Input Variables: Mechanism to pass workflow data into the script.
    • Output Variables: Mechanism to capture results from the script and use them in the workflow.
    • Execution Environment: The workflow engine provides an environment to run the script, which might include access to specific libraries or APIs.

  • Use Cases:
    • Versatile Code Execution: Providing a general-purpose activity for running custom code of various types within workflows.
    • Integration with Different Scripting Languages: Allowing workflows to leverage the strengths of different scripting languages (e.g., Python for data science tasks, JavaScript for web-related logic).
    • Extending Workflow Functionality: Providing a way to add custom functionalities or integrations that are not available as pre-built activities.
    • Performing System Operations (Potentially): In some workflow engines, "Run" activities might be configured to execute system commands or interact with the operating system (with appropriate security considerations).

How to Use Scripting Activities:
  • 1. Drag and drop a Scripting activity ("JavaScript" or "Run") from the Scripting section onto your workflow canvas.
  • 2. Configure the properties of the chosen activity:
    • For JavaScript: Write your JavaScript code in the provided script editor. Define input variables to pass data from the workflow to your script, and output variables to capture results.
    • For Run: Configure the type of script to run (if configurable), write or specify the script code, and define input and output variable mappings.
  • 3. Connect the Scripting activities within your workflow to integrate custom code execution into your automated processes. You can use input variables to provide data to the script from previous activities and use output variables from the script in subsequent activities.
  • 4. Test your workflow thoroughly, especially when using scripting activities, to ensure the code behaves as expected and handles potential errors gracefully.
  • 5. Save and activate your workflow. When executed, the Scripting activities will run your custom code as part of the workflow logic.

Benefits of Using Scripting Section:
  • Highly Customizable Workflow Logic: Enables you to add very specific and complex logic to your workflows using scripting languages.
  • Flexibility and Extensibility: Provides a way to extend the capabilities of the workflow engine beyond pre-built activities and integrate custom functionalities.
  • Advanced Data Manipulation: Allows for intricate data transformations, calculations, and processing using the power of scripting languages.
  • Integration with External Libraries (Potentially): Depending on the workflow engine, scripting activities might allow you to leverage external libraries and modules within your scripts, further expanding capabilities.
  • Rapid Prototyping and Iteration: Scripting activities can be useful for quickly prototyping and iterating on complex workflow logic, especially when dealing with dynamic or evolving requirements.

By utilizing the Scripting section activities, you can significantly enhance the power and flexibility of your ELSA workflows, enabling you to automate processes that require custom code, complex data manipulation, and integration with diverse systems and functionalities. However, remember to use scripting judiciously and ensure proper testing and security practices when embedding custom code within your workflows.