Skip to content

Martini Workflow Inputs & Outputs

Overview

Workflow Inputs & Outputs define the data contracts for your workflows - what data flows in and what comes out. This makes your workflows predictable, reusable, and easy to integrate with other systems.

When to Use This

Use workflow inputs and outputs when you need to:

  • Validate incoming data: Ensure requests match expected formats before processing
  • Create reusable workflows: Define clear contracts for workflow integration
  • Structure response data: Return consistent, well-formatted results
  • Build API backends: Turn workflows into REST API endpoints with structured data.

Prerequisites

Getting Started: Build Your First Input-Output Workflow

Let's create a basic workflow that accepts text input and returns an uppercase version. This example demonstrates the complete flow from input to output.

Step 1: Create Input and Output Properties

  1. Open your workflow from your Martini Package in the Navigator
  2. Click the Configure Input/Output Properties icon to open the Input/Output panel
  3. Create an Input Property:
    • In the Input Properties section, click Add
    • Select String from the dropdown
    • Name it inputText and press Enter
  4. Create an Output Property:
    • In the Output Properties section, click Add
    • Select String from the dropdown
    • Name it outputText and press Enter

Expected result: Your workflow now has one input property (inputText) and one output property (outputText).

Step 2: Add a Map Node

  1. Navigate to your Martini Package and open your workflow
  2. Click the Add Node button in the toolbar at the top left of the editor
  3. Select Map from the available node types
  4. Drag the Map node to your desired position in the workflow
  5. Connect it to the Start Trigger Node using workflow edges

Step 3: Configure the Mapping Expression

  1. Open the Map Panel by clicking the expand icon on your Map Node
  2. In the left panel (Input), you'll see your inputText property
  3. In the right panel (Output), you'll see your outputText property
  4. Create the mapping:
    • Right-click on the outputText property in the right panel
    • Select "Set Expression" from the context menu
    • Set the Language to Groovy on the dropdown on the lower-right of the Set Expression editor
    • Enter the expression: inputText.toUpperCase()
    • Click Apply to save the expression

Step 4: Test Your Workflow

  1. Save your workflow (Ctrl+S)
  2. Click the run button in the toolbar on the top left of the Workflow Designer
  3. In the Workflow Configuration dialog that appears, enter a test value like hello world for inputText
  4. Click "Run"
  5. In the Console View, select the Output tab - you should see HELLO WORLD in outputText

Understanding What You Just Used

Now that you've built a working example, let's explore everything you just worked with in more detail. Understanding these features will help you create more sophisticated workflows and troubleshoot issues as your projects grow.

Workflow Input/Output Panel

The Workflow Input/Output Panel is your control center for managing workflow data structures. It's where you define what data your workflow expects and what it returns.

Getting Started

  1. Go to your Martini Package and open your workflow in the Navigator
  2. Click the Configure Input/Output Properties icon in the toolbar (top-left area of the Workflow Designer) to open the Input/Output panel at the bottom of the designer

Expected result: A split panel appears showing Input Properties (left) and Output Properties (right).

Key Terms

Term Definition
Input Properties Data your workflow needs to run - automatically available to all workflow nodes
Output Properties Data your workflow returns after execution - collected from various workflow steps
Model Complex data type containing multiple nested properties, like a JSON object with structure
Nested Properties Properties inside a Model, creating hierarchical data like user.profile.email
Property Reference Anytime you use a property's name to get its value—like calling it in a node, script, or expression, just as you would use a variable in code.

Configuration Properties

Property-Level Controls (Appear when hovering over or selecting a property)

Property What It Controls
Configure Opens detailed settings for property customization

Toolbar Controls (Available for both Input and Output sections)

Property What It Controls
Add Creates new properties with your chosen data type
Delete Removes selected properties from the workflow
Move Up / Move Down Reorders properties in the list
Move Left / Move Right Changes property nesting level within Models

View Options

Property What It Controls
Collapse All / Expand All Controls visibility of nested Model properties
Find Searches properties by name across large lists
More Options Additional view and display options

More Options Dropdown Menu

Option What It Controls
Toggle Comments Show or hide comments added to properties for better workflow understanding
Tree View Shows hierarchical property structure
Show JSON Preview Displays properties in JSON format
Show XML Preview Displays properties in XML format
Show YAML Preview Displays properties in YAML format

How It Works

The panel operates on a simple principle: define once, use everywhere. When you create input properties, they become automatically available in every workflow node. Output properties collect data as your workflow executes.

Data Flow Process:

  1. Input properties receive data when the workflow starts (from API calls, other workflows, or manual triggers)
  2. Workflow nodes access input properties and populate output properties during execution
  3. Output properties return structured results to the calling system - this can be used as a response to an API request, data passed to another workflow, or results returned to any other calling system

Why It Matters

Well-defined inputs and outputs make your workflows easier to understand, use and maintain:

  • Predictable Integration: Clear contracts make workflows easy to connect with other systems
  • Automatic Validation: Martini validates incoming data against your property definitions
  • Self-Documenting: Properties serve as live documentation for your workflow's capabilities
  • Error Prevention: Type checking catches data issues before workflow execution
  • Reusability: Standard interfaces make workflows portable across projects

Adding Properties

Create the data fields your workflow needs to receive and return.

Getting Started

  1. Open the Workflow Input/Output panel in your workflow
  2. In either the Input Properties or Output Properties section, click the Add button
  3. Select your desired data type from the dropdown
  4. Name your property: Enter a descriptive name and press Enter

Expected result: Your new property appears in the properties list, ready for configuration.

Modifying Properties

Update property names, types, and configurations as your workflow requirements evolve.

Getting Started

Rename A Property

There are two ways to rename properties depending on whether they're already used in your workflow:

  1. Simple Rename (for unused properties):

    • Double-click the property name in the Workflow Input/Output panel
    • Enter the new name and press Enter
  2. Refactor Rename (for properties already used in workflow nodes):

Change A Property's Data Type

  1. Right-click the property you want to modify
  2. Hover over the Convert To option from the menu
  3. Select a new data type for your property

Change Property Configuration

  1. Right-click the property you want to modify
  2. Select "Show Configuration" from the menu

    Alternatively, you can hover over or select the property and click the Configure button that appears (see Property-Level Controls)

  3. Modify settings in the Configuration View on the right

  4. Apply changes and test your workflow

Expected result: The property reflects your changes. For Refactor Renames, Martini will update most references automatically, but scripts and expressions that reference the property will require manual fixing.

Troubleshooting

Problem Detection Cause Fix
Workflow nodes show errors after rename Red error flags on nodes Nodes still reference old property name Use Refactor > Rename instead of simple rename to automatically update references, or manually update each node's property mapping

Deleting Properties

There are two ways to delete properties depending on whether they're already used in your workflow.

Getting Started

Method 1: Simple Delete (for unused properties)

  1. Select properties to delete: Click on property names (hold Ctrl to select multiple)
  2. Click the Delete button: Use the Delete button in the toolbar
  3. Confirm removal: Properties disappear from the list immediately

Method 2: Refactor Delete (for properties used in workflow nodes)

  1. See Using Refactor for Safe Property Changes for detailed instructions
  2. Manual cleanup: Update any scripts or expressions that referenced the deleted properties

Expected result: Selected properties are removed. Refactor Delete handles most references automatically, but scripts and expressions need manual updates.

Troubleshooting

Problem Detection Cause Fix
Workflow execution fails Runtime errors during testing Nodes still trying to access deleted properties Use Refactor > Delete instead of simple delete, or manually update all nodes with error flags
API responses missing data Client applications receive incomplete data Deleted output properties that clients expect Restore properties or update client applications accordingly

Using Refactor for Safe Property Changes

When you need to modify properties that are already in use in your workflow, the Refactor feature will allow you to update references across your workflow nodes, preventing errors due to outdated references. Note that while Refactor handles most references automatically, scripts and expressions require manual updates.

Getting Started

  1. Right-click the property you want to modify
  2. Select "Refactor" from the context menu
  3. Choose your action:

    • Rename: Change the property name and update most references. e.g. map lines
    • Delete: Remove the property and automatically clean up most references
    • Move: Change the property's position or nesting level
  4. Review the reference list: Martini displays a dialog showing:

    • Current property usage: All workflow nodes and mappings that currently reference this property
    • What will be updated: Each item shows exactly what changes will be made during refactoring

    Your options:

    • All references are checked by default (recommended for most cases)
    • Uncheck specific references if you want to keep some unchanged
    • Keep all checked to update everything automatically
  5. Click "Apply" to execute the changes

Expected result: Martini updates workflow node references. Note that scripts and expressions require manual review and updates.

How It Works

✅ Refactor automatically handles:

  • Map line and set expression references
  • Repeat node input and output array references
  • Property declaration references

⚠️ Requires manual updates:

Any reference in code such as:

  • Repeat node condition scripts
  • Script node script
  • Fork node expression
  • Wait for time node date expression
  • Mapper set expressions

Tip: After using Refactor, always test your workflow to ensure scripts and expressions still work correctly.

Why It Matters

Refactor is essential for maintaining workflow integrity when properties are already in use:

  • Prevents Errors from Outdated References: Automatically updates most property references, avoiding runtime errors
  • Saves Development Time: No need to manually hunt down and update each reference across complex workflows
  • Reduces Human Error: Eliminates the risk of missing property references when making changes
  • Maintains Data Flow: Preserves the logic and structure of your workflow while allowing safe modifications
  • Enables Confident Changes: Make property updates without fear of breaking existing functionality

When to Choose Each Method:

Situation Recommended Method Why
Property is already in use in workflow nodes Use Refactor Automatically updates all map lines and property references
Unsure if property is used Use Refactor Safer option - handles references if they exist
New property not yet used anywhere Simple rename/delete No references to update

Helpful Resources