Workflow Procedure

Hi,
One of the Workflow Procedure is running in Back end which makes system slow, how I could know this PL/SQL procedure and what is its function
begin WF_ENGINE.CB(:p1, :p2, :p3, :p4, :p5, :p6, :p7); end;
Regards
Bilal

Hi,
begin WF_ENGINE.CB(:p1, :p2, :p3, :p4, :p5, :p6, :p7); end;Check eTRM website for details about this package.
eTRM
http://etrm.oracle.com
Thanks,
Hussein

Similar Messages

  • Standalone workflow procedures

    Anyone have an elegant solution to the following: We're converting SQL scripts used to populate a data warehouse into autonomous transaction PL/SQL subprocedures to be called by simple workflow procedures. Several of the scripts are required to drop and create tables, so we're coding the SQL within 'execute immediate' in PL/SQL. The problem is that the scripts are long and contain many embedded single quotes within functions, 'IN' statements, etc., so converting them to strings is a real pain. Unfortunately, we're using Standalone WF, not the embedded apps version, so concurrent events aren't available to us (I understand that they can be registered to run SQL scripts).
    Does anyone have any other ideas or solutions for this situation?
    Thanks in advance,
    Matt Daniels
    Bellsouth Telecommunications
    205.977.1206
    [email protected]

    Another possibility could be to look at using Oracle Enterprise Manager to run SQL scripts in response to certain events/messages enqueued on AQ. You might want to look at the Oracle Warehouse Builder product, they use workflow and Oracle Enterprise Manager to coordinate the Extract/Translate/Load process.
    Anyone have an elegant solution to the following: We're converting SQL scripts used to populate a data warehouse into autonomous transaction PL/SQL subprocedures to be called by simple workflow procedures. Several of the scripts are required to drop and create tables, so we're coding the SQL within 'execute immediate' in PL/SQL. The problem is that the scripts are long and contain many embedded single quotes within functions, 'IN' statements, etc., so converting them to strings is a real pain. Unfortunately, we're using Standalone WF, not the embedded apps version, so concurrent events aren't available to us (I understand that they can be registered to run SQL scripts).
    Does anyone have any other ideas or solutions for this situation?
    Thanks in advance,
    Matt Daniels
    Bellsouth Telecommunications
    205.977.1206
    [email protected]

  • Stabalizing - Within the workflow (procedural question)

    Hi,
    As mentioned before, we are shooting miniature models for our project. Some of the models are attached to rigs that will allow them to move up/down, left/right, or rotate 180degrees on one axis. We have several choices of points where we attach the models to the rigs, and that allows us to get the shots we want. Out camera is on a tripod, that is attached to a dolly. We rarely use the zoom functions, but rather dolly in and out.
    Some of the rigs require more work, and the footage we have from them leave a lot to be desired - while we work on them, I am using the footage to practice some techniques - in this question, it is stabalization. The rig in question is a pole, that slides purely up and down with the model attached to the top - imagine a helicopter landing scenario. The model starts high, and is brought gradually down. The problem is, that the rig was not very smooth during the first use, and there is quite a lot of juddering on the model itself. it wobbles as it descends. The camera also moved away from the model during the shot.
    I would love to stabalize the model, not the camera movement - what is my best workflow:
    1) Key wobbly footage, then warp stabalize?
    2) Stabalize full shot, then key
    3) process shot (from keying, all the way to composite), then stabalize output.
    Am I correct in saying that warp stabalizer would be my best bet to stabalize talen motion?
    Pierre

    Hi,
    I just finished a test I had set up, and to me, it seems that this is quite a good solution (but is it the most efficient?)
    1) Import footage
    2) Key footage (in my case, using the GMatte/Cmatte/Ematte techniqur to get a beautiful thinn edge to work on)
    3) Stabalizing one of the above precomps with warp stabalizer
    4) Copying and pasting the result onto the other two
    This seemed to smooth out the wobbles nicely, although the movement is still detectable. I am not sure that warp stabalizer IS the best tool to remove talent wobbles!
    Pierre

  • What is the best workflow procedure for importing DV SP 16x9 footage into FCP7 and then exporting the best quality 16x9 to standard DVD so that it looks great (or at least good) on a 50" Samsung LCD TV ?????? Please help! anybody?? Thanks!

    We are using a Sony HDV-Z7U camera for acquisition. We recently recorded an event using the camera's non HD capabilities. We set the camera to record "DV SP" 16x9 settings on both Mini-DV tape and CF card.
    To import the DV SP footage into FCP7 we chose the "DV NTSC anamorphic" setting in the log and transfer settings window. After a successful transfer from the CF card (the CF card held approximately 83 minutes) we checked the size of the file and found it to be 16 Gigs! Why so big? An 83 miniDV tape shot in SD should easily fit on a standard 4.7 gig MPEG2 DVD.
    We need to burn DVDs of this show - we sent it to compressor and got horrible quality.
    What is the best setting to use in FCP7's log and transfer settings window to import DV SP 16x9 standard def. footage and what is the best method for exporting for outputting this footage to DVD that preserves the original quality of the DV SP footage?? Anyone? Many thanks

    > Why so big? An 83 miniDV tape shot in SD should easily fit on a standard 4.7 gig MPEG2 DVD.
    No it doesn't. DV is 13GB per hour.
    In any case, a Video DVD uses the MPEG 2 codec, not DV.
    >What is the best setting to use in FCP7's log and transfer settings window to import DV SP 16x9 standard def.
    DV NTSC anamorphic.
    >what is the best method for exporting for outputting this footage to DVD...
    Use the Compressor DVD preset "Best Quality 90 mins".
    >...that preserves the original quality of the DV SP footage?
    Not going to happen, you are compressing by a factor of 1:4. Shooting as HDV would have given you better quality material to start with. DV is at the bottom end of the scale.

  • Urgent help needed in inserting data into a custom table in oracle WorkFlow

    Hi
    I am trying to get data from the WF and insert into a custom table..
    I read that workflow procedures WONT allow commits...
    Oracle Workflow will not support autonomous commits in any procedure it calls directly. If you need to perform commits, then embed your SQL in a subprocedure and declare it as an autonomous block. This subprocedure must be capable of being rerun. Additionally, note that Oracle Workflow handles errors by rolling back the entire procedure and setting its status to ERROR. Database updates performed by autonomous commits cannot be rolled back, so you will need to write your own compensatory logic for error handling
    Have anyone did this..
    Please give me some idea ...It is urgent
    I am getting data using getitemattribute..and try to insert it into a custom table
    thanks
    kp

    Pl do not post duplicate threads - insert dont work in Workflow
    Srini

  • Workflow process for MIGO

    Dear All,
    I 'm new on the forum and I will greetly appreciate to share SAP experience and knowlege. I ' ve been doing MM and FI for only 2 years and I am very interested in workflow procedure.
    Here is my question :
    Can I set up a workflow procedure for the transaction MIGO in 3 steps
    The goal is to divide this transaction in 3 level of approbation to definitly accept a good receipt and to further proceed to Miro transaction.
    - First, an user must do the good receipt but the document should just be just maintained.
    - Second step, an user should confirm or modify the maintained document and park it. This user could not be the same one as the one that made the good receipt at the first level.
    - Finally, at the third level, an user will finally confirm the good receipt, post the document which will be available for clearing  in MIRO.  This user could not be the one that order the goods in first instance.
    Any help would be greetly appreciated.
    Hervé
    Edited by: H.moreau on Oct 19, 2011 9:24 AM

    There are some default approval processes available.  Luckily, there is one for a manager approval that requires no custom coding.  You can use this one:
    BeneficiaryManagerApproval
    This acquires approval from the beneficiary's manager. This can be associated with the following:
    The request types that have a beneficiary. Examples of such request types are Provision Resource and Assign Roles.
    All user models except Create User and Self-Register User.
    This composite must be associated at the operational level of approval because a request can have multiple beneficiaries at the request level.
    To the list of other available default approvals, you can check here:  http://docs.oracle.com/cd/E21764_01/doc.1111/e14309/soa.htm#BABIHHBE
    If you want to do a custom approval, i would suggest the Oracle By Examples, they will get you started:  http://apex.oracle.com/pls/apex/f?p=44785:2:0:FORCE_QUERY::2,RIR,CIR:P2_SEARCH,P2_GROUP_ID,P2_PRODUCT_ID,P2_RELEASE_ID:Approval%2C1001%2C2019%2C131
    -Kevin

  • Workflow on invoice parking and posting

    Hello,
    Can anybody guide me how to configure the workflow for invoice parking and posting in detaills?
    Thanks
    Nilesh

    hello ,
    Prerequisites
    In the Implementation Guide (IMG) for Logistics Invoice Verification, you can specify for which company code, which vendors, which invoices, and above which amount a document is subject to release. In an invoice document that is completed for posting, the amount that is subject to release is based on the gross amount. (Logistics Invoice Verification ® Document Parking ® Define Release Criteria)
    Technical Implementation (MM-IV-LIV)
    Object Types
    Object technology is used to create the interface between the ERP functions and the Workflow system. The information given below is primarily of a technical nature and is not necessary for an initial overview.
    Incoming invoice
    Object type Bus2081 (Incoming invoice)
    Workflow Template
    The actual operational procedure is implemented as a workflow template. You will find this workflow template in your ERP system.
    Workflow template: WS 20001004
    Description: Release the Completed Log. IV Document
    Triggering Event for Workflow Template
    The event for workflow template IncomingInvoice.CompletedToRelease is triggered if the parked document is complete for posting (RBKP-RBSTAT='B') and is subject to release (RBKP-RFGKZ='X').
    This coupling between the event and the workflow template to be started is deactivated in the standard system. If you want to use the workflow template, you have to activate it in Customizing for Logistics Invoice Verification.
    User Roles
    You complete parked invoices for posting and release them at the following organizational levels.
    Processor Determination: Clerk Responsible for Releasing Invoices
    If you have already maintained an organizational unit, you can use it here.
    If no organization unit is available, create an organizational unit that includes the people responsible for releasing invoice documents that are complete for posting.
    Use the organizational unit in Customizing for Logistics Invoice Verification in the activity for defining release criteria.
    Processor Determination: Clerk Responsible for Completing Invoices for Posting
    If you have already maintained an organizational unit, you can use it here.
    If no organization unit is available, create an organizational unit that includes the people responsible for completing parked invoice documents for posting.
    Link the organizational unit to the single-step task TS20000879:
    ·        By simple processor assignment
    All users in the organizational unit receive the work item.
    ·        By defining an individual role
    Only selected users in the organizational unit receive the work item.
    Authorization Objects
    You must have maintained the authorization to display invoices (activity 03, M_RECH_WRK) for users who are responsible for releasing invoices.
    You must have maintained authorization to change parked invoice documents (activity 77, M_RECH_WRK) for users who are to complete parked invoice documents for posting.
    Several other specific customizing steps are necessary for this workflow template in addition to the general customizing that is necessary to make sure that the workflow system functions properly.
    Activating Event-Receiver Linkage
    The event IncomingInvoice.CompletedToRelease (Invoice document completed for posting and subject to release) for object type BUS2081 (Incoming invoice) is an event that triggers workflow template WS 20001004 and is entered in the event linkage table as such as the standard event.
    This coupling between the event and the workflow template to be started is deactivated in the standard system. If you want to use the workflow template, you activate the linkage between the triggering event and the workflow template as receiver of the event in Customizing for Logistics Invoice Verification. (Logistics Invoice Verification ® Document Parking ® Activate Workflow Template for Release for Posting.)
    Use
    The release of invoice documents that have been completed for posting is supported by a link to a workflow procedure.
    Prerequisites
    The event IncomingInvoice.CompletedToRelease must be triggered for an invoice (BUS2081) so that a release procedure is started. We recommend implementing this workflow together with the SAP workflow template WS20001003.
    In Customizing for Logistics Invoice Verification, you maintain the activity Define Release Criteria under Document Parking.
    Features
    Release for Posting
    In the release step, the person responsible for releasing the invoice document decides if it should be released. The system uses the virtual attribute ReleaseAgent for object type BUS2081 to determine the person responsible for releasing the document. The release criteria in Customizing for Logistics Invoice Verification are checked for this.
    If the person responsible decides to release the document, it is first released in the background and then posted.
    If he or she decided to reject the document, it is forwarded for further processing to the accounts payable clerk responsible for completing invoice documents for posting. The rejection reason should have been entered using the memo function.
    Completing Invoices for Posting
    The accounts payable receives a work item in his or her inbox. In this work item, he or she can read the reason why the invoice document was rejected and change it. If the accounts payable clerk parks the changed invoice document, saves it as complete, deletes it, or posts it, the workflow ends. It makes sense to save the invoice document as complete and therefore trigger the release workflow again, assuming that the invoice document is subject to release.
    If the invoice document is parked, deleted, posted, or released in the background outside the workflow process, the workflow ends.
    regards
    venga

  • Project Server Workflow

    hi,
    The project is created by the
    project manager who then submits it to the project director. The project director then approves or rejects the project and the decision is sent back to the project manager. How is it possible to do this with project server workflow? is
    it possible to assign a project manager and a project director to a project? how do you submit a project in the workfow? accept it? reject it?  Can anyone tell the step by step workflow procedure?

    Hi Sheelj,
    This is a big question, even bigger since we even don't know which version of Project Server you're talking about, which matters. Anyway it will be too long and tedious to detail this complex feature here in a post. 
    With PS2013, it is now possible to build workflow using SharePoint Designer that requires less/no code than with Visual Studio with PS2010.
    Basically you'll need either Visual Studio (PS2010) or SharePoint Designer (PS2013) to build the workflow then deploy it as a feature. Then in your PWA server settings, you are supposed to configure EPTs (enterprise project types) associated to workflow
    and while creating a project with a specific EPT, the given project will follow the workflow.
    Depending on how you built your workflow, different users will be able to approve at the different stages, it is your choice.
    Finally some 3rd party tool are available on the market.
    Please find some links below (for both 2010 and 2013) that will provide you a first start, then after some tests do not hesitate to come back to us with more specific questions :
    http://msdn.microsoft.com/en-us/library/office/ff459292(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/ee767699(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/ee767694(v=office.15).aspx
    http://blogs.office.com/2012/09/18/demand-management-now-with-sharepoint-designer/
    http://msdn.microsoft.com/en-us/library/office/ee767694(v=office.15).aspx
    http://msprojectnow.com/Blog/tabid/142/entryid/617/Designing-and-Deploying-workflows-with-Project-Server-2013.aspx
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • API to call Workflow

    Hi,
    I am looking for an API that can be called from a Java Class/PL SQL function or procedure. And I would also pass some message/parameters from my Java Class/PLSQL function that should be received in the Workflow process.
    Thanks!
    Shalu

    Shalu,
    The Workflow public APIs are described in the Workflow Guide. Please see:
    Oracle Workflow Procedures and Functions
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/workflow.920/a95265/wfapi.htm#apis
    In particular, take a look at the Workflow Engine APIs:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/workflow.920/a95265/wfapi13.htm#eng_api
    The setItemAttrText/Number/Date APIs let you set parameters for a workflow process in the form of item type attributes.
    There are both Java and PL/SQL APIs.
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/workflow.920/a95265/wfapi29.htm#a_setp
    Regards,
    Clara
    Hi,
    I am looking for an API that can be called from a Java Class/PL SQL function or procedure. And I would also pass some message/parameters from my Java Class/PLSQL function that should be received in the Workflow process.
    Thanks!
    Shalu

  • Requisition are not receiving the email communcation............Workflow

    Hi Friends,
    Here is my query on Workflow,
    One of our customer created a purchase order through shopping cart,in the place of the requisitioner details they maintain the user id and we checked the user id in Su01, and i found out the mail id and and user id has been maintained here and the communication method is "Remote Mail".
    Our system is configured in such a way that when the requisitioner will create a purchase order one mail should go to the inbox of the requisioner through workflow procedure.
    I checked the workflow and it is showing that mail has successfully sent.
    Now the user has raise a query that "he is not receiving any email communication whenever he is creating PO through shopping cart".We confirm with the user about the communication mail id and he said that the mail id is correct and the same mail id has been maintained in SAP.
    If anybody faced this kind of problem than pls help me on this.
    Thanks a lot .
    mrutyun^

    Hi Kumar,
    Are you expecting the emails in the Outlook inbox? Is it an external mail id?
    Check things below -
    1. Are alerts being generated? Check transaction ALRTINBOX to make sure that.
    2. Check transactions SOST to see emails are generated for the users.
    3. Make sure that in transaction SCOT, the user id is added as supported address types.
    Hope this helps.
    Regards,
    Rahul.

  • Workflow to send notifications to multiple supplier email ID's

    Hi,
    I am little stuck in one logic. Don't seem to be a complecated but just looking for the right approach.
    I have a custom concurrent program which has a SQL query which returns multiple rows. Each row is a for each supplier e.g.
    Supplier1      [email protected]     123     5000
    Supplier2      [email protected]      456    4000
    Supplier3      [email protected]      789    3000
    This set is returned based upon some criteria mentioned in the where clause of the SQL.
    Ultimate aim is to send 1 notification to each of the email id's and those notification should have the corresponding attribute values.
    3 notifications fired from a workflow triggered by the concurrent program (which actually returns this 3 rows in a SQL)
    Supplier 1 to receive  5000
    Supplier2 to receive  4000
    Supplier3 to receive  3000
    My approach / or the only approach coming in mind is using a cursor for the SQL inside the concurrent program and using a for loop, initiating the workflow each time for a loop iteration i.e for each iteration of loop , workflow procedure will need to be initiated, so item type will be same but item key will of 3 different item key.  Please let me know if this is the only approach or is it somehow possible to fire only one instance of workflow and not 3 different instances to send 3 notifications.
    Ad hoc role creation would not be option here because the number of rows may be large and not just 10-15. I just need the correct approach to handle this,
    Regards,
    Ad

    Can you please explain your requirement in detail? Also why don't you go with a custom table with some references?
    Thanks

  • Workflow for ME51

    Hi All,
    Requirement:
    When ever a purchase requisition(ME51) is created, we want send mail to SAP inbox using workflows.
    Problem:
    We followed the same workflow procedure for creating material through transaction MM01.
    It work fine. When ever a new material is created we are receiving a mail. So We applyed same process for the ME51 with object type 2105. We tried the events CREATED and RELEASESTEPCREATED.But its not working.
    Doubt:
    Should we release purchase requisition even though it is created.
    help us.

    Hello,
    First of all the creation of a purchase requisition triggers event RELEASESTEPCREATED, not CREATED.
    The response to your doubt:the release has nothing to do with the creation. The standard procedure is create the requisition and after that you release it(if you want).
    UPDATE:
    To see exactly what is the problem follow the steps. Enter transaction SWELS and switch on the event trace. Next, create a purchase requisition in me51 and save it.After that, enter transaction SWEL and execute it. You should see the object type BUS2105, the event RELEASESTEPTCREATED, the time of the creation. In the name of the receiver you should see the name of the workflow, in the information a green spot and in the handler/action SWW_WI_CREATE_VIA_EVENT_IBF.
    Tell me if that is what you see.
    After this you should enter SWELS and switch off the event trace.
    The release is a different thing, you will need another work item. But first of all you should try to fix the current problem:the emails are not sent.
    Efren
    Edited by: Efren23 on Sep 30, 2011 4:02 PM
    Edited by: Efren23 on Sep 30, 2011 4:11 PM

  • Synchronizing OID with Oracle Workflow

    Hi,
    I am trying to synchronize Workflow directory services with OID.
    But when executing the wf_ldap.synch_all (it is a workflow procedure), an exception is raised with the following message:
    Error code: -31202
    Error Message: ORA-31202:DBMS_LDAP: LDAP client/server error: *********Rubbish*********
    Unable to set the OID orclsizelimit parameter
    Exception encountered.. exiting
    - I am following the steps in the Oracle Workflow Guide.
    - the platform is Win2000, and workflow version is 2.6.2
    Any Idea?
    Regards,
    Belal

    Check these out
    OWF Builder - Sample Workflows
    http://www.itk.ilstu.edu/docs/Oracle/workflow.101/b10284/dfwf03.htm
    HTH
    Srini

  • IPOD CONNECTIVITY PROBLEM WITH WINDOWS XP VIA USB 2.0

    Enough is enough.
    I have an ipod touch and I am having difficulty connecting it to my pc via usb 2.0.
    I have searched the entire web and came across many cases similar or the same as mine. It's time for apple to face the fact that there is something wrong with either the apple mobile service or the apple usb drivers or the itunes software that causes connectivity problems with win xp.
    For the record my case is this:
    I got my itouch 3 days ago. I installed itunes 8.0. Then I plugged in my ipod to a usb extension cable port connected to a usb at the back of my desktop computer. At first I got the "this usb device can perform faster if you plug it to a usb 2.0 port etc." message. So I did. I removed the extension cable and connected it directly to one of the usb ports at the back. The first time it synchronized, it seemed fine. So I decided before I do anything with it, to update it to the 2.1 version. I made my account and bought (very bad policy there apple, it should be free or at least cheeper than 8 euro) the 2.1 update. I clicked to update the i-touch. While it was updating it crashed during the restore process (because it was disconnected but I didn't know that at the time). I unplugged it, resetted and plugged it back and managed to continue the restoring process until it was updated. After figuring out itunes I chose the "manage files manually option", kept everything unchecked in the sync options except the applications. I noticed there were random disconnections here and there but I didn't pay much attention because they weren't very frequent.
    The next day I plug in the touch again and suddenly I hear that annoying "connecting-disconnecting" sound from windows while my touch kept disappearing and reappearing in itunes. Suddenly my playlists disappeared from the touch. Nothing was in the touch any more. How could that happen since i had chosen to manage my files manually instead of synchronizing? So I unplugged the touch again, restarted the touch, restarted the pc, stopped and restarted the apple mobile service, unistalled and reinstalled itunes, searched microsoft support and read many usb troubleshooting documents in the web. Nothing happened. The touch randomly keeps disconnecting from the usb. I eventually managed to put my stuff back in and keep them there.
    Here's what I know:
    1) There is nothing wrong with my usb ports. I don't use usb hubs, they are usb 2.0, the voltage (500mA) is correct in the device manager. Everything else works fine there.
    2) The ipod touch does not support disk mode so you can't see it under "my computer" and this is not a problem.
    3)There is nothing wrong with the ipod, it works perfectly.
    4) This is not a usb cable physical problem.
    5) The five R's are irrelevant with this situation.
    Uninstalling and reinstalling itunes doesn't solve the problem, neither does hard resetting the ipod.
    6) Older PC configurations seem to be more affected by this but it doesn't have to do with unsupported specific chipsets.
    Here's what needs investigating:
    1) There may be a problem with the apple mobile service running on win XP.
    2) There may be a problem with the apple usb driver and win XP or older motherboards.
    3) There may be a 2.1 firmware issue with usb 2.0 connectivity.
    Workaround so you don't go nuts:
    Use USB 1.1 instead of 2.0. It is A LOT slower but it keeps the connection stable and you can work with the ipod. Just start copying and go do something else for the next hour. So far it works for me.
    This is a serious issue that needs immediate attention. I've stumbled across forum discussions dating to 2005 with this problem (with older ipods of course).

    I think this needs to be put down to the eternal PC/Mac argument. Apple dont want to fix this as they want everyone to buy a Mac. Its a business, understandable, but in turning away PC buyers they alienate a huge percentage of the market.
    Now, I had my first iTouch stolen. It synced, for the most part, very well, just occasionally it removed settings and music, but ticking boxes each time I sync'd sorted that, Its a workflow procedure.
    SO, now that my Touch has been replaced, iTunes cannot see it. The PC can identify it on USB1 or USB2, My work lap top can see it and has indeed upgraded it to V2 software, just in case that was the issue, but no. For some really weird reason Itunes on my desktop cannot see the new pod.
    This does not make sense with the argument that Apple software doesnt work on a PC, but doesnt help that none of the Apple support staff, phone or in-store have a clue about Windows operations.
    Because my Touch has now been trying to connect to 6 separate installs of itunes, multiple USB ports, multiple USB cables, a complete overhaul of the registry settings (everything else still works), and the loss of all my previous settings and backups from the last Touch... but still, the PC says its an ipod but cant install it, iTunes sits there, dumb.
    The only thing I can do now is sell the device as brand new as it has never had music on it and is just a week old...
    It has changed the MiniMac I was going to have for my new flat screen TV into a PC and suggests that anyone with a PC should stick to devices that run on PC, of which there are many, just without the user interface of the dear departed IPod Touch.
    Thanks

  • PDF file created from Oracle Report is attached wrongly

    Hi,
    Please help. It is very urgent.
    I am using Oracle Developer 10gR2, Oracle Report 10.1.2 on Windows 2000.
    I would like to attach the PDF file created by Oracle Report to the Notification sent from Workflow.
    I use the following package procedure in my Workflow.
    procedure Create_File_Attachment (document_id   in varchar2, display_type  in varchar2, document      in out blob, document_type in out varchar2)
    is
         l_itemtype          varchar2(100);
         l_itemkey           varchar2(100);
         l_output_directory  varchar2(30);
         l_filename          varchar2(255);
         src_loc             bfile;
         bdoc                blob;
         src_offset          number := 1;
         dst_offset          number := 1;
         amount              number;
    begin
         l_itemtype := substr(document_id, 1, instr(document_id, ':') - 1);
         l_itemkey := substr(document_id, instr(document_id, ':') + 1, length(document_id) - 2);
         l_output_directory := 'USR_TMP_DIR';
         l_filename := Wf_Engine.GetItemAttrText(l_itemtype, l_itemkey, 'ATR_FILENAME');
         src_loc := bfilename(l_output_directory,l_filename);
         dbms_lob.createTemporary(bdoc, FALSE, dbms_lob.call);
         dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
         dbms_lob.loadblobfromfile(bdoc,src_loc,dbms_lob.lobmaxsize,src_offset,dst_offset);
         dbms_lob.fileclose(src_loc);
         amount := dbms_lob.getLength(bdoc);
         dbms_lob.copy(document,bdoc,amount,1,1);
         document_type := 'application/pdf; name=attach.pdf';
    end Create_File_Attachment;Oracle Report created the PDF file correctly (original.pdf).
    I tried to attach the PDF into my Workflow.
    I can see the file is attached (attach.pdf), but it cannot be opened.
    The Adobe shows : 'A drawing error occured.' each time I open the attachment.
    I compare the original.pdf and the attach.pdf
    However, there is one specific difference
    - in original.pdf, the line started with '.' (single period)
    in attach.pdf, the line is started with '..' (two periods)
    Thus the attachment cannot be opened.
    After I delete the period, it can be opened.
    Question:
    - Has someone ever succeed in attaching the PDF created from Report?
    - Are the codes above is wrong?
    - Or perhaps the DBMS_LOB.LOADBLOBFROMFILE always double the single period on front of the line?
    - Is there any solution on this?
    Note:
    I have succeed in attaching PDF files unless the PDF created by the Report.
    Sorry for the long post.
    Please help. It is very urgent.
    Any help is appreciated.
    Many thanks,
    Buntoro

    The code looks absolutely good. I have the same code working in my system. Only difference is I use TRUE and DBMS_LOB.Session for the BLOB I use to read from the BFILE.
    I can suggest one more way to handle to binary attachments if you are on Oracle 9i DB are later versions.
    procedure attach_document (p_document_id   in varchar2,
                               p_display_type  in varchar2,
                               p_document      in out nocopy clob,
                               p_document_type in out nocopy varchar2)
    is
      l_nid        number;
      l_directory  varchar2(100);
      l_filename   varchar2(100);
      l_content_type varchar2(100);
      l_src_offset binary_integer := 1;
      l_dst_offset binary_integer := 1;
      l_err_msg    varchar2(100);
      l_amount     number;
      l_bfile BFILE;
      l_blob  BLOB;
      l_clob  CLOB;
      file_not_found exception;
      pragma EXCEPTION_INIT(file_not_found, -22288);
    begin
      l_nid := to_number(p_document_id);
      l_directory := trim(wf_notification.GetAttrText(l_nid, 'ATTR_DIRECTORY'));
      l_filename := trim(wf_notification.GetAttrText(l_nid, 'ATTR_FILENAME'));
      l_content_type := trim(wf_notification.GetAttrText(l_nid, 'ATTR_CONTENT_TYPE'));
      l_bfile := BFILENAME(l_directory, l_filename);
      dbms_lob.createtemporary(l_blob, true, dbms_lob.Session);
      dbms_lob.createtemporary(l_clob, true, dbms_lob.Session);
      begin
        dbms_lob.FileOpen(l_bfile, dbms_lob.File_Readonly);
      exception
        when file_not_found then
          l_err_msg := to_char(sqlcode)||' - Attachment File "'||l_filename||'" is not found.';
          raise_application_error(-20002, l_err_msg);
      end;
      dbms_lob.LoadBLOBFromFile(l_blob, l_bfile, dbms_lob.LobMaxSize, l_src_offset, l_dst_offset);
      dbms_lob.FileClose(l_bfile);
      -- Encode the BLOB content to BASE64 and attach to notification  
      wf_mail_util.EncodeBLOB(l_blob, l_clob);
      l_amount := dbms_lob.GetLength(l_clob);
      dbms_lob.Copy(p_document, l_clob, l_amount, 1, 1);
      -- Mention an appropriate Content Type so that Notification System
      -- understands the attachment content
      p_document_type := l_content_type||'; encoding=base64; name='||l_filename;
    end attach_document;Here I read the BLOB from the filesystem and base64 encode it before giving it to the Mailer. Please note that this is a PLSQLCLOB based attachment as against PLSQLBLOB that you are using.
    Thanks - Vijay

Maybe you are looking for