cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture the Filename Dynamically in BPM

Former Member
0 Kudos

Hi All,

My scenario is FileBPMFile and my target end should get the same file name as source file name.

If suppose it is simple File to File we can use set attributes option to get the same filename.

But if BPM comes into Middle will it be managed if so how?

Can anyone suggest me?

Thanks,

Kalyan.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182455
Active Contributor
0 Kudos

Answers (6)

Answers (6)

prateek
Active Contributor
0 Kudos

Perform a mapping outside BPM so that u would be able to use the dynamic config to access the filename. This name could be mapped to any field of abstract message. This way you will have the filename inside BPM. Not perform the BPM tasks and at the end, perform variable substitution for receiver file adapter to take the data from payload and use the same filename.

Regards,

Prateek

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

>>My scenario is FileBPMFile and my target end should get the same file name as source file name.

Check the option Adapter- Specific Message Attributes and File Name in both the sender and receiver file adapter. Dynamic Configuration is same in all the scenario, be it with BPM or withour BPM.

By Michal Krawczyk

Thanks

SaNv...

former_member181985
Active Contributor
0 Kudos

Hi,

There is no difference between File>BPM>File & File-->File with the requirement you are looking for.

Since you are not doing any modifications to the filename read from Sender File System no need for dynamic configuration concept in UDF of any mapping.

Do the following

Sender File Adapter Channel.

file name : a particular file name or a .(STAR.STAR) according to your requirement.

e.g., test.xml (or) *.xml (or) . (STAR.STAR)

Enable Adapter- Specific Message Attributes check box and make sure that the File Name check box is enabled. Save and Activate.

Receiver File Adapter Channel

file name : . (STAR.STAR)

Enable Adapter- Specific Message Attributes check box and make sure that the File Name check box is enabled. Save and Activate.

Execute your scenario.

Thanks,

Gujjeti

Edited by: Praveen Gujjeti on Aug 11, 2008 10:14 AM

There is formatting problem by the portal application as some characters will have specific meaning.

Former Member
0 Kudos

Dear Kalyan,

There is one way to Identify the File name/Payload Name dynamically.

Use Modules in Adapter Configuration to get the File/Payload name.

This is very simple, it is nothing to do with BPM as well, Because you use these modules in Communiation Channel Configuration.

check for

MessageTransformBean

PayloadSwapBeanin SDN or SAP help.

Best Regards

Praveen K Kurni

JaganMohan
Participant
0 Kudos

Dear Kalyan,

a)

b)

c)

d)

Please refer the above links. You will be coming to a conclusion.

Regards,

Jagan.

Former Member
0 Kudos

Hi Kalyan,

you have to read the filename via UDF in message-Mapping.

The filename is stored in the dynamic attributs.

*******************

String theReturnString = "";
DynamicConfiguration conf = (DynamicConfiguration)
container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey configKey = DynamicConfigurationKey.create("http:/" + "/sap.com/xi/XI/System/File", "FileName");
theReturnString=conf.get(configKey);
return theReturnString;

Regards Mario