Developer forum

Forum » Dynamicweb 10 » Run job with custom file source

Run job with custom file source

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,
In DW9, I was able to create a URL that allowed me to pass the source file for an integration job as a URL parameter (SourceFile).
Is this something I can do with the Management API?
I have reviewed the Management API but it's not clear what I should be using.

Thank you,
Adrian


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
yes, the same functionality as it was in DW9 is present in DW10.
You can pass the job parameters as the query string parameters as it was in DW9 in the requests.
You can use the ActivityRunCommand command from the Management Api
(https://solution.url/admin/api/docs/index.html?url=/admin/api/api.json#/Dynamicweb.Integration.UI.Commands/ActivityRunCommand)
to run the job or use the url (like it was in DW9 with the same parameters from DW9):
https://solution.url/admin/public/webservices/integrationv2/JobRunnerBackground.aspx?jobsToRun=dw%20to%20xml

BR, Dmitrij

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,

Thank you very much. I will give it a try.

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,
I have tested with a few providers, and it seems that the Excel provider does not honor the sourceFile parameter.

I have added a job for data integration; in test mode, all that I want is to get an excel file as input and export it in like a csv file. I have used ExcelProvider for Source.

image.png

 

I want to reuse the same job/activity with other SourceFiles.

 

I have tried to add SourceFile parameter in the QueryString, but this is ignored, and the file from the initial settings is used.

Can I change the Source file for ExcelProvider at run time?

Thank you,
Adrian

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
the problem is that the SourceFile setting feature was only available in the XmlProvider (as it was also in the DW9 version):
https://doc.dynamicweb.com/documentation-9/integration/integration-framework/data-integration-activities
I can see there was a similar question before about this feature in the past and it was also connected with just the XmlProvider:
https://doc.dynamicweb.com/forum/integration/integration/user-configurable-integration-job
The problem is that this feature is not implemented in the ExcelProvider.
BR, Dmitrij

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Dmitrij,
Can this be implemented?

The problem is that in DW9 I could derive a custom Excel provider from the standard one, but in DW10 it is sealed:

image.png

Thank you,
Adrian

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,
yes, I have made a new user story to support that feature in the Excel provider too: #27297.
BR, Dmitrij

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Thank you very much!

Adrian

 

You must be logged in to post in the forum