Litium Integration as ScheduleTask

Hello!

We have a customer on a shared environment hosted by Litium.
We are attempting to get Litium Integration Kit running as a ScheduledTask, but so far without any success.

The projects of the integration kit has been included into our accelerator-solution, and the service runs fine. However, as a scheduledTask it does not seem to run at all.

The way we are trying to do it is by defining a task in the MVC-project’s Web.Config:
<scheduledTask type="Litium.Integration.Service, Litium.Integration.Service" startTime="14:56" interval="1m" />

We have tried with various approaches, scheduling the integration implementation like the service does but to no avail.

We also had another problem regarding the paths defined in App.config (files and integration directory).
We assumed that if no path was given it would default to some path, but instead the application simply idled, not constructing folders etc.
When we use the integration kit on a shared environment, will you guys define the paths in the config or should we?

Thanks in advance!
Have an awesome friday!

Litium version: 7.1

Have you added a reference from your mvc project to your integrationkit-project?

App.config is not used when your run the inte integrations in the website, the configuration should then be in the sites Web.config.

Do you get any information in the event log when the task is set to run?

We tried the following:

  1. Added reference to Litium.Integration.Service in the MVC project as such:
  2. Added scheduledTask in MVC web.config like so:
  3. Ran the project on Local ISS, checked Event Log and got this:

We got the assembly/namespace from project-properties.
Any idea what we are doing wrong?
It seems like the other tasks are registering just fine:

Thanks in advance!

You could try adding the individual tasks themselves to Web.Config, instead of the whole integration. Remember to reference the Implementation project.

<scheduledTask type="Litium.Integration.Implementation.Imports.MediaImport, Litium.Integration.Implementation" parameters="" startTime="00:00" interval="1m"/>
<scheduledTask type="Litium.Integration.Implementation.Imports.PriceListImport, Litium.Integration.Implementation" parameters="" startTime="00:00" interval="1m"/>
<scheduledTask type="Litium.Integration.Implementation.Imports.ProductDataImport, Litium.Integration.Implementation" parameters="" startTime="00:00" interval="1m"/>
<scheduledTask type="Litium.Integration.Implementation.Imports.StockBalanceImport, Litium.Integration.Implementation" parameters="" startTime="00:00" interval="1m"/>```
2 Likes

If you change the reference to use Litium.Integration.Implementation instead of Litium.Integration.Service (that only exists the windows service).

The registered service in web.config should be like the following

<scheduledTask type="Litium.Integration.Implementation.Imports.ProductDataImport, Litium.Integration.Implementation" startTime="14:56" interval="1m" />

You will have the registration rows that you need in the app.config in the Litium.Integration.Service-project.

2 Likes

Thanks for the help, guys! It now works and creates an integration folder in the Files-folder. :kissing_heart:

2 Likes