File name cant be fetched from Dynamic configuration...mutli-mapping used

In a scenario, i have a BPM which has a transformation step which contains a mutimapping ...means 2 messages mapped to 1 messgaes, here in the mapping i m using an UDF and written code to extract the file name from dynamic configuration.....
the problem is ...the same BPM contains another transformation step which contains a message mapping (which is not multi mapping), and here the code (UDF) works to fetch the file name...
the code is all correct....and it looks like
DynamicConfiguration conf = (DynamicConfiguration)
container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String sourceFileName = conf.get(key);
if (sourceFileName == null ){
sourceFileName = "ErrorFile.xml";}
return sourceFileName;

Hi,
Yes u r correct it will show error in operation mapping.. bcoz u cannot check the DynamicConfiguration in Operation mapping...
It will throw Exception..
The parameter to UDF depends on ur requirement.... Let us know ur requirements exactly...
If u r doing for file to file means no UDF required,, just check ASMA on both sides....
Babu

Similar Messages

  • File-name not being fetched in a multi-message mapping by Dynamic Conf

    In a scenario, i have a BPM which has a transformation step which contains a mutimapping ...means 2 messages mapped to 1 messgaes, here in the mapping i m using an UDF and written code to extract the file name from dynamic configuration.....
    the problem is ...the same BPM contains another transformation step which contains a message mapping (which is not multi mapping), and here the code (UDF) works to fetch the file name...
    the code is all correct....and it looks like
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String sourceFileName = conf.get(key);
    if (sourceFileName == null ){
    sourceFileName = "ErrorFile.xml";}
    return sourceFileName;

    Hi,
    The scenario I am trying to test is a multi mapping scenario where I am trying to split one source message and create two target messages by using two different receiver interfaces, one for each message.
    I am on PI 7.1 and when I test message mapping and operation mapping using the payload from SXMB_MONI, it is successful. Whereas when I test the scenario end to end I am getting the following error messages:
    Operation Mapping
    Employee_Out_SI_To_Employee1_In_SI_AND_Employee2_In_SI_OM
    Name
    Employee_Out_SI_To_Employee1_In_SI_AND_Employee2_In_SI_OM
    Namespace
    http://accenture.com/1:N_multi-mapping
    Runtime error
    Split mapping created no messages
    Start tag ns0:Messages Add raw attribute xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge" Start tag ns0:Message1 Close tag ns0:Message1 Start tag ns0:Message2 Close tag ns0:Message2 Close tag ns0:Messages
    Could someone please help
    Cheers,
    S

  • Setting up the File Name of email Attachment from Received File Name

    Hello All,
    I have to send the Received File in attachment to an Email if there is any exception. Here I can attach the file, but I cannot set the file name of attachment as the Received File Name. Is there anyway of doing this without using custom pipeline component.
    Here I am using the Orchestration and SMTP Adapter.Any help is greatly appreciated.
    Thanks

    It might work if you use a custom pipeline component on your send port and in the Execute method populate the MIME.FileName property of the body part.
    Something like:
    public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
    string filename = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
    inmsg.BodyPart.PartProperties.Write( "FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "filename);
    return inmsg;
    You can take reference from similar post here
    SMTP - Setting attachment filename
    Anther good article with MIME is here
    Setting attachment filename with the SMTP Adapter
    For MIME case your SMTP message construct statement would be like below
    multipartMessage.MessagePart_1= InMSG;
    multipartMessage.MessagePart_2="This is message part2 as a string";
    multipartMessage(SMTP.Subject) ="Email From Dynamic Port";
    multipartMessage(SMTP.From) ="[email protected]";
    multipartMessage(SMTP.SMTPHost) ="yoursmypserver.com";
    multipartMessage.MessagePart_2(MIME.FileName) = "Attachment_Name";
    multipartMessage(SMTP.SMTPAuthenticate) =0;
    Thanks
    Abhishek

  • How can I auto export a PDF File using the "Smallest File Size" preset and set the Exported File Name based on information from an Imported PDF?

    Greetings all,
    I am trying to create a script to automate a PDF export process for my company for inDesign. I’m fairly new to inDesign itself and have no previous experience with javascript, although I did take C++ in high school and have found it helpful in putting this code together.
    We have an inDesign template file and then use the Multi-page PDF importer script to import PDF files. We then have to export two version of each file that we import, then delete the imported file and all of the pages to reset the template. This has to be done for nearly 1000 pdf files each month and is quite tedious. I’m working on automating the process as much as possible. I’ve managed to piece together code that will cleanup the file much quicker and am now trying to automate the PDF exports themselves.
    The files are sent to us as “TRUGLY#####_Client” and need to be exported as “POP#####_Client_Date-Range_North/South.pdf”
    For example, TRUGLY12345_Client needs to be exported as POP12345_Client_Mar01-Mar31_North and POP12345_Client_Mar01-Mar31_South.
    There are two templates built into the template file for the north and south file that are toggled easily via layer visibility switches. I need to get a code that can ideally read the #s from the imported Trugly file as well as the Client and input those into variables to use when exporting. The date range is found in the same place in the top right of each pdf file. I am not sure if this can be read somehow or if it will have to be input manually. I can put North or South into the file name based on which template layer is visible.
    I am not sure how to go about doing this. I did find the following code for exporting to PDF with preset but it requires me to select a preset and then type the full file name. How can I set it to automatically use the “Smallest File Size” preset without prompting me to choose and then automatically input some or preferably all of the file name automatically? (If the entire filename is possible then I don’t even want a prompt to appear so it will be fully automated!)
    PDF Export Code (Originally from here: Simple PDF Export with Preset selection | IndiSnip [InDesign® Snippets]):
    var myPresets = app.pdfExportPresets.everyItem().name;
    myPresets.unshift("- Select Preset -");
    var myWin = new Window('dialog', 'PDF Export Presets');
    myWin.orientation = 'row';
    with(myWin){
        myWin.sText = add('statictext', undefined, 'Select PDF Export preset:');
        myWin.myPDFExport = add('dropdownlist',undefined,undefined,{items:myPresets});
        myWin.myPDFExport.selection = 0;
        myWin.btnOK = add('button', undefined, 'OK');
    myWin.center();
    var myWindow = myWin.show();
    if(myWindow == true && myWin.myPDFExport.selection.index != 0){
        var myPreset = app.pdfExportPresets.item(String(myWin.myPDFExport.selection));
        myFile = File(File.saveDialog("Save file with preset: " + myPreset.name,"PDF files: *.pdf"));
        if(myFile != null){
            app.activeDocument.exportFile(ExportFormat.PDF_TYPE, myFile, false, myPreset);
        }else{
            alert("No File selected");
    }else{
        alert("No PDF Preset selected");
    So far my code does the following:
    1) Runs the Multi-Page PDF Import Script
    2) Runs PDF Export Script Above
    3) Toggles the Template
    4) Runs #2 Again
    5) Deletes the imported PDF and all pages and toggles template again.
    It’s close and much better than the original process which was almost 100% manual but I’d like to remove the Preset prompt from the PDF script and have it automatically select the “Smallest File Size” preset. and then if there’s a way to have it auto-fill in the file name so no user input is required at all other than selecting each file to import. (If there’s a way to setup a batch action for the multi-import script that would be even better!)
    Thanks in advance and if there’s anything else I can provide that would help please let me know! Even a nudge in the right direction will be a big help!

    If you hold down the option key, it will typically show the location. Or you can often hit option-return on the file and it will reveal the file in the Finder, instead of opening it.
    Final option is to open it, and just option-click the filename in the toolbar of Preview and it should show you the location.
    It's probably an attachment to an email you've received. If you have Mail set to cache emails and their attachments it'll be stashed in a subdirectory of ~/Library/Mail. Which is fine.

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

  • My Mac, all of a sudden, actually says error messages like: "A File couldn't not fetched from the network..."

    All of a sudden my mac starts speaking, but it only reads an error message. "A file could not be fetched from the network" but Voice over is turned off, I double checked it. I don't know what happened, but it's annoying, because it is so random.
    I really need help.
    Chris

    I think I know the culprit now, it is Little Snitch and its Audio Prompts. I found something in their Forum but you can't dectivate it.

  • File name to be generated from outbound text file data

    Hi Experts,
    I am collecting IDOCs and generating  IDOC-XML(for IDOCS) file and sending it to PI 7.0 using sender file adapter.
    This is File to File scenario.
    IDOC-XML file picked by sender file adapter gets transformed using XSL mapping in to .dat(text) file.
    Sample Output of .dat file (target file)
    STR SE 2008-10-3011:13:00$SEQ
    EIH21148862                        D2008102820081127SEK000000894800000000894800000000000000 0000XYZ co Ltd                KL25533781          2114886209                    335592                        2508867                      
    EIL21148862                                   0000000000000000100000000000020081021  335592   20081010KILLL899       Operating System
    Now I want output file name to be: ABC_DEF_cc_yyyymmdd_segno.dat
    ABC_DEF is constant
    cc - means country code, in this case it should be "SE", which is marked in bold immediately after STR.
    yyyymmdd - date format
    segno - which means no of records like number of lines in text file, (say three records: STR, EIH, EIL)
    Please feel free for any clarifications required.
    I hope I am able to explain scenario.
    I would really appreciate if you can help me with your valuable inouts.
    Thanks,
    Divyesh

    hi,
    just put one more mapping as the last mapping in your interface mapping
    it can be abap or java mapping
    then as per this blog fill out Filename attribute which will set the file name
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    you can parse the whole IDOC structure in tthose mappings to get all the data you need for the filename
    this is the easiest way I'd say
    Regards,
    Michal Krawczyk

  • Copy File name and Date only from a Folder with SSIS

    Hello all,
    I need to create a package which will list the file names and the dates in a folder, these files are blank flat files. After extracting the file names from the file path i need to create a table which will have two columns Filename and
    Date.We get about 1000 such files every month and we are looking to maintain them in a table.
    Is this possible? Can someone point me in the right direction? 
    FM

    Arthur , I actually figured it out. The For each container let me pass thru the file name, then I inserted the file name into my staging table. I created a FilePath variable and basically Did a sql task and
    INSERT INTO MyTable
    SELECT Filename = ?,
    LoadDate = GetDate()
    In my for each loop I added a *.*txt qualifier... I`ve tested and works well... Got what I needed.
    FM

  • Display file name and remove error from log output

      This script is working great from the GUI but when I call it from a cmd file from a job scheduler it throws out errors. I also want to display from is location the file name and it's byte count(ForEach($File in $Files)) so I can tell if any of the
    files being combined where actually empty. It wants to search the current location from the sever not just-Locations parm..
    Error message in LOG file:
    Get-ChildItem : Cannot find path 'F:\powershell\-SearchFor' because it does not
     exist.
    It's trying to find file install.cmd from where script starts and all the -Locations(which is only the search parm)
    Function Search-Files{
    Param([String[]]$Locations, $SearchFor, $AppendTo)
    Begin
    If(-Not (Test-Path $AppendTo)){New-Item $AppendTo -ItemType File -Force}
    Process
    ForEach($Location in $Locations)
    $Files = Get-ChildItem -Path $Location -Filter $SearchFor -Recurse
    ForEach($File in $Files)
    Get-Content -Path $FIles.FullName | Out-File $AppendTo -Append
    End{}
    Search-Files -Locations "\\Server1\c$\Temp", "\\Server1\c$\Test1" -SearchFor "Install.cmd" -AppendTo "C:\Temp\Search.log"
    Thanks.

     I search multiple shares to find a common file name then create a single output file. I will be doing this search and file creation
    for 5-10 different file names. If there is a better way .. certainly open for suggestions. It's working but having issue with
    the cmd file for every file and folder I check. It puts this error out for each run of the process.
      Error message in LOG file:
    Get-ChildItem : Cannot find path 'F:\powershell\-SearchFor' because it does not exist.
     Thanks.
    I tried your code with little changes and saved in Temp folder.
    My CMD file has the below code
    PowerShell C:\Temp\Untitled1.ps1
    It worked.
    Regards Chen V [MCTS SharePoint 2010]

  • BPM Correlation from Dynamic Configuration not being filled

    Hey guys,
    I'm having the following problem with BPM correlation.
    In my correlation definition, I have 2 fields: one which is filled with information from the message payload, and another one which is filled with a context object (which was created with adapter metadata and filled with dynamic configuration, as refered here: /people/michal.krawczyk2/blog/2006/10/09/xi-dynamic-configuration-in-adapter-modules--one-step-further).
    All instances of BPM are with error status. And when I go into the workflow log for these processes, if I check the correlation object, it is like this:
    <?xml version="1.0" encoding="utf-8" ?>
    <CorrelationKey Version="001">
    <Field1 />
    <Field2>123456789</Field2>
    </CorrelationKey>
    Field1 is the one read from context object, and is not being filled (thus I think the error comes from here). Field2 is from payload and is being normally filled.
    Any ideas on this matter?
    Maybe the problem is not from the correlation. If not, what else could be the case? The BPM crashes on the very first step (one more reason to think that the correlation is the issue).
    Thanks in advance,
    Henrique.

    HI,
    In general Correlation , concept, whatever we configured in Correlation editor , i mean in runtime which xml element should filled with which element of which interface ..as you said you have configured the local correlation to block, in block it is the first receive step, while receiving the first message which is relevent to first recieve step , i mean if it receives the one message which is related to first receive step inteface .. the respective element data will be filled in correlation id and it will assign on giud for processing , so while assign the runtime data to correlation element ( imean filling stage) check you said two elements in correlation does the first message contains these two elements ??
    if so ok , no then check , and try to use the IM before calling the IP to fill the payload.
    Regards
    Chilla
    Oh closed!!
    Message was edited by:
            Chandra Sekhar Chilla
    Message was edited by:
            Chandra Sekhar Chilla

  • Symbol at end of file name prevents email recipient from opening PDF

    The special symbol looks like: ˥  However, there is a tiny little arrow that is on the end of the horizontal part that points left. It is located immediately after the file name, but before the .extension. I have been sending out resumes and the ones that appear with this symbol in the shadow box (the file name box that appears if you hover over the icon once it has been attached via email) appear as a blank (but gray) PDF once it is opened by the recipient.
    What is this and how do I stop it?
    Thanks

    Please let me know the following details:
    1. Which version of Adobe Reader are you using (You can check the same from Help > About Adobe Reader)
    2. Which OS are you using?
    3. How exactly are you attaching the PDFs to the emails? Are you using the Attach to Email functionality from within Reader? Or are you attaching them by yourself?

  • Incorrect file name when importing pictures from camera

    I am using PE 10 on Mac Snow Leopard.
    When I import pictures from my camera and select "Rename Files" with "Custom Date" + "Shot Date" (any format), the file name includes the custom name correctly, but the date part of the file name is some random date (with a weird year: 1913, 1969). Note the example shown on the Photo Downloader is usually the one used. The shot date in the meta data is usually correct. This appears to be similar to a problem when using the "Create Subfolder" option.
    Any ideas why or a work-around?
    I was using PE 8 and did not have this problem.

    Hi dannrendon2,
    Have you successfully run the PSE10_Hot.dmg file? You will not see any change in PSE10 or PhotoDownloader , it is just for fixing the issue of incorrect date format .
    Please follow all the steps mentioned in KB article link mentioned above. Finally when you installed the updater there would be a message of successful installation .
    If there is a failure in your updating process [In your case it is second attempt of updation, there may be a failure] , uninstall your application , check if there is any residual file in application folder under Elements Organizer or Photoshop Elements (delete them). Now again install PSE10 and try to update PSE10_HotFix.dmg updater. There should be a successfully completed message.
    Thanks,
    Nizam

  • Capture the file name in the payload from the SOAP payload

    Hi ,
    We have a scenario , a file to RFC , we need the file name which is coming the SOAP payload . This file name needs to be captured in the payload . Please tell me is there  any way capture this .
    Thanks
    Anita

    Anita,
    If SP14 and above , do this,
    Sender File adapter --> Adapter Specific Identifiers -->  Select File name
    Then in your mapping, you can use this piece of code to access / get the file name,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String FileName = conf.get(key);
    Regards,
    Bhavesh

  • File name of an attachment from HttpURLConnection

    Hi
    I am using HttpURLConnection to download an attachment. Pls someone tell me how to get the file name of the attachment that's to be downloaded.
    Regards
    Faisal

    Well the <b>Content-Disposition</b> header is not always set by the servers when they write the file to the OutputStream. I find that only when the URL itself doesn't given an hint of the File name, a value for <b>Content-Disposition</b> is given.
    For E.g. URL's like <u>http://somehost/context/somefile.zip</u> doesn't give a value for Content-Disposition, where as <u>http://somehost/context/somefile</u> would give a value for <b>Content-Disposition</b>.

  • Need to get file name and directory back from file adapter - WRITE

    I am using the file adapter to write a file. I want to log the file name of the file we just created. Since we use a precise timestamp in the file name, I can't accurately guess.
    I have an invoke in my BPEL process to the file adapter. My first try was to assign the jca.file.FileName property to a variable, but it never comes back. I looked around and saw plenty of ways to SET the file name for a write and GET the file name for a read, but no GET file name for WRITE.
    Anyone have a solution?
    Thanks in advance!

    I think I got your point... You can tell FileAdapter the filename to write, but if you don't then FileAdapter can not tell you the filename that it wrote... I think it is pretty possible Oracle didn't implement the latter, as the write operation is probably asynchronous and the filename is calculated later on...
    If what you want is just log, you may achieve your requirement by increasing verbosity on Adapter logs... Have a look at the link bellow...
    http://docs.oracle.com/cd/E15586_01/integration.1111/e10226/ad_mon.htm#CJHHBBID
    Otherwise, the solution for you will be to calculate filename yourself, and that will be a little bit of reinventing the wheel... But at least you will know the filename...
    Cheers,
    Vlad

Maybe you are looking for

  • Cenário de consulta do status da SEFAZ XML 2.0

    Bom dia. Estou testando o cenário de consulta do status da SEFAZ (para a SEFAZ-MG, ambiente homologação) e utilizo ECC/GRC/PI 7.0. Já verifiquei no site da SEFAZ e o serviço está no ar. Na SXMB_MONI tenho o seguinte erro:   <SAP:Code area="INTERNAL">

  • Video corruption during installation...

    Hi all. I'm attempting to install Arch onto my desktop and I'm encountering an issue, which is odd because I've never had an issue when I installed Arch onto the machine before. The issue is that the video output at the install console is quite corru

  • How to use reserved word in MAX() function?

    Hello, I migrated from SQL Server 7 to Oracle 8.1.7 and have to keep the same tables, columns etc names as it used to be in sql server. One of my tables have colunm called 'Row' and as far as I understand it's reserved word in Oracle I need to bypass

  • Creating search help for AFNAM, and display the hit list with values only

    Hi guys, I have created a search help for AFNAM, but the hit list displays all even if it is blank. I want to display in the hit list the AFNAM with values and do not diplay the blank values... Is it possible? How am i going to do it? Thanks! Mark

  • How do I restore iphone 3G stuck at silver Apple screen (1603)?

    I was replacing a broken screen on my iphone 3G-8 gig with a new one when I saw the screen flash as I connected cable #3. The Silver Apple logo came up and would not go back to the phone screen saver. I tried to restore under iTunes, it went part way