ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 1 reply, has 2 voices, and was last updated by  Alexandr Smaga 3 years, 2 months ago.

  • Creator
    Topic
  • #4447

    lennart
    Participant

    Hi,

    I managed to successfully create a new channel type. I can create a channel and fill in 4 fields with names of .csv files. The filenames are saved successfully to oro_integration_transport.

    Now I want add my custom channel to the JobQueue. The job should retrieve the 4 filenames and then read the .csv files which are located at a certain location. Something like the Magentobundle but with .csv instead of soap. I tried to make a custom connector but im stuck. I have set the reader in my in batch_jobs.yml to my custom connector and registered the connector in my importexport.yml. I don’t understand what my connector class and transport (init and call methods) class should contain.

    thanks,

    Lennart

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #4454

    Alexandr Smaga
    Participant

    Hi.

    Let me try to clarify.

    Lets imagine that your “csv transport” are compatible with 3 different connectors: product, customer, customer group. Each of connector should read data using transport from some files, so filenames are setting of the transport. They are correctly stored in oro_integration_transport entity.
    Before your transport is ready to use it should be configured by setting that are related to one of channel instance (configured channel). To achieve this behavior method init are added to TransportInterface. Argument of this method is transport setting entity.

    In order to abstract from implementation of transport method call was added. Basically you can define own action names, that you can also support in any compatible connector. For example your product connector needs to retrieve data to import. It calls method call with action name ‘productAction’ and some set of params. CSV connector checks if this action supported and if it’s then reads data from filename(comes from settings in method init).
    Some time after you want to read the same data direct from DB. You should implement DBTransport that will also supports ‘productAction’ but will read data from DB using some set of settings(comes from settings in method init).

    Hope my explanation is clear.

    Best wishes!

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.