Skip to main content
Skip table of contents

Defining Adapter Operations

Adapters offer certain functions that can be selected within the X4 Designer using the Operation property 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 has one operation, this operation is automatically selected in the process designer.

Assigning Methods to Operations

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

  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.