Installation Instructions¶
Preparations¶
- Check that the requirements are met.
- Ask the customer to contact EDP to provide us with the neccessary files.
Installation¶
1. Add Package Dependency¶
Add limepkg-edp-integration as a dependency to your solution.
poetry add limepkg-edp-integration
poetry show limepkg-edp-integration
Finally run poetry lock to make sure the new version locks work together in practice.
2. Scheduled task¶
- In your solution, navigate to your tasks folder and open the init.py file that you find inside. If you don't have one, run the command lime-project generate scheduled-task to generate the structure that is needed. In the init.py file, import the edp tasks and register it as a scheduled task with the desired intervals.
- edp_customer_serviceplace: here once every 4 hours between 4am and 7pm (be careful and don't be too agressive in your scheduling... especially in cloud):
-
edp_integration: here once a day at 11pm (see technical for a specification of each available task.):
from lime_task.schedule import ScheduledTask, TaskSession, CronTab from limepkg_edp_integration.tasks import tasks as edp_tasks from limepkg_edp_integration.tasks import old_contracts as contract_tasks from limepkg_edp_integration import utils as edp_utils def get_task_modules(): return [] def register_scheduled_tasks(): task_session = TaskSession( user_name='[email protected]', language='sv') return [ ScheduledTask( task=edp_tasks.edp_customer_serviceplace, schedule=CronTab(hour="4-19/4", minute="0"), args=[], session=task_session ), ScheduledTask( task=edp_tasks.edp_integration, schedule=CronTab(hour="23", minute="0"), args=[], session=task_session ), # This is optional. Read more under technical ScheduledTask( task=contract_tasks.inactivate_contracts, schedule=CronTab(hour="6", minute="0"), args=[], session=task_session ) # example of using soft delete for the limeobjects ScheduledTask( task=edp_tasks.edp_integration, schedule=CronTab(hour="23", minute="0"), args=[edp_utils.DeleteBehaviour.SOFT_DELETE.value], session=task_session ), # example of using hard delete for the limeobjects ScheduledTask( task=edp_tasks.edp_integration, schedule=CronTab(hour="23", minute="0"), args=[edp_utils.DeleteBehaviour.HARD_DELETE.value], session=task_session ), ]
3. Set up Users and Groups¶
Perform these steps in LISA.
- Create a
[email protected]user and give it admin permissions. This user is used by the scheduled task that runs the integration. Use the following settings:- Password: Type a really long nonsense password. Do not store it anywhere (it is not needed).
- Active: No
- Type: Integration
- Login: LIME PRO Authentication (default in Cloud)
4. Set up Database Structure¶
Tables and fields contains all required and recommended fields. It is possible to set them up manually, or use the available LIP package.
- Download the following LIP package for EDP Integration from the latest release.
- Install the LIP packages through VBA by running lip.installfromzip
- In LISA:
- Insert descriptives
- Insert SQL on updates
- Insert icons
5. Setup Integration monitor (optional)¶
It is not a requirement to setup Integration Monitor, but it is strongly recommended to get a better overview of the integration.
In order to get the integration monitor up and running you will have to install the latest lip package to get the correct structure Github.
When done, create 3 integration monitor objects in Lime. the keys edp.customer, edp.serviceplace and edp.service respectively.
6. Configuration¶
You should now be able to start configuring your EDP Integration. 🎉🎉🎉
Head to the configuration section if you want to tweak and tune your EDP Integration setup to your needs.