What is WEX Component?
WEX; It is a secure data exchange layer that sends and receives data to third-party servers. Components developed with REST, Web Service or EDI that work on the WEX layer are called WEX components.
Path: Control Panel > System > Dev Tools > Wex
Coldfusion components and coldfusion pages that can run on WEX constitute the components of WEX. A WEX component technically operates in two modes, processing incoming data and producing results.
Component mode
The first mode aims to work as a coldfusion component. The targeted method in this mode is to use more than one functionality together. As it is known, each WEX is called by a unique name. If this call is configured for a component, the function name is added and allows branching to the relevant function. Thus, more than one function runs on a single WEX record.
Document mode
The second mode covers the WEX record made on a coldfusion page. The Coldfusion page can execute all requests and responses on itself. However, it is not suitable for more than one function. If the incoming data is extremely complex and/or it is necessary to return a document (html, etc.) as output, it may be necessary to process the request and response directly. In this case, using a coldfusion page may be a practical solution.
WEX Creation
To register the WEX component, it is sufficient to enter the Dev Tools module and proceed from the WEX title. The listing page includes available WEXs. New WEXs can be created with the "+" button.
The screen below has Wutabakat (Covenant) running as a WEX component. Wutabakat; It is an add-on that sends debit-credit results to the relevant current account for current account reconciliation, receives feedback and performs operations according to this feedback, and works as a WEX component.
Areas that need special attention when recording WEX
- Type: Determines the transaction direction of WEX. Whether a WEX aims to perform transactions by receiving data or to send data from WEX to another system, import or export selection is made.
- Rest Name: This is the unique call sign of WEX. With this name, WEX makes calls in url format.
- Authentication: Provides the authorization level. There are two levels: Public and Private. Password-free WEX access is provided at the public level. Private connects to the server to which data is sent using domain, IP, username and password. Additionally, access can be provided depending on subscriber management.
- Time Plan: On Demand is suitable for services that are provided to run for each call. Periodic option enables data communication by connecting WEX to an external system at certain periods (it works two-way).
- File Path: Specifies the virtual file path of the WEX endpoint file (starting from the Workcube main directory)
Other fields are done in the same way as the WO record. To get detailed information about WO, you can review our document "What is WO - Workcube Objects?".
Attention!: When capturing data via WEX on systems running on the Lucee infrastructure, there must be "/" at the end of the URL. If there is no slash, WEX will not trigger. (wex.cfm/, wex/ etc.) It should not be forgotten to include "/" in the links given in Wex functions.
Feedback
WEX; It is a secure data exchange layer that sends and receives data to third-party servers. Components developed with REST, Web Service or EDI that work on the WEX layer are called WEX components.
Using slash in Wex
Added/Edited Function:In systems running on the Lucee infrastructure, there must be a "/" at the end of the URL when capturing data via WEX. If there is no slash, WEX will not trigger. (wex.cfm/, wex/ etc.) It should not be forgotten to include "/" in the links given in wex functions. Edited in accordance with existing standard Wexs.