8.4.7 Export Accounting Records with MuleSoft
Table of Contents
1. IntroductionÂ
This document contains detailed step to step instructions to deploy the MuleSoft template to MuleSoft CloudHub.Â
What does this application do?
This app will retrieve / export Accounting Records, convert data into CSV format, save the CSV file to a FTP server.
Customer can configure the fields of Accounting Records to export.
Â
2. Reference URLsÂ
Download and configure Anypoint studio for any of the OS that you are using.Â
3. Where to Download our MuleSoft Application?Â
Download our MuleSoft application (filename advendio-csvexport.jar)Â by downloading the attachment below
4. How to Import a Project in Anypoint Studio?Â
Select Import from the File menu.Â
In the Import wizard, click to expand the Mule folder, select Packaged Mule Application (.jar), and then click Next.
In the File field, click the ellipses (...) button to explore your local drive.
Then select the Mule Deployable Archive file (that is, the advendio-csvexport.jar file) you want to import. ÂClick Finish.Â
5. Update configuration with required credentials
After importing the project to AnyPoint Studio, open config.yaml located at: src/main/resources.
Add the following details:
Salesforce username, password, and security token.
SMTP details for email notification.Â
FTP details where you want to push CSV files.Â
Test the application in the sandbox environment once your changes are complete.Â
6. Steps to Change Scheduler Time
The default schedule to query SF is set to a fixed frequency of 30 seconds. However, you can change it to best suit your needs.Â
Below are the steps to change scheduler timingsÂ
Open advendio-csvexport.xml file located at src/main/muleÂ
Double-click on Scheduler in GetRecordÂ
Click scheduling strategy, it has two types of frequency:Â
Fixed Frequency
Option to select time unit in Days, Hours, Minutes, SecondsÂ
CronÂ
You can add Cron expression, refer http://www.cronmaker.com for creating Cron expression based on your needs.Â
Has option to add timezone ID (refer java.util.timezone for timezone IDs)
7. Upload Template to MuleSoft Runtime ManagerÂ
Once the above changes are done and the application is running successfully on Sandbox, point it to the production instance.Â
Now, it’s time to upload your application to MuleSoft Runtime Manager.Â
Follow the steps below to upload:Â
Right-click on project folder in Anypoint StudioÂ
Go to Anypoint Platform and click on Deploy to CloudHub optionÂ
Enter credentials of anypoint platform if promptedÂ
It will prompt a window as below, fill in the required details for Name, Deployment Target, application file.
Leave runtime properties as it is and click on Deploy Application. It will take a couple of minutes to deploy and your application will be up and running. In case of an error, please review the error log messages.
Â