Read an Attachment attached within a process instance

Hi
I am using BPM 11.1.1.6, can someone tell me how do I read and parse an attachment attached within a process instance. Thank you.
Regards
Venkat

Thank Sudipto for the link.
Experts,
I used the API as suggested in the first link and managed to iterate through the attachments attached in a process instance but when i am trying to read the attachments using the getInputStream() its returning null, all the other properties of the taskattachment returns correct information. Is this a known bug?? The sample code snippet is as below:
List attach= task.getAttachment();
int i=0;
for (Object obj :attach){
i=i+1;
AttachmentType taskAttachment = (AttachmentType)obj;
System.out.println("Task Attachment " + i + " " + taskAttachment.getName());
System.out.println(taskAttachment.getMimeType());
System.out.println(taskAttachment.getSize());
InputStream inpStream= taskAttachment.getInputStream();
if (inpStream == null){
System.out.println("Stream is empty");
}

Similar Messages

  • Adding an attachment to a BPEL process instance

    Hi
    Is it possible to add an attachment (say a word/pdf doc) to an instance, where the document is obtained from a webservice (say as a binary content in web service)?
    Thanks
    SAtinder

    In our application, an attachment surfaces in the middle of the lifecycle, but not from the start.
    We were using the following to accommodate the attachment as the part of the payload ...
    <xsd:element name="AttachementMimeType" type="xsd:string"/>
    <xsd:element name="AttachmentMIMEStream" type="xsd:string"/>
    Hope this helps.

  • Adobe Reader X (10.0.1.434) lauch 2 process instances on Windows

    Hi Adobe,
    I have installed Adobe Reader X (Version: 10.0.1.434) on windows platform. I have noticed that whenever I lauch the application once (thru .pdf file or even launching the adobe reader application itself) there appears two process instances (AcroRd32.exe) . Can you please tell me why i am facing this behavior?
    Moreover, I found some individual blogs discussing that Protected View may cause this, therefore I have tried to revert (un-check) it but still facing the same issue.
    Please note that, the no. of process instances are critical for me as one of my application tracks the no. of adobe instances user launches and the above mentioned behavior is resulting in-accurate calculations.
    Thanks & Regards,
    Maverick.

    Thanks you Xiral for your reply,
    In my case the senerio is little different the article is discussing about the case when user is closing the intance of Adobe reader. but in my case when ever I start the application (i.e. AdobeReader.exe) 2 process instances of "AcroRd32.exe" get started (Which can we viewed using Windows Task Manager).
    Beside that this is very consistent what I have observed is that every time I launch the application (By double clicking on Adobe Reader exe or by its associated file). Moreover I have checked the behavior on different machines as always (on Windows 7 and Windows XP OS), the result for all machines are same.
    To elaborate the senerio let me guide step by step as follows:
    1. Open "Windows Task Manager".
    2. Observe that there is "0" intances of "AcroRd32.exe" in "Processes" tab.
    3. Double click on the desktop shortcut for Adobe Reader 10.1 (or any other shortcut link or .pdf file). to launch single instance of Adobe reader
    4. Open "Windows Task Manager" again.
    5. This time you will note that there are 2 instances of "AcroRd32.exe" processes running on your machine. while only 1 process windows appearing.
    Now, the problem I m facing is due to the behavior that why when user is running single instance of the application, there appear 2 processes. In other words, 2 processes of "AcroRd32.exe" for each instance of application.
    Thanks & Regards,
    Maverick.

  • Is it possible to attach a JDev debug process to a r2 instance?

    Is it possible to attach a JDev debug process to a r2 instance, like I can do with a stand alone OC4J instance?

    Worked it out my self.
    Farm > Application Server: "your 9iAS instance" > OC4J_home > Server Properties
    Command Line Options
    Java Executable: <jdev_home>\jdk\bin\java.exe
    OC4J Options: <NA>
    Java Options: -ojvm -XXdebug,port5000,detached,quiet

  • Attaching word documents with process intsnace??

    Hi All,
    Iam using WLI 8.1. One of our reqmqnt is such that we need to attach many word documents with process instances.
    I believe this is possible using a data type as RawData. Can somebody confirm this??
    Thanks,
    Prashanth Bhat.

    Any thoughts?
    Yep.
    Why are you posting this question in the iPod forum?

  • How to attach a document to an instance and to an email

    I've a requirement to attach a document to an instance and attach the same to an email. Any suggestions??

    I've one suggestion see this code below:
    Attach in Instance:
    Fuego.Lib.Attachment attach ;
    attach.create(contents : attachBinary, name : attachname, description : attachdescription);
    Attach in Email :
    ProcessInstance.attachments[] attachments;
    foreach (a in ProcessInstance.attachments) {
    attachments.extend(source : a.contents, fileName : a.fileName);
    Mail reminderEmail;
    reminderEmail = Mail();
    reminderEmail.subject = "xxxx";
    reminderEmail.from = "[email protected]";
    reminderEmail.message = "xx";
    reminderEmail.attachments = attachments;
    MailSender sender;
    sender = MailSender(mail : reminderEmail);
    sender.send(implname : "mail");

  • Import attachment thru Order Import Process

    Hi all,
    we are importing sales order thru concurrent process : ORDER IMPORT successfully.
    Now I want to import attachment attached along with order header & line level.
    How it possibe thru ORDER IMPORT process ?
    regards
    sanjay

    Insert records into following tables you should be able to import attahments
    p_status := 'S';
    p_message := 'Attachment created successfully';
    IF p_operation_code = 'INSERT' THEN
    BEGIN
         SELECT fnd_documents_short_text_s.NEXTVAL
         INTO v_media_id
         FROM dual;
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'Unable to get short text next value';
         RAISE e_stop_process;
    END;
    BEGIN
         SELECT fnd_documents_s.NEXTVAL
         INTO v_doc_id
         FROM dual;
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'Unable to get fnd documents next value';
         RAISE e_stop_process;
    END;
    BEGIN
         SELECT datatype_id
         INTO v_data_type_id
         FROM fnd_document_datatypes
         WHERE name = 'SHORT_TEXT';
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'While finding datatype id '||SQLERRM;
         RAISE e_stop_process;
    END;
    BEGIN
         SELECT category_id
         INTO v_cat_id
         FROM fnd_document_categories_tl
         WHERE user_name = p_cat_name;
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'While finding category id '||SQLERRM;
         RAISE e_stop_process;
    END;
    BEGIN
         INSERT INTO fnd_documents
         (document_id,
         creation_date,
         created_by,
         last_update_date,
         last_updated_by,
         datatype_id,
         category_id,
         security_type,
         publish_flag ,
         usage_type,
         start_date_active)
         VALUES
         (v_doc_id,
         p_creation_date,
         v_user_id,
         p_last_update_date,
         v_user_id,
         v_data_type_id,
         v_cat_id,
         4,
         'Y',
         'O',
         SYSDATE);
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'While inserting data into fnd documents '||SQLERRM;
         RAISE e_stop_process;
    END;
    BEGIN
         INSERT INTO fnd_documents_tl
         (document_id,
         creation_date,
         created_by,
         last_update_date,
         last_updated_by,
         LANGUAGE,
         description,
         media_id,
         source_lang)
         VALUES
         (v_doc_id,
         p_creation_date,
         v_user_id,
         p_last_update_date,
         v_user_id,
         'US',
         p_description,
         v_media_id,
         'US');
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'While inserting data into fnd documents_tl '||SQLERRM;
         RAISE e_stop_process;
    END;
    BEGIN
         SELECT fnd_attached_documents_s.NEXTVAL
         INTO v_att_doc_id
         FROM dual;
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'Unable to get fnd attached documents next value';
         RAISE e_stop_process;
    END;
    BEGIN
         INSERT INTO fnd_attached_documents
         (attached_document_id,
         document_id,
              creation_date,
              created_by,
              last_update_date,
              last_updated_by,
              seq_num,
              entity_name,
              pk1_value,
              automatically_added_flag)
         VALUES
         (v_att_doc_id,
         v_doc_id,
         p_creation_date,
         v_user_id,
         p_last_update_date,
         v_user_id,
         p_seq_num,
         p_entity_name,
         p_pk_value,
         'N');
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'While inserting data into fnd attached documents '||SQLERRM;
         RAISE e_stop_process;
    END;
    -- Fnd_File.put_line(Fnd_File.LOG,'The Values '||v_media_id||','||p_note);
    BEGIN
         INSERT INTO fnd_documents_short_text
              VALUES (v_media_id,
                   p_note,
                   NULL);
    EXCEPTION
    WHEN OTHERS THEN
         p_message := 'While inserting data into fnd_documents_short_text '||SQLERRM;
         RAISE e_stop_process;
    END;
    ELSIF p_operation_code = 'UPDATE' THEN
    BEGIN
    UPDATE fnd_documents_short_text
    SET short_text = p_note
    WHERE media_id IN (SELECT media_id
                   FROM fnd_attached_documents fad,
                        fnd_documents fd,
                        fnd_documents_tl fdt,
                        fnd_document_categories_tl fdct
                   WHERE fad.document_id = fd.document_id
              AND fd.document_id = fdt.document_id
              AND fd.category_id = fdct.category_id
                   AND fad.entity_name = p_entity_name
                   AND fad.pk1_value = p_pk_value
                   AND fdct.user_name = p_cat_name);
    EXCEPTION
    WHEN OTHERS THEN
         p_status := 'E';
         p_message := 'SQL Error while updating note :'||SQLERRM;
    END;
    END IF;

  • How to read an email attachement

    I cannot read any email attachment on my Ipad. Any suggestion ? Thanks in advance.

    Firstly, try a Reset (Hold the Home and Sleep/Wake buttons down together for 15 seconds).
    As a matter of interest, you should be able to view any attachment. However, you will not be able to save it to a location of your choice (and work on it) unless you have an app that is appropriate. For instance, if the attachment is a PDF then you get the option of where you want to store it, I.e., in iBooks (which is automatically supplied with the iPad) or one which you install such as Goodreader etc. A Word document attachment would require the Pages app or another suitable app. [Just adding this in case you are not aware.]

  • Reading an PDF Attachment  From Sender Mail Adapter

    Hi All,
                   i am able to get a mail  from my Mail Server, But my aim is need to Read an PDF attachment from the mail, in SXMB Moni i am getting the Payload with attachment, I have a created a module to convert that PDF to XML(Module is working fine in file to file sceneraio) .
    In adapter should i need to use Payload Swap Bean Module also , because in sap help said that i need  Select Keep Attachments. I want to know how that how to Push the PDF attachment to My Custom Module which is used to convert the PDF To XML.
    If Payload Swap Bean Module needs to be Used , please tell me the Key Names and Key Values to be used.(swap.keyName,swap.keyValues)
    Thanks and Regards,
    Kamal
    Note: Points will be awarded

    Kamal...
    See if this helps
    [Module Name]
      AF_Modules/PayloadSwapBean
    [Module Parameters]
    The following parameters are used for this module
      swap.keyName          the name of a supported attribute.
      swap.keyValue         the value of a partial string that is required
                            to appear.
    The supported attributes (swap.keyName) include the payload attributes
    such as payload-name, payload-description and any content attributes
    such as content-type, content-disposition, content-description, etc.
    Regards
    Ravi Raman

  • Difference in File Adapter Read File as attachment and Use File streaming

    Hi all,
    As part of our POC we created a File adapter using the option Read file as attachment and File streaming we observed below things
    1.When we are taking “Attachment” option in file adapter, Its able to archive, but not supporting to write data to different location(using fileadapter’s write operation.)
    2.when WE are taking “ file streaming “ option in the adapter , Its not able to achive, but it writes data to different location(using fileadapter’s write operation.)
    Can anyone know is this is a correct behaviour . If yes what is the reason .
    Thanks
    Phani

    Hi all,
    As part of our POC we created a File adapter using the option Read file as attachment and File streaming we observed below things
    1.When we are taking “Attachment” option in file adapter, Its able to archive, but not supporting to write data to different location(using fileadapter’s write operation.)
    2.when WE are taking “ file streaming “ option in the adapter , Its not able to achive, but it writes data to different location(using fileadapter’s write operation.)
    Can anyone know is this is a correct behaviour . If yes what is the reason .
    Thanks
    Phani

  • Getting process instance id from within java control

    Hi,
    here's a brief description of what i need to do. I have a group of processes which i start using one common interface (jpd control). the problem is, that when new process is created it needs to be added to a db table. So to have this done automatically i created a java control with a variable of jpd control. information that needs to be put in db is the process instance id.
    does anyone have any idea why after calling clientRequest (without return) method getConversationID() of the process control gives null as a result? i'm sure that the process was successfully started and completed.
    i don't know if this can have an influence on this, but this happens only if process is started from another process which was started in the same way from yet another process. to make it more clear...
    baseProcess -> (startSubprocess -> startsubSubprocess)
    both subprocesses are started in the same way from java control, but in the subprocess of the subprocess one getConversationID() returns null.

    i found the solution, which is that process controls should be generated from statefull process. when the process was stateless calling getConversationID() method from process control returned null.

  • Access Process instance ID within ccBPM?

    Hi All,
    Is there anyway to access the process instance id within a BPM like for example in a container operation? I searched the forum but could not find any leads.
    What I am trying to achieve is to use User Decision step. I have configured this and in the transaction BSWP I can find this item in the Inbox. The heading of this item shows the step name used in BPM design not any meaningful title. I can modify this title but want to access and display process instance id. Otherwise, there can be a lot of items in the User Inbox and nobody can say which item belongs to which process instance.
    Any clues?
    Thanks & Regards,
    Sudheer

    Hi Sudheer,
    I suggest to use a transaction ID from the payload of the messages you use in the process. The process ID comes from a number range in PI. A transaction ID from the payload may have higher value for the user.
    If you cannot use the payload, have a look at the existing [context objects|http://help.sap.com/saphelp_nw73/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm] provided in the condition editor during container operation or in message mapping. You might find something of use for you, e.g. the MessageId.
    Regards, Martin

  • HT3799 I want to install Adobe Reader for an attachment that I cannot open.  The Keychain comes up with password.  I forgot my password how do I retrieve it?

    I want to install Adobe Reader for an attachment that I cannot open.  The Keychain comes up with password.  I forgot my password how do I retrieve it?

    You must back up all data before continuing, unless you've already done so. If you need to back up but can't log in, ask for instructions.
    If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password.
    Otherwise*, boot into Recovery mode. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window opens.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
    Select
     ▹ Restart
    from the menu bar.
    You should now be able to log in with the new password, but your Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as your login password), there's no way to recover it.
    *Note: If you've activated FileVault, this procedure doesn't apply. Follow instead these instructions.

  • How do I read an email attachment in MS Outlook that comes through as win mail.dat extension?

    How do I read an email attachment in MS Outlook that comes through as winmail.dat file?  Is there a setting I can change to make any attachment I receive from someone who has Windows?  Thanks!

    Hope this helps.
    http://support.apple.com/kb/ht2614

  • Problem in process instances Archiving using NetWeaver (CE 7.2)

    Hi,
    I'm configuring the process instances Archiving using NetWeaver Composition Enviornment 7.2.
    I followed the document "Process Archiving using NetWeaver Business Process Management".
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e099ee21-6e1a-2e10-4d91-eb278c0dcdb8#rating
    There is a problem when I configure Archive Destination using XML DAS Administration. I define the new archive store with the parameters as in the document but I get error.
    I attach screenshot with the parameters and the error in the next URL: http://www.esnips.com/web/XMLDASAdministration
    Thanks in advance,
    Samantha

    In the screen shot I could see you have configured both for Windows and Unix root. depends on your system please choose one. also set this as the default archive store.  Makre sure the share folder  has shared .

Maybe you are looking for

  • Help using Epson Perfection 1670 with Photoshop CS4, Mac OS 10.6.2

    I have downloaded and installed the driver from epson.com and I have also copied the twain plug in (from the install CD) into the import-export folder. I have restarted my computer and I am not able to scan. I do not see my scanner through Photoshop.

  • Process Overdue

    Hi i am loading transaction data and there was no psa and it was directly updating Infocube.I got an error like Process overdue and in the details tab we have like this .. Short dump in the Warehouse Diagnosis The data update was not completed. A sho

  • SATA Locks on 3 & 4 ??!!

    I have read many posts about this and the prevailing belief is that SATA 1 & 2 is not locked but 3 & 4 are. WHen I set my FSB at anythjing marginally above 200, I can't boot with the drives in 3 & 4 but I can boot up to FSB 235 om SATA 1&2, which is

  • ABAP Code Generator

    Hi, I wish to write a program that generates and create the code for me. One example could be I see a standard SAP Module which I like, but want to change it slightly. I enter the function module in to a program click execute it it generate an identi

  • Mod_ose trouble

    Hello! Can't rigth configure the access to servlets via mod_ose. In error log of apache follow errors: LISTENER not found or address description longer than 4096 chars Cannot bind JIP service to LISTENER Try to configure both, whith MTS configuration