SELECT SQL Statement
Preconditions
1. Create SELECT SQL script
Create SELECT SQL script to get data to generate PersonRegister transaction. Format is the same as for DatabaseTable (refer to Preconditions p.3), except the following:
- Column 'TransactionId' is not required.
- 'FileId' – unique transaction file id defined by customer system.
- 'FileName' – transaction file name defined by customer system.
2. Create SQL to report successful Person.Register upload
Create, for examle, sql script for successful upload.
3. Create SQL to report Person.Register upload failure
Create, for examle, sql script for upload failure.
Configuration
The following settings are required to be made for Person.Register transaction generation from 'SelectSql':
1. Go to Greenrain Automation Settings
Log in to Greenrain Automation. Select "Settings" from the Toolbar → 'Greenrain Automation Settings' form opens.
Figure1.
2. Configure Person.Register tab
Figure2.
Select Person.Register tab and configure settings:
- 'Generate and upload Person.Register transactions to Shafafiya': should be checked.
- 'Processing interval' drop-down fills automatically with custom values. User can select an interval from the list, '30 minutes' for example.
- 'Choose where Greenrain Automation will get person register data from':
- 'SelectSql' value should be selected from drop-down list.
- 'Connection string to the database'. Click "Configure Database Connection..." button and set Database = Name of the Customer database (see Preconditions p.2). Click "OK" button (if you wish to test the connection string click the "Test Connection String" button.).
- 'SELECT SQL' (mandatory setting). Specify a script to get data provided by user to generate PersonRegister transaction (refer to Preconditions p.1).
- 'SQL to report successful Person.Register upload' (optional setting). Specify a script for successful upload (refer to Preconditions p.2).
- 'SQL to report Person.Register upload failure' (optional setting). Specify a script for upload failure (refer to Preconditions p.3).
- Click "Save" button.
3. Check common configuration
Generate PersonRegister transaction
1. Go to Greenrain Automation Services
Select "Services" from the Toolbar → 'Greenrain Automation Services' form opens (refer to Figure1.).
2. Start the service
It allows to start a service after certain runtime configured on the Person Resister tab (refer to Configuration → 2. Configure Person.Register tab).
- Click "Start the service" link:
- 'Download Service Status' will be changed to RUNNING (marked with green).
- 'Stop the service' link will be displayed under the status.
- Click "Close" button.
Figure3.
"Run" link in the Toolbar allows a user to run the service at any time on demand (refer to Figure1.).
3. Check PersonRegister transaction
- check e-mail notification.
- check Greenrain Automation database:
- PersonRegister table: 1 record is created;
- Transactions table: 1 record is created ('FileName' format: <FileName> refer to Preconditions p.1).
- check that script for successful upload (refer to Preconditions p.2) executed.
- check PersonRegister transaction in Greenrain Messenger:
- Log in to Greenrain Messanger (refer to common configuration → 3. Configure Post Office Settings).
- Select "Download" tab.
- Set filters and click "Search" button → the uploaded Person.Register transaction has been found ('Transaction File' format: <FileName> refer to Preconditions p.1):
- set "Transaction date"
- set "Person.Register" checked
- set "Sent only" and "New only"
Figure4.