public interface JavaService
Use JavaService to execute custom logic (Java code) as an integration service call. The custom logic will go through the normal flow of pre-processor before the call and post processor after the call. The integration service thus formed using the custom logic can be used like any other integration service, for example, as part of another orchestration service.
Note: JavaService is a singleton - only one instance of this class is created and the same is used for every service call. Therefore, JavaService should not have any user/request specific data or state. Any data common to all the users/requests may be stored.
JavaService2
Modifier and Type | Method and Description |
---|---|
Object |
invoke(String methodID,
Object[] inputArray)
Use to invoke the custom logic (Java code) of this service.
|
Object invoke(String methodID, Object[] inputArray) throws Exception
methodID
- The id of the method to executeinputArray
- An array of all inputs needed to execute the method. This
contains three maps -
String
) as keys and config value (Object
) as value
String
) as keys and parameter value (Object
) as
valueString
) as keys and parameter value (String
) as
valueResult
to denote the result of this invocation. The result should have
parameter of type Param
with name "opstatus". The "opstatus" value should be 0 if the
execution is successful or non-zero if the execution failed.Exception
- Any error in invocationCopyright © 2019. All rights reserved.