# Configuration File

In order to use the scripts and the context variables they receive, the developer needs to setup the respective configurations in the following file:

  • /integrationm/services/com.cultofbits.integrationm.service.properties

# Event Handler Scripts

These scripts are by default kept at /etc/integrationm/scripts, the developer does not need to add any line to the config file. However, we we can change this if needed, by adding the following line to the file:

  • integration.scripts.root-dir=/etc/integrationm/scripts.

Note that /etc/integrationm/scripts is the path in the server instance. In the project directory in the developer´s computer, the folder is at /projectName/integrationm/scripts.

# URL Based Scripts

These scripts are by default kept at /etc/integrationm/concurrent, the developer does not need to add any line to the config file. However, we we can change this if needed, by adding the following line to the file:

  • integration.concurrent.root-dir=/etc/integrationm/concurrent.

# ActionPacks

# recordm

action.names=...,<recordm-ap-name>

action.<recordm-ap-name>=recordm
action.<recordm-ap-name>.recordm.base-url=<url form RecordM service> (Optional. Defaults to "http://localhost:40280" )

# confm

action.names=confm
action.confm=confm

# emailm

The email action pack requires configuration in the following files:

  • com.cultofbits.integrationm.service.properties
  • com.cultofbits.genesis.comm.properties

Configuring com.cultofbits.integrationm.service.properties:

action.names=...,<email-ap-name>

action.<email-ap-name>=email
action.<email-ap-name>.email.default-sender=<the email address as default sender> (Required)

Configuring com.cultofbits.genesis.comm.properties:

mail.server.host=<mail server host>
mail.server.protocol=<mail communication protocol: smtp, pop, imap>
mail.server.port=<mail server port>
mail.server.startTls=<supports tls: true, false>
mail.server.auth=<if requires authentication: true, false>
mail.server.username=<email username>
mail.server.password=<email password>

Recomended email-ap-name: email

In case<email-ap-name> is email, in the IntegrationM scripts, you can refer to it only by email.send(...) otherwise you have to refer to it using actionpacks.<email-ap-name>.send(...)

# Elasticsearch

action.names=...,<es-ap-name>
action.<es-ap-name>=elasticsearch

# reportm

action.names=...,<reportm-ap-name>
action.<reportm-ap-name>=reportm
action.<reportm-ap-name>.reportm.base-url=<url form ReportM service> (Optional. Defaults to "http://localhost:40580" )

Recomended reportm-ap-name: reportm

In case <reportm-ap-name> is reportm, in the IntegrationM scripts, you can refer to it only by reportm.generate(...) otherwise you have to refer to it using actionpacks.<reportm-ap-name>.generate(...)

# rest

action.<rest-ap-name>=rest
action.<rest-ap-name>.base-url=<some url>
action.<rest-ap-name>.cookie-name=<cookie-name>
action.<rest-ap-name>.cookie-value=<cookie-value>

# sms

Minimum props are:
action.names=...,<sms-ap-name>
action.<sms-ap-name>=sms

For Twilio Provider
action.<sms-ap-name>.provider=twilio
action.<sms-ap-name>.twilio.sid=<Twilio Service Id>
action.<sms-ap-name>.twilio.token=<Twilio Token>
action.<sms-ap-name>.twilio.default-from=<Twilio account phone number>

More props will be configured depending on the provider

Recomended sms-ap-name: sms

In case <sms-ap-name> is sms, in the IntegrationM scripts, you can refer to it only by sms.send(...) otherwise you have to refer to it using actionpacks.<sms-ap-name>.send(...)

# smstwilio

action.names=...,<sms-ap-name>

For Twilio Provider
action.<sms-ap-name>=sms
action.<sms-ap-name>.provider=twilio
action.<sms-ap-name>.twilio.sid=<Twilio Service Id>
action.<sms-ap-name>.twilio.token=<Twilio Token>
action.<sms-ap-name>.twilio.default-from=<Twilio account phone number>

Recomended sms-ap-name: sms

In case <sms-ap-name> is sms, in the IntegrationM scripts, you can refer to it only by sms.send(...) otherwise you have to refer to it using actionpacks.<sms-ap-name>.send(...)

# sql

action.names=sample-sql
action.sample-sql=sql
action.sample-sql.sql.driverClassName=<jdbc_driver_classname>
action.sample-sql.sql.url=<jdbc_url>
action.sample-sql.sql.username=<db_username>
action.sample-sql.sql.password=<db_password>

# userm

action.names=...,<userm-ap-name>

action.<userm-ap-name>=userm
action.<userm-ap-name>.userm.base-url=<url for UserM service> (Optional. Defaults to "http://localhost:40780" )

Recomended userm-ap-name: userm

In case <userm-ap-name> is userm, in the IntegrationM scripts, you can refer to it only by userm.createUser(...) otherwise you have to refer to it using actionpacks.<userm-ap-name>.createUser(...)

# How to use the actionPacks

After the configurations, the scripts are accessed in groovy scripts like any other variable with the name <userm-ap-name>. Example:

recordm.search(...)
userm.searchUsers(...) 

In order to see the methods supported by the actionPack variables, look for the respective documentations, click on the header title of the respective actionPack.