The SMS Invocation Application allows to send SMS with Process Data.
You can perform the following operations on an SMS Invocation Application.
Apart from the common properties, the following property tabs are provided for an SMS Invocation application:
Figure: Properties - SMS Invocation Application
Only Input Parameters can be created in the Parameters tab. These objects can be accessed by ID from within the SMS editor.
Figure: Parameter Mapping
Figure: Primitive Data
Figure: Structured Data
The following parameters are available by default:
Note that you cannot edit these two parameters.
The Configuration tab contains the text message to be sent. The Auto Startup check box specifies whether to auto startup the Camel route for this application.
Figure: Configuration - SMS
In the Connection tab, enter the details related to the SMS server host, port, system ID, password, sender and destination message address (directory number of the recipient)
Figure: Connection - SMS
Templating language can only be used with sender and destination address.
This example shows how to send a text message using an SMS Invocation Application. A process as displayed in the following screenshot is set up to retrieve input data and use it in an SMS Invocation Application.
The input entered manually by the user is a structured data Person that contains two string variables (Firstname and Lastname).
In this case, the delivered message will be generated with dynamic person details (Firstname/Lastname).
After deploying the model and starting the process, enter details for data Person. Once you complete the activity the message will be sent to the person accordingly.
The received message is displayed as below:
To use SMS applications, the following dependencies should be added to your
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-smpp</artifactId> <scope>runtime</scope> <exclusions> <exclusion> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> </exclusion> <exclusion> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.servicemix.bundles</groupId> <artifactId>org.apache.servicemix.bundles.jsmpp</artifactId> <scope>runtime</scope> </dependency>