Import CSV File: AIF method – Part 3

Continue reading

So far we have created and deployed Service and created the transformation, we are almost there, now we need to put this together and create inbound port.

First go to the System administration -> Setup -> Services and Application Integration Framework -> Inbound ports:

Inbound ports.

Click on New and create new inbound port, lets name it for example AttributeTableServices.

First we need to set Adapter to File system adapter and specify the URL which in our case is the folder to where you will drop your CSV files. Then click the Configure button and select Admin:

Inbound ports, AttributeTableServices, URI

Then in Service contract customizations select Service operations and find AttributeTableConfigService.create in Remaining service operations and select it by clicking ‘<‘:

Select service operations.

Next step is to check the Transform all request checkbox and load the dll for our transform (follow the red arrows J).

Step-by-step to load DLL for our transform.

Remember that every time we modify that dll we need to change its version in Visual Studio:

Changing file version.

Click button Activate:

Activate button location.

Testing

First drop the CSV file into the URI directory. After execution it will disappear because it will be consumed by the service, so every time we want to test the execution we need to add a new file into the folder. Approach: Execute this following job:

static void AifProcessor(Args _args)

{

AifGatewayReceiveService agrs = new AifGatewayReceiveService( );

AifInboundProcessingService aip = new AifInboundProcessingService( );

AifGatewaySendService agss = new AifFatewaySendService( );

AifOutboundProcessingService aop = new AifOutboundProcessingService( );

agrs.run( );

aip.run( );

agss.run( );

aop.run( );

}

Run job

Check AttributeTable, you should see changes!

Approach: Create batch job:

BatchTasks

System administration -> Inquiries -> Batch jobs -> Batch jobs

  • Add new batch job (Ctrl + N).
  • Click on View tasks and add new tasks (Ctrl + N) in the given above order.
  • Change status to waiting and wait for the execution.

When status changes to Ended check AttributeTable, you should see changes!

More articles
Explore our blog

What can we do for you?

We'd love to hear about your project. Our team will get back to you within two working days.

Thank you for inquiry, we’ve passed it to our sales department, our representative will reach you back in his earliest convenience.

Oops! Something went wrong while submitting the form.
.

Dziękujemy za zapytanie, przekazaliśmy je do naszego działu sprzedaży. Nasz przedstawiciel skontaktuje się z Państwem w najbliższym możliwym terminie.

Ups! Coś poszło nie tak podczas przesyłania formularza.