Developing Adapters
For all adapters status values can be set via the class de.softproject.integration.adapter.core.Status.
These status values can be interpreted within X4 processes using Condition
process components. Each executed operation method of an adapters can set a corresponding status.
Thereby, the three default status values OK (1)
, ERROR (-1)
and TIMEOUT_EXCEEDED (0)
, or a custom integer status value can be set. If no status is set in the adapter, occurring exceptions while executing the operation method will be treated as ERROR (-1)
, otherwise the status OK (1)
will be returned.
Status Methods
| |
---|---|
public void setOk() | Sets the status of the operation method to executed successfully |
public void setError() | Sets the status of the operation method to executed incorrectly |
public void setTimeoutExceed() | Sets the status of the operation method to not executed within the defined time |
public void setStatus(int Status) | Sets the status code Not allowed values are: |
public boolean isOk() | Checks if the status is set to executed successfully ( |
public boolean isError() | Checks if the status is set to executed incorrectly ( |
public boolean isTimeoutExceed() | Checks if the status is set to not executed within the defined time |
public int getStatus() | Reads the status value as integer number |
public static final int OK=1 | Associates the status |
public static final int ERROR=-1 | Associates the status |
public static final int TIMEOUT_EXCEED=0 | Associates the status |