Using Fuego.Io.TextFile

Hi all,
I want to use Fuego.Io.TextFile to parse my text file.
1) I obtain this text file in binary format from the end-user using a JSP for attachments.
2) I then put it in the attachments section of BPM by creating an attachment using (Attachment).create
3) I then take this file and put it in a location in the workspace/project directory using Fuego.Lib.Server.homeDir+ "/" + this.attachments.fileName;
4) The filename extension or the contenttype is txt
5) I therefore should be able to use Fuego.Io.TextFile
But I cannot.
When I try to parse my textFile, it says logMessage("---Does file exist?--> " + textFile.exists); = FALSE although this is a textFile.
I think this is because , I am taking it from the end-user through a JSP UI in the form of a Binary File.
But why can't Fuego.Io.TextFile identify it as a text file although the extension .txt and the content is text?
Any idea?
How do I resolve this issue?

Sure - here are a few fairly recent examples:
Re: How to get work item details programatically ?
Re: Searching Multiple Process instances
Re: Searching for instances using getIntancesByFilter and ClientProcessService
Re: In the "B" check if there is one instance of the process "A"
Re: PBL to retrieve all instances assigned to a participant
Re: How to kill an instance process in BPM studio 6.0
Re: Querying engine db
Dan

Similar Messages

  • Adding/deleting attachments using Fuego.Papi in OBPM10g

    Hi,
    I am seeking a resolution to the below issue. It will be really great if somebody can help me on this.
    The scenario is as follows.
    - Using global creation activity to fetch all eligible instances for a particular process using Fuego.Papi api.
    - The aim is to show and add attachments to the instances if required by the user.
    - Need to do this through a presentation, if needed jsp also.
    Problem statement
    - Is there any facility in the Fuego.Papi api to achieve this?
    - Is there any connection between Fuego.Papi api and Fuego.Lib api? As instance variable are directly not accessible via Fuego.Papi.Instance object. Is there any way to typecast Fuego.Papi.Instance to Fuego.Lib.ProcessInstance?
    - Is it possible to show the attachments individually in presentation or jsp is a must?
    Since there is a change in api from 5.7 to 10g, I am finding it difficult to solve it.
    Thanks in advance to all.
    Soubhagya

    Hector -
    Looking at you sequence, it appears that you have calling a subsequence that is removing steps from the caller's sequence. TestStand does not support editing sequences while they are running and we do not test this either. 
    When you execute a sequence in TestStand, the engine creates a runtime copy of the sequence that relies on some of the information stored in the edittime copy of the sequence. TestStand expects that the number of steps in both of these copies of the sequence to be the same. When they are not, it is possible to get an execution into a bad state. At the moment, your sequence is likely working because you are updating only the runtime copy and most of the references back to the edittime copy appear to be holding up. If you had in some way updated the edittime copy, I suspect that you would have seen a crash. Also, we actually reuse runtime copy of sequences within an execution, so the next time you called the sequence, you might find that the steps have already been removed.
    If you somehow want to build a sequence in a sequence file prior to calling it, that would be supported. You just have to ensure that the file is not being used in another execution, i.e parallel or batch model.
    Scott Richardson
    National Instruments

  • Appending node using Fuego API

    Following the example in the samples directory i wanted to create a XML node called "D" and append it to the node BB in the XML document below
    Final result = "<AAA><BB><C>blah</C><D>blah blah</D></BB></AAA>";
    -----CODE START-----
    String xmlstr = "<AAA><BB><C>blah</C></BB></AAA>";
    XMLDocument xmlDoc = XMLDocument();
    xmlDoc.initialize(content : xmlstr);
    XMLNode rootNode = xmlDoc.rootFor();
    XMLNode xmlNode1 = xmlDoc.createXMLNodeFor(tag : "D");
    XMLNode xmlNode2 = xmlNode1.appendTo(xmlNode : rootNode);
    String xmlContent = xmlDoc.print();
    display(xmlContent);
    -----CODE END-----
    I have to append it to the node BB but i dont know how to proceed furthur. Can anyone suggest a solution? Thanks for your help. Another question - with the above lines of code i get a blank?

    Finally figured it out - very wierd structure...
    String xmlstr = "<AAA><BB><C>blah</C></BB></AAA>";
    XMLDocument xmlDoc = XMLDocument();
    xmlDoc.initialize(content : xmlstr);
    XMLNode rootNode = xmlDoc.rootFor();
    XMLNode bbNode = rootNode.getChildFrom(path : "BB");
    XMLNode xmlNode2 = xmlDoc.createXMLNodeFor(tag : "D");
    xmlNode2.text = "blah blah";
    XMLNode xmlNode4 = bbNode.appendTo(xmlNode : xmlNode2);
    String xmlContent = xmlDoc.print();          
    display(xmlContent);
    The code mentioned above will append a new tag called D to BB.

  • Using JSP, how to add new items to Fuego Business Object "Group" ?

    Given the classic Fuego Business Object (FBO) example of an Order, which has a few attributes (orderNumber, customerName, Order Date) and a GROUP attribute called OrderItems (ItemName, ItemPrice, etc.), I want to use a JSP to allow user to submit order. My JSP has a form and uses the Fuego Tag Library. There are FORM INPUT elements for Order.orderNumber, Order.customerName, Order.OrderDate, and a table using dynamic HTML to add rows and INPUT elements for new items to add to the GROUP attribute OrderItems - ItemName, ItemPrice, etc.)
    But when the user wants to add "OrderItems" to the order, I don't know how to get Fuego to create OrderItem Objects to add to the array (aka GROUP).
    Thx in advance.

    ###### below is the response I response I received from a BEA Engineer. From looking at the html source of fuego presentations that implement desired functionality, it appears as though they handle it using the first suggested workaround below ######
    Hi,
    The short answer to your question is that there is no out of the box feature to support directly what you are asking for.
    The problem is that JSPs receives a Fuego Object that is accessed at rendering time (JSP compilation/ HTML rendering). And then all the updated values are sent back to the engine in a new request when you hit the submit button of a FOR tag that has the postResult tag in the action attribute. At this point all these values are automatically taken from the request and the Fuego Object instance variable in the screenflow is updated.
    After saying this you will notice that it doesn’t make sense to update the Fuego Object instance on the JSP. Because you only could do this ate rendering time and because this instance is not going back to the engine (just the values).
    Fuego Object tag Library was designed basically to be able to show Fuego Object data and invoke runs-on-server FO methods.
    I see 3 different approaches to solve the problem you have:
    1)Use JavaScript to call a runs-on-server method that recive the required arguments to extend the group and set the values. You should use the new tag called invokeUrl that allows you to use AjaX, in this way you could update the page with partial rendering.
    2)Use JavaScritp to submit the form when the user click the add row button. And have a loop in the Screenflow with an automatic activity that will extend the group and the go back to the component activity that now will show the page again but with one more row. The drawback is that each time the user wants to add a row, it will require the entire page to be refresh.
    3)Handle the table and values using JavaScritp and DHTML, and put all the new values in the request (input element), then in the Screenflow use an automatic activity to set this values to the Fuego Object.
    Look at the Samples of using Fuego Tag Lib and AJaX
    albpm5.7\studio\samples\Integration\Portlets\PFoodDelivery.fpr
    albpm5.7\studio\samples\Integration\ThirdParty\AJaX.fpr

  • Flash LoadVars textfile problem

    I'm using a loadvars action to load external .txt file, and
    it loads the file BUT only will read numbers out of the file.
    It won't read letters-which make words- which make
    sentences-which makes me angry.
    Any idea why this would be? I've tried playing around with
    the .txt file encoding, would it be something in the AS code? (even
    thought it has to be loading the file since it is reading the
    numbers.)
    Any suggestions?

    ok. code will follow
    Whats wrong is :
    I'm loading external text files (.txt) but only numbers are
    showing up when loaded. It is loading numbers, so it's pulling the
    right file, but it won't display any letters from the text file. I
    have tired changing encoding on the .txt file with no (correct)
    results.
    SO basically... what would cause flash to load numbers but
    not letters from an external .txt file?
    note* (code uses curFrameNum in textfile name to match text
    files to picture files, but that works, its just not displaying the
    loaded text completely/ correctly)
    Code:
    // -----------------<Loading captions
    A.S.>---------------- \\
    frameNum.autoSize = "center";
    loadedInfo.autoSize = "Left";
    //--------------triger the mcl to
    load------------------------\\
    //myMCL.loadClip("",);
    //myMCL.loadClip("slideshow2.swf",1)
    //---------------LoadVars----------------------\\
    var myLV:LoadVars = new LoadVars();
    myLV.onLoad = function (success) {
    if (success) {
    loadedInfo.htmlText = true;
    loadedInfo.htmlText = myLV.info;
    } else {
    loadedInfo.text = "There has been an error loading the
    requested pictures."
    //--------slide counter----------\\
    var slideInfoLV:LoadVars = new LoadVars();
    slideInfoLV.onLoad = function (success) {
    if (success) {
    slideCounter();
    } else {
    frameNum.text = "error";
    slideInfoLV.load("vars/slide_info.txt");
    var curFrameNum: Number = 0;
    function loadFrame() {
    myMCL.loadClip("images/mission" + curFrameNum + ".jpg",
    this.framesMC);
    this.myLV.load("images/mission" + curFrameNum + ".txt",0);
    loadFrame();
    function slideCounter() {
    frameNum.text = ("picture " + (curFrameNum +1) + " of " +
    Number(slideInfoLV.totalFrames));
    // -----------------</caption AS>---------------- \\

  • Error while deploying a project to the OBPM 10GR3 Server

    Hi all,
    I am trying to deploy my current project to the OBPM 10GR3 server and it gives me the following exception. I am not sure what is this exception.
    The project compiles well in Studio 10GR3.
    Cannot publish the project.
    'close' is not a function. Caused by: 'close' is not a function.
    Does anybody know what is the exception?

    Got it..
    I was using Fuego.Sql.DynamicSQL.close(Iterator)
    For a an executeUpdate query which returns an int.
    But I used it in a method and did not use that method inside my process or screenflow.
    But it did not give me any error/exception while compiling it in Studio.
    It gave me an exception while publishing in Enterprise.
    This is strange.
    It should have given me an error/exception while compiling itself rather than while publishing in Enterprise.

  • How to set up email notification for custom activities.

    Hi,
    I want to send automated e-mail's in some specific activities, not in all of them.
    Is there any way to disable sending the e-mail particularly on some activities inside a process?
    BPM Version: 10.3.2.
    Build: #101201
    Regards.

    Hi,
    You can send email from any of the automatic activity by using Fuego Mail API.
    Configure the SMTP sever with respect to your project in studio (Project >> Engine >> General Tab >> SMTP Mail Server Name).
    In Enterprise server (Engine >> Click on the engine configured >> Networking Tab >> SMTP Mail Server Name)
    Create a method inside your project for sending email, example sendEmail()
         mail as Mail
         mailContain = Mail()
              mail.from = <"[email protected]">
              mail.recipient = <"[email protected]">
              mailContain.subject = <"Hi">                  
              mail.message = <"Hello">                                                                    
              mail.attachments[0] = MailAttachment(fileName : <>)
         mailSender as MailSender
         mailSender = MailSender(mail)
              send mailSender
       3.  Define a Boolean variable with default value set to FALSE.
       4.  Inside the automatic activity where you want to send email, construct your mail body and set it in the mail.message
       5.  If you want to send email then set the Boolean variable to TRUE and inside the automatic activity check for the variable value.
       6.  If the value set to TRUE, call the sendEmail()
    Hope this help you.
    Regards, Bibhu

  • Internal Server Error while deploying a project to a remote BPEL instance.

    Some background. We were trying to use the adapters going out through iWay to hit a Siebel instance. Originally, we were using a BPEL VM for development, and trying to hit adapters on the iWay box. We found out that we needed to have BPEL and adapters installed in the OC4J container; so we rebuilt our iWay box.
    So, now the iWay box has Oracle DB, Oracle App Server, BPEL, and adapters in the same OC4J container.
    When you do an appserver install of BPEL, it doesn't install JDev; so we are doing development on our BPEL VM; or on a standalone version on the laptop (both give the same error.)
    I can deploy the project locally to my laptop or the locally to the SOA(BPEL) VM, but when I try to deploy from either JDev to the BPEL server on iWay, we get:
    Beginning Deployment Process...
    Compiling C:\OraBPELPM_1\integration\jdev\jdev\mywork\AJ_Siebel\OracleCDHToSiebelAsyncCustomer\OracleCDHToSiebelAsyncCustomer.bpel
    Compiling...
    BPEL suitcase generated in: C:\OraBPELPM_1\integration\jdev\jdev\mywork\AJ_Siebel\OracleCDHToSiebelAsyncCustomer\output\bpel_OracleCDHToSiebelAsyncCustomer_1.0.jar
    [1:55:05 PM] Successful compilation: 0 errors, 0 warnings.
    Deploying to http://148.87.129.102:80 domain: default. Please wait....
    [1:55:15 PM] Deployment failed.
    Description of problem: Server error.Internal Server Error
    Suggested solution: Please report this error to the adminsitrator.
    I can hit the BPEL console on the http://148.87.129.102:80/BPELConsole link, so I know that's correct... (as well as the "Test Connection" works fine to that box.)
    Anyone seen this before? Ideas?

    Got it..
    I was using Fuego.Sql.DynamicSQL.close(Iterator)
    For a an executeUpdate query which returns an int.
    But I used it in a method and did not use that method inside my process or screenflow.
    But it did not give me any error/exception while compiling it in Studio.
    It gave me an exception while publishing in Enterprise.
    This is strange.
    It should have given me an error/exception while compiling itself rather than while publishing in Enterprise.

  • Creation of Roles/Participants in BPM programmatically

    Hi ,
    I have the following requirement :
    I am creating users in Weblogic Portal using Portal API.So when i create the users at the same time i need to trigger a call to create the rol/participant information in ALBPM.
    Is there any API, to do so.Could anyone help me out in this ..its urgent!!!!
    Thanks in advance
    Regards,
    Shiny

    Use the classes located in Fuego.Fdi,
    specifically for creating a participant use:
    Fuego.Fdi.DirHumanParticipant , method create

  • JavaScript alert in AS3 or AS2 to debug the external actionscript file

    Hi,
    Is there any way to debug the external AS file as i dont want to use "trace".
    I have an idea to use the input text field the check the variable/function is working right but this is not enough so is there any process in AS2 or AS3.
    Thanks in advance..

    my mistake ..i have used there dynamic textfiled.
    but i got a easy solution by using
    getURL ("javascript:alert('Testing');");
    but this is not the good solution
    is there any way to import the alert contolls in AS2
    like i have read somewhere
    import mx.controls.Alert;
    Please reply..

  • How to attach files in a Oracle BPM Studio process?

    Hi,
    I'm trying to design a process with some screenflows for entering information and I'm creating presentations for each screen. The thing is that I don't know if it's possible to have an attaching file option in the presentations or if I have to do it handcoding.
    Thanks everyone.

    You can use methods listed inside Fuego.IO, but they don't work if you run your process in a client, I mean not the server.
    You can use JSP or methods developed in java in order to upload your files and Fuego.IO methods to access them after you upload them.
    Another thing you should consider is that if you upload files using Fuego library, there's a size limit for files.
    Take a look on How to Use FileChooser on for Client files
    Hope this help.
    Pablo

  • How to attach files in a mail from user4s PC in a Portal aplication

    Hello,
    I am trying to send a mail with attachments from PL/SQL but I don4t know what must I do to attach files from the user's PC. Our aplication is developed with Portal.
    Does anybody knows any java program than can be used like portlet who opens the Outlook??
    Thank you.

    You can use methods listed inside Fuego.IO, but they don't work if you run your process in a client, I mean not the server.
    You can use JSP or methods developed in java in order to upload your files and Fuego.IO methods to access them after you upload them.
    Another thing you should consider is that if you upload files using Fuego library, there's a size limit for files.
    Take a look on How to Use FileChooser on for Client files
    Hope this help.
    Pablo

  • How to query in bpm to generate next seq key

    Hi,
    I am working in 5.7 and DB2, I am able to insert a record in a table using Fuego.Sql.SqlObject.store() provided i assign the primary key value
    prmary key needs to be generated using 'SELECT NEXT VALUE FOR BPMPR.BPM_KEY_SEQ FROM SYSIBM.SYSDUMMY1'
    This query returns the next seq number outside bpm. but when i use it with in bpm, it complains : Unexpected value
    Suggest me how to get the sequence key which is returned by 'SELECT NEXT VALUE FOR BPMPR.BPM_KEY_SEQ FROM SYSIBM.SYSDUMMY1' query.
    I cannot use 'SELECT max(rqstKey) as nxtrqstKey FROM BPMPR.TABLE' to get the primary key value
    Thanks!

    Hi
    The first thing you might want to try is to change your logic in ALBPM to use Dynamic SQL to run your query.
    Here's the syntax that might work. The logic below assumes you named your database External Resouce "DbWithTheMostest".
    nextId as String[]
    query as String = "SELECT NEXT VALUE as nxtRqstKey FOR BPMPR.BPM_KEY_SEQ FROM SYSIBM.SYSDUMMY1"
    externalResourceName as String = "DbWithTheMostest"
    for each row in executeQuery(DynamicSQL, sentence : query, implname : externalResourceName) do
    // keep adding customer names to the array until all the customers have been added
    nextId[] = " " + row["nxtRqstKey "]
    end
    The second thing you might want to try is to catalog an SQL Query (vs. SQL). During the introspection, you'll be prompted to enter your sql.
    Hope this helps,
    Dan

  • Oracle BPM Connection to SFTP

    Hi all,
    Can Oracle BPM connect to SFTP .. If yes, how?
    There is no External Resource Connection?
    Or do we just have to add the URL in the code, in one of the automatic activities?
    Or do we use Fuego.Net.FTPServer?
    Will this work for SFTP?
    Edited by: user8766631 on Dec 20, 2010 11:43 AM

    Hi all,
    Can Oracle BPM connect to SFTP .. If yes, how?
    There is no External Resource Connection?
    Or do we just have to add the URL in the code, in one of the automatic activities?
    Or do we use Fuego.Net.FTPServer?
    Will this work for SFTP?
    Edited by: user8766631 on Dec 20, 2010 11:43 AM

  • Problems with db query in activity in OBPM 10GR3

    I wrote the following query in the activity itself
    INSERT INTO TEMP_TABLE(NAME)
    VALUES (testName);
    It worked fine in DEV environment.
    But when I deployed the project to QA and connected to the db in QA, it gave me an error:-
    ---A SQL Exception has occured in Cause f SQL Excepion: java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-00942: table or view does not exist SQLState: 42S02 SQLErrorCode: 942 Message: [BEA][Oracle JDBC Driver][Oracle]ORA-00942: table or view does not exist
    Why is that?
    I understand that if I use DynamicSQL.executeQuery(sentence : sqlQuery, implname : implname);
    it will work even if I change to connect from DEV To QA
    But if we use the query directly in the activity itself , it does not work in QA.
    Why is that?
    how do I fix that to work in all environments?

    Hi Dan,
    I did not understand you.
    I do the following:-
    1) Create an external resource with a generic name say TEMP_DB and give all the Oracle db credentials, username, password, SID, schema and port. This is connected.
    2) Then I Catalogue this in my Catalog using Catalogue Components-->SQL.
    3) I select the "Use an existing configuration" option and select my newly created external resource which I named as "TEMP_DB"
    4) When I hit next, it fetches me the db information
    5) In that I select the db schema name and introspect the tables in it.
    6) These tables are then entered into my catalog
    7) Finally I use a direct BPM query instead of using Fuego.Sql.DynamicSQL.executeQuery() in my activity itself.
    So the problem is that, even if I change the External Resources config giving it a generic name, I have selected the same DEV schema name. The schema is directly introspected which I directly use in my query in my activity
    as oppsed to using DynamicSQL.executeQuery() where I don't specify the schema name . I just specify the External generic resource name which is TEMP_DB.
    But I don't want to use DyanamicSQL.executeQuery(). So how do I resolve this problem with using it?

Maybe you are looking for

  • SharePoint Server 2013 farm software updates not available in SCCM

    At my current customer, we are currently switching over to SCCM for all Software Update Management. For now, the only issue we are experiencing is that we do not receive SharePoint updates on our SharePoint Server 2013 farm. With WSUS we can detect t

  • Payment Method Error.

    Hi Experts, the go through the error message: No G/L account has been specified for x/usd for the bank. Message no.FZ018 Diagnosis A specification has not been made in the system as to which G/L account is to be posted for the selected payment method

  • How do I get the address bar to not have faded out parts?

    I just let firefox update itself, and now my address bar is all faded except for the domain name. This is annoying, as it's harder to read the rest of the URL. How do I get it back to normal?

  • Query on Withholding Tax

    Hi Expert, I'm using the following query to inquire on withholding tax. SELECT T0.[DocDate], T0.[TransId], T0.[CardName], T0.[LicTradNum] as 'TIN', T0.[WTApplied], T0.[WTSum], T0.[WTSum]-T0.[WTApplied] as 'Tax Due' FROM OPCH  T0 WHERE T0.[DocDate] >=

  • Does iTunes producer check same things as ePubcheck.jar?

    Do I assume that, if my ePub file is okayed by the  ePubcheck program, that it will be accepted by iTunes Producer? Or does Producer add some additional layers to the ePub check? Thanks.