Skip to main content
Skip table of contents

Specifying Operations

How to define one or more operations for an adapter

Operations for Adapters

Adapters offer certain functions that can be selected within the X4 Designer using the property Operation in the Properties view. Each list entry of this selection menu corresponds to an operation method within the adapter.

An adapter needs at least one operation. If the adapter offers only a single operation, it will be automatically selected in the Process Designer.

Assigning Methods to Operations

  1. Specify for each operation the annotation @AdapterOperation for declaring to a public method in the adapter class.

  2. Define the parameters.

    • Each method can define a parameter, which corresponds to the adapter input. 
    • The method's return type can be X4Document or a JAXB-conform Java bean. If the return type is void, the input is considered as output.
    • To use Java beans, the input has to be  XML and conform to the Java bean definition. Otherwise, the adapter execution will be aborted with the status -1

    The basic frame of an Operation method is now ready.

Defining Metadata for Adapter Operations

To define metadata for adapter operations the annotation @AdapterOperation is used:

Field

Description

name

Specifies the operation's name and can be freely selected. However, it has to be unique for each adapter.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.