Communication with the Internet
The scripts use a set of libraries called ActionPacks. ActionPacks are libraries that enable the groovy scripts that IntegrationM executes to communicate with both other server applications in the developer´s organization and the outside world. These libraries are only available if configured properly.
The following list shows the interfaces of these libraries available to all scripts:
| name | description |
|---|---|
| recordm | interface with methods to access the recordm server |
| confm | interface with methods to access the devicem server |
| emailm | Action pack for sending email |
| esm | Action pack for interacting with our own Elasticsearch server |
| reportm | Action pack for interacting with ReportM |
| rest | Generic REST Action pack to allow interaction with any given endpoint |
| sms | Action pack for sending SMSs |
| smstwilio | Action pack for sending SMSs with Twilio provider |
| sql | Action pack for interacting with SQL DBs |
| userm | Action pack for interacting with UserM |
Examples
The following example shows two simple lines of code which communicate with the UserM and the RecordM servers:
def user = userm.searchUsers("email.raw:\"register_demo\"")
def newRecord = recordm.create("Countries Series", ["Country Code":"ABW", "Indicator Name":"GDP: linked series (current LCU)", "Indicator Code":"NY.GDP.MKTP.CN.AD"])In order to understand what those methods do, the developer can refer to searchUsers and create.
