cancel
Showing results for 
Search instead for 
Did you mean: 

Pick file name dynamically using BPM

Former Member
0 Kudos

HI all,

I have a requirement in which the file name is generating dynamically. Using this filename, I have to pick the corresponding filename.

Say suppose, the file name is ABCxxxxx, here xxxxx is some characters that generates dynamically. Now I have get the acutal characters of xxxxx and have to pick the corresponding file say DEFxxxxx, here xxxxx in both the files are same.

Up to my knowledge, we can not use java code in BPM and the above scenario can be done using java code.

Can it be done using BPM without using java code?

Please guide me.

Thanks,

anil.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI,

not java code, in BPM , use receive step to recieve the file name and now once again the use the recieve with the new file name , configure accordingly .

also good option said by Michal , use java proxy to check the file name and pick the respective file ..

Regards

Chilla

MichalKrawczyk
Active Contributor
0 Kudos

Hi Chilla ,

>>>>use receive step to recieve the file name and now once again the use the recieve with the new file name , configure accordingly .

with his requirement (to pick up the file by it's name)

it's not possible to use a receive step

he needs to use a send step (with java proxy for example)

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

HI All

Thank you for replies.

So what I understand is that it can not be done without using java code. Nor it can not be done directly using BPM.

Here can I do like this:

Write a java code to pick the corresponding files from source system and place in xi server. From xi server, file adapter will send the files to target system. Here I need not use BPM.

Please validate this solution, suggest me the better way if any.

Thanks,

Anil.

Former Member
0 Kudos

Yes Thanks Michal

Chilla

bhavesh_kantilal
Active Contributor
0 Kudos

Satish / Anil,

If you need to get the filename dynamically in the sender file adapter, you can use wildcard characters , filename. etc in the sender file adapter.

But, if the requirement is that on the basis of the source file picked up by the sender file adapter another file needs to be picked dynamically, you need to select / pick another file , then you can use Sender File adapter to pick up the source file and in the mapping use can wrtie a UDF to perfrom a IO to pick up the other file and so on.

Or, you can use a BPM with Java Proxies as suggested by Michal. Doing direct IO is not recommeneded in XI but if ineveitable can be done.

Regards

Bhavesh

Former Member
0 Kudos

HI Bhavesh,

Correct me, if i am wrong

Michal suggested to go with java proxy to pick the file. But he has not suggested BPM wiht Java proxies.

What I understood from michal explanation is, write java proxy to pick the files dynamically and then use file adapter to send files to target system.

Please correct me if i went wrong anywhere.

Thanks,

Anil.

henrique_pinto
Active Contributor
0 Kudos

If you do guarantee that both ABCxxx and DEFxxx files will be eventually created, you could create a new field in message types of both ABC and DEF files. This new field would hold the xxx value for both messages (you can fill it by reading filename with dynamic configuration in a message mapping) and then you could use this field as a correlation in BPM.

Avoid using dynamic configurated context objects in BPM correlations though. I have had problems with them.

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

You could use ony java proxies like suggested by michal, or you could use the Sender File adapter with BPM with Java Proxies.. or you can use a Java IO inside the mapping like I have suggested.

Depends on the entire flow and requirements.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thanks for clarification.

One more clarification, here I can do the same using ABAP IO instead of JAVA IO. Performance wise which one is the better.

How to compare the performance of abap n java for a particular program/

Thanks

anil.

bhavesh_kantilal
Active Contributor
0 Kudos

If you are using a graphical mapping using a Java IO is simple . as all you need to do is to write a UDF for this.

In graphical mapping if you need to do an ABAP based IO you need to use RFC Looku['s etc.

Regards

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>Can it be done using BPM without using java code?

no it cannot

one way to achive your scenario (which I did in my projects)

was to create a java proxy that picks the file

you cannot use standard file adapter as it does not allow a work in this mode

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

bhavesh_kantilal
Active Contributor
0 Kudos

Not possible wiothout using java IO.

Regards

Bhavesh