Skip to content

Martini Services Invoking Groovy Classes

Invoking various service workflows from your Groovy code in Martini is both possible and streamlined. A helpful wizard in Martini assists you by generating the necessary Groovy code snippet.

Here's how you can generate and use the code for invoking service workflows:

Generating the Invocation Code

Calling service workflows in Groovy

  1. Initiate Code Generation:

    • Right-click on the service workflow you wish to invoke.
    • Select Generate Invoke Code from the context menu.
  2. Select Syntax:

    • Choose the syntax for the generated code (Java or Groovy).
  3. Handling the Generated Code:

    • Manual Creation: You have the option to manually create a Groovy file (refer to Creating Groovy Service) and insert the generated code.
    • Wizard-Assisted Creation: For an automated process:
      • After generating the code, click Next.
      • Specify the location and name for the .groovy file.
      • Click Finish to complete.

This feature in Martini simplifies the process of integrating various service workflows within your Groovy scripts, enhancing the functionality and interoperability of your applications.