User exit overview
User exits allow optional overrides to the default AS4 process flows for authentication, destinations, or receivers by calling external programs during the message flow.
User exits do not require you to redesign the message flow, user exits provide a mechanism to apply external operational actions to deployed message flows at run time.
Receiver and destination user exits can be configured and managed
in AS4 receivers, messaging receivers, HTTP or HTTPS destinations,
and messaging destinations. Authentication user exits
can be configured and managed in AS4 custom conformance
policy, AS4 inbound two-way synchronous exchange profile, AS4 outbound
two-way synchronous exchange profile, AS4 inbound one-way
push exchange profile, AS4 outbound one-way push exchange
profile, AS4 inbound one-way pull exchange profile, and AS4
outbound one-way pull exchange profile.
Restriction: You
must have administrative user authorization to run
the user exit commands.
The user exits you develop and deploy provide external operational
actions for the following process flows in the system:
- Authentication
- Verifies that the trading partner provided a valid user name and password with user name token, SAML token, or X.509 certificate.
- Authorization
- Validates that the authenticated trading partner is allowed to use ebMS Message Service Handler (MSH) processing.
- Virus checking
- File validation
- Audit logging
- Usage logging
When you develop user exit Open Services Gateway Initiative (OSGi)
bundles, at least one of the following public user exit Java™ APIs must be exported
as an OSGi service in your OSGi bundle:
- PreProcessUserExitHandler
- Develop user exit OSGi services for messages before they enter the process flow in either AS4 or messaging receivers.
- PostProcessUserExitHandler
- Develop user exit OSGi services for messages after they exit the process flow in either AS4 or messaging receivers.
- PreDeliveryUserExitHandler
- Develop user exit OSGi services for messages before they enter the process flow in either HTTP, HTTPS, or messaging destinations.
- PostDeliveryUserExitHandler
- Develop user exit OSGi services for messages after they exit the process flow in either HTTP, HTTPS, or messaging destinations.
- BusinessDocument
- Develop user exit messages, payload, attachments, transport headers, and message properties within the process flow.
- AuthenticationUserExitHandler
- Develop user exit authentication for embedded (full) X.509 certificate, SAML token, or user name token during the authentication process flow.
Tip: The user exit Java APIs are in the Members\resources\userexits installation
directory.
After you develop your customized user exit OSGi
services, you must deploy the tested user exit OSGi bundle
or bundles with the following user_exit commands:
- user_exit load <userexit_bundle_name.jar>
- Load a user exit OSGi bundle into the data grid.
- user_exit config <symbolic bundle name> |all
- Deploy all user exit OSGi bundles on your current node.
- user_exit list
- List all the user exit OSGi bundles that are deployed on your current node.
- user_exit export <userexit_bundle_name.jar> <local directory name>
- Export an OSGi bundle to edit locally.
Remember: Before you can manage your user exits within
the process flows, you must first develop, test, deploy,
and configure your OSGi bundle files. Only then can the
user exits be specified and managed in your process flows.