Adapter modeling in Sterling Order Management System Software
Sterling™ Order Management System Software
provides a general purpose YFS_ADAPTER table to store information about custom
adapters. The custom adapters can connect to an external system and process the data. As the custom
adapters are extensible, customers can define different adapters based on their business
need.
The following YFS_ADAPTER table provides the list
of custom adapters attributes:
| Attributes | Description |
|---|---|
| ADAPTER_NAME | The unique name that identifies the adapter. |
| ADAPTER_RESOURCE_ID | The unique identifier for the resource of YFCPanelto
be displayed to capture adapter properties. |
| CLASS_NAME | Class name used to execute the adapter. This
class should implement com.yantra.interop.japi.YIFAdapter. |
| ADAPTER_DESCRIPTION | The description for the adapter. |
YFS_ADAPTER table that are modeled
as a configuration UI resource. Therefore, they are listed in the Applications Manager so that users
can modify the adapter properties and execute methods. Each adapter implementation has to define a
java class, which implements com.yantra.interop.japi.YIFAdapter interface as
follows:public interface YIFAdapter {
/**
* The Service Framework will call setProperties during runtime with the
* adapter specific properties that are captured during service configuration.
* These properties will be used by the execute method to connect to the
* Adapter specific external system and make the necessary API calls and
* return the data as a Document.
*/
public void setProperties(Map prop);
/**
* The Service Framework will call this method during runtime to execute the
* specific Adapter and the output from this method call will be used as the
* input for other downstream service components configured.
*/
public Document execute (Document inDoc) throws YFSException;
public void init () throws YFSException;
}Each adapters have their own properties and is set by calling the setProperties(). method
. The init() method is called to initialize the adapter
based on the properties that are set.
All the business operations on an adapter is performed by invoking
the execute() method. The content of the input document
decides the operation to be performed on a particular call. In other
words, implement the method such that an attribute in the input document
defines the type of operation and diverts the call to a specific operation
based on attribute value.
- Ping service to verify whether a particular host is reachable across an IP network
- Service to retrieve tax
- Service to commit tax
Some tax solutions provide address verification facility as well. The adapter implementation must define constant values such as 1=Ping, 2=RetrieveTax. The implementation for execute() method must have a logic to divert the constant values.
Presently, APIs are not provided to create, modify, or delete adapters. By writing custom factory setup XMLs and factory setup installer XMLs you can load new adapters to Sterling Order Management System Software. Also, ensure the appropriate resource permission is provided for the corresponding UI resource so that the adapters can be viewed and edited from the Applications Manager.