ballerinax/trigger.aayu.mftg.as2 Ballerina library
This is a generated trigger for MFT Gateway (by Aayu Technologies) that is capable of listening to the following events that occur in MFT Gateway.
- Received Message
- Sent Message
- Failed Message
Before using this trigger in your Ballerina application, complete the following:
To use the MFTG trigger in your Ballerina application, update the .bal file as follows:
Step 1: Import the trigger
ballerinax/trigger.aayu.mftg.as2 module into the Ballerina project as follows.
Step 2: Initialize the MFTG Listener
Initialize the trigger by providing the listener config & port number/httpListener object.
If you don't provide a port it will use the default port which is 8090.
Step 3: Use the correct service type to implement the service
Use the correct service type for the corresponding channel when implementing the service.
Ex :- If you need to listen to Received Messages you may use
as2:ReceivedMessageService service type as follows.
Step 4: Provide remote functions corresponding to the events which you are interested on
The remote functions can be provided as follows.
Step 5: Run the service
bal run command to compile and run the Ballerina program.
Step 5: Configure MFTG webhook with the URL of the service
- Go to MFTG webhook integrations and enable webhooks.
- Add the public URL of the started service as the Webhook URL.
- Select Stations and add/update the webhook.
This will add a subscription to MTF Gateway event API and the ballerina service functions will be triggerred once an event is fired.
- Add a trailing / to the public URL if its not present
- Use ngrok to obtain a public URL for localhost instances
Released date: 9 months ago
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Current verison: 0