cancel
Showing results for 
Search instead for 
Did you mean: 

File Name in Java Map

Former Member
0 Kudos

Hello,

I want to add the time stamp in the file name in JAVA map.

Actually we are directly writing the file on to the file system from Java map and also giving its output to other map.

So we need when we write the file on the file system the file name should be ABC_timestamp.

Can anyone help me how to do this in Java Map.

Thanks and Regards

Hemant

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>Actually we are directly writing the file on to the file system from Java map and also giving its output to other map.

are you sure you want to do this?

this is highly inadvisable as mappings do not support restarts and any error handling

further more what if the mapping will crash but the file will be created?

if you restart the mapping you will get a second file?

I'd recomment not doing anything like that - maybe think about your scenario once more ?

Regards,

Michal Krawczyk

Former Member
0 Kudos

Thanks Micheal,

But my scenario is I have three XSLT map processing one after another.

I have to store the input payload plus all the output of these XSLT on the file system and final output also before sending it to Reciever.

Scenario is like this:

Input>PI


>>XSLT1->XSLT2--
>>XSLT3
----->>Reciver

-->File System -->File System -->>FS -->>FS

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

so why not use a BPM?

will the files be very big (more then 1MB)

and will the flow run very often?

if not maybe try with a BPM and it will work in standard

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hello Micheal,

Yes I give this solution to the business.

But actually we have hundred of Interface and using BPM for all the Hundred scenario it is not feasible.

The file length will not be greater then 1 mb in any case.

Please give me some solution.

Thanks for ur help Micheal.

Regards

Hemant