Martini Workflows Invoke Service Node
Overview
The Invoke Service Node lets you call existing Martini services directly from your workflow. This makes it easy to reuse services across multiple workflows, helping you build modular, maintainable solutions without duplicating logic.
What You Will Learn
- How to add Invoke Service Nodes to your workflow
- How to use the Invoke Service Mapper Panel for property mapping and transformation
- How to create and map properties visually
- How to troubleshoot common issues
Prerequisites
- Martini Designer installed and running
- Create a Martini Package
- Create a Service
- Basic understanding of Workflow Designer
Adding Invoke Service Nodes to Workflows
To add an Invoke Service Node to your workflow:
- Open your Martini package in the Navigator and double-click your workflow to open the Workflow Designer.
- Locate the service(s) you want to invoke in your workflow from the same package.
Services are marked with a icon.
- Drag the service onto the Workflow Designer canvas.
- The service becomes an Invoke Service Node.
- Connect it to other nodes using workflow edges.
Quick Add: Invoke Service Node via Edge
To quickly add an Invoke Service Node using the content assist popup:
- Drag an edge from any node and drop it onto a blank area of the Workflow Designer canvas.
- In the popup, type to search for the desired service name.
- Double-click the service in the results or press Enter.
- The Invoke Service Node is added and automatically connected by the edge.
Expected result: An Invoke Service Node appears in your workflow, ready for property mapping and transformation in the Invoke Service Mapper Panel.
Invoke Service Mapper Panel
The Invoke Service Mapper Panel is a powerful visual interface for connecting and transforming data between your workflow and the services you invoke. It allows you to see all available properties, map workflow inputs to service inputs, and route service outputs back into your workflow. You can also declare new properties and set custom expressions.
The panel is divided into two main areas:
- Input Panel (left): Map workflow properties to service inputs.
- Output Panel (right): Map service outputs to workflow properties.
This intuitive layout helps you quickly understand how data moves through your workflow, making it easy to build robust integrations and automate business logic.
Getting Started
- Click the expand icon on your Invoke Service Node to open the Mapper Panel.
- The panel appears in the lower half of the Workflow Designer.
Expected result: You'll see the Mapper Panel with two main areas: Input (left) and Output (right). Each area is divided into three parts.
Input Panel Layout
The Input Panel is on the left side of the Mapper Panel. Below is a text diagram showing the Input Panel's structure:
1 2 3 4 | |
- Workflow Properties (left): These are the available properties from your workflow, including both workflow inputs and any properties created or updated by the current and previous nodes. You use these as sources to pass data into the service.
- Mapping Lines (middle): Visual connectors showing how data flows.
- Service Input Properties (right): These are the fields that your service expects as input. Any workflow property you map here will be passed into the service when the workflow runs.
Output Panel Layout
The Output Panel is on the right side of the Mapper Panel. Below is a text diagram showing the Output Panel's structure:
1 2 3 4 | |
- Service Output Properties (left): Source properties produced by the service.
- Mapping Lines (middle): Visual connectors showing how data flows.
- Workflow Current/Output Properties (right): Target properties in your workflow, including workflow outputs and any properties created or updated by the current and previous nodes.
Key Terms
| Term | Definition |
|---|---|
| Input Panel | Left side showing existing properties you can use as sources. Divided into: Workflow Input Properties (left), Mapping Lines (middle), Service Input Properties (right). |
| Output Panel | Right side for creating new properties or updating existing ones. Divided into: Service Output Properties (left), Mapping Lines (middle), Workflow Current and Output Properties (right). |
| Map Lines | Visual connections showing which input maps to which output. |
| Set Expression | Custom code that calculates a property's value. |
Configuration
| Control | Location | What It Does |
|---|---|---|
| Declare Property | Output panel | Add a new property |
| Delete | Both panels | Delete properties (only those created in this node) |
| Collapse All | Both panels | Hide nested properties |
| Expand All | Both panels | Show nested properties |
| Find | Both panels | Find specific properties quickly |
| Toggle Comments | Both panels | Show or hide comments added to properties for better workflow understanding |
How It Works
The Invoke Service Mapper Panel visually connects workflow properties to service inputs and outputs. When you map a workflow property to a service input, the value is passed to the service when the workflow runs. After the service executes, its output properties can be mapped back to workflow properties, making the results available for the next nodes or workflow outputs. You can also declare new properties and use set expressions for advanced data transformation, all within the panel.
Why It Matters
The Invoke Service Mapper Panel gives you complete control over data transformation. You can see what data you have, where it's going, and how it's being changed�all in one visual interface.
Map Lines
Map lines create direct connections between input and output properties, copying values from source to destination.
Getting Started
- Open the Invoke Service Mapper Panel by clicking the expand icon on your Invoke Service Node.
Mapping Workflow Properties to Service Input
- Find your source property in the leftmost area of the Input Panel (workflow properties).
- Drag from the source property to your target in the rightmost area of the Input Panel (service input properties).
- Release to create the map line.
- You've mapped your workflow input/current properties to the service's input, assigning values to the service.
Mapping Service Output to Workflow Properties
- Find your source property in the leftmost area of the Output Panel (service output).
- Drag from the source property to your target in the rightmost area of the Output Panel (workflow current/output properties).
- Release to create the map line.
- You've mapped your service's output properties to the workflow's current and output properties.
Expected result: Visual lines connect workflow inputs to service inputs, and service outputs to workflow outputs. Properties are assigned values when the workflow runs.
Creating Properties with Automatic Mapping
You can create properties in the Workflow Current and Output Properties area (rightmost of Output Panel) from the Mapper Panel. Several convenient methods exist:
Drag and Drop Method
- Drag to empty space: Drag from the service output (left area of Output Panel) to empty space in the workflow output area to automatically create a new property with the same name.
Right-Click Context Menu
You can use the right-click context menu for quick mapping actions:
- Output Panel (workflow output area):
- Declare Property and Map: Creates a new property in the workflow output area and immediately maps the selected service output property to it.
-
Add Property and Map: Adds a new property to the workflow output area and maps from it, using the same name.
-
Input Panel (service input area):
- Add Property and Map: Adds a new property to the workflow and maps it to the selected service input property.
These shortcuts save time by combining property creation and mapping in a single step, making workflow development more efficient.
Troubleshooting
| Problem | Detection | Cause | Fix | Affected Versions |
|---|---|---|---|---|
| Service not invoked | Workflow does not produce expected output | There are no edges connecting the Invoke Service Node to the rest of the workflow, Mapping missing or incorrect | Check Mapper Panel for correct property mapping | v2.2+ |
| Property not available | Property missing in Mapper Panel | Property not declared or mapped | Declare property in Output Panel and map correctly | v2.2+ |
Helpful Resources
- Martini Workflows Overview
- Basic Services - How to create and manage Martini services
- Workflow Concepts - Overview of workflow structure and edges
- Creating and Deleting Packages - Manage Martini packages
- Workflow Designer - Visual workflow editor guide
- Workflows Inputs & Outputs
- Community Q&A: Martini Community
Have a question? Post or search it here.