Skip to main content

Hello eveyone!

 

I need to schedule a csv file from IFS server to be in FTP address each 2 hours.

 

I already set the Job Migration to create a csv file. And I already set my destination folder in IFS Server.

The csv file is being created in the folder that I set. It’s all fine here.

 

Now, I need to send this file to a FTP server each 2 hours.

 

Is there a way to customize this?

 

Thanks a lot for any help!!

Hi,


There a re multiple ways of doing this e.g. in the OS on the server, with a scheduled script.
If you want IFS to do this then probably Connect can do the job.

If you store the CSV from the migration in a folder, connect can monitor that folder and via a Routing rule it can move that file from the folder to a FTP folder. (probably SFTP or FTPS)

It's not the easiest thing to setup, and it might depend on how and where you are technically running IFS

Hope this helps a bit
Regards Erik


Hi Erik!

Thanks for your help!

 

I already created a Connectors Senders, where I set a FTP as an Instance Type.

I set the FTP IP, User, Password. Guess everything is correct so far.

 

Now, do I need to configure a Router Address or not?

 

I tried to dig into Router Rules, but I coudn’t make any progress there.

 

What is my next step? I need to get the CSV file and send to the FTP that I set in Connectors Senders.

After that, I need to schedule to do this each two hours.

 

How do I do that? Is there a way?

 

Thank you so much!!!


Hi,

I’m not totally sure you probably need someone a bit more technical then me.

But I think you need

  • A Connect Reader that reads this directory
  • A Connect Sender that connects to the FTP site
  • A Routing address connected to the FTP sender
  • A routing rule connecting the File reader to the Routing address for the FTP

And probably the Batch server needs to be restarted to be able to activate the Reader and the sender

Hope this helps a bit.

 

Regards Erik


Hi @farze ,

 

We use FTP to send an XML file to our EDI partner as part of EDI integration.  You’ll need to create an FTP Sender instance with FTP IP Address, Username, Password, security protocol and connect mode.  We have security protocol set to NONE and connect mode set to PASSIVE.

 

Next you’ll need to create a routing address such as the following.

 

Next you’ll need to create a routing rule similar to the following.

 

Regards,

William Klotz


Hi William!

How are you doing?


Thanks a lot for your help!

I set everything up like you showed above.

 

Now, I have two questions:

 

1 - How do I fill in the file with the information I want, automatically?

2 - How do I set a schedule to do this each two hours, for example?

 

Thanks for you and thanks Erik for your help!!!


Hi @farze ,

 

You need something to kickoff the routing rule you’ve setup to send you CSV file that you’ve generated using IFS Migration.   If you are familiar with writing PL/SQL code you could create a custom event and event action which executes and kicks off the a Post Outbound BizAPI call to basically start the routing rule engine to match your custom BizAPI event with a routing rule.

 

We have a custom routing rule which has a message function of SEND_PRODUCTION_DASHBOARD and receiver of IGNITION.  This routing rule call a routing address that uses a RestAPI to post our production line information to a dashboard to another application.   We created a custom PL/SQL package that builds the message and data we wish to send then we call the Post_Outbound_BizAPI call to place it in the routing queue so IFS will match the Message Function and Receiver to our routing rule.   

 

We use a Transformer on the routing address to convert the data from XML to JSON which is then sent to the remote application.  I’m not sure if IFS has a built-in converted to CSV but you could create a custom transformer to perform the task.

 

Go here then search for some key items.

IFS Application 10 Technical Docs

 

Search for PLSQLAP_Document_API and Post_Outbound_BizAPI

Read through BizAPI under overview and PLSQLAccess Provider and Plsqlap_Document_API_Overview and Plsqlap_Server_API_Overview.   

 

Here’s a segment of the code which builds the data document and posts the message.  You would do something similar but with your data instead.



--Declare the variable
msg_payload_ PLSQLAP_Document_API.Document;

--Create the new document
msg_payload_ := PLSQLAP_Document_API.New_document('DASHBOARD');

--Fillin the information using a key/value pairing.
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'SHOP_ORDER', order_no_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'PART_NO', part_no_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'PART_DESCRIPTION', part_desc_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'QUANTITY_DUE', qty_due_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'PACK_SIZE', pack_size_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'FLUID_TANK', fluid_tank_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'FLUID_NO', fluid_part_no_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'PRODUCTION_LINE', shop_workcenter_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'ASSEMBLY_GALLONS', assembly_gallons_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'FLUID_DENSITY', fluid_density_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'LOT_BATCH_NO', lot_batch_no_);
PLSQLAP_Document_API.Add_Attribute(msg_payload_, 'PRODUCT_CODE', product_code_);

--Call API to post the message
Plsqlap_Server_API.Post_Outbound_BizAPI( 'SEND_PRODUCTION_DASHBOARD', msg_payload_,
NULL, 'IGNITION', 'EVENT_BIZAPI' );

 

Regards,

William Klotz


Hi @farze ,

 

You can also take a look at this forum thread it has an interesting idea I haven’t used but sounds good.

While it deals with importing a CSV file from FTP the idea could be modified for outbound I believe.

 

 

Regards,

William Klotz


You can follow https://docs.ifs.com/techdocs/foundation1/040_administration/240_integration/300_ifs_connect/030_routing_rules_addresses/default.htm to create the routing address. 

 

Thanks,

Ashen


Reply