Get Javascript values and use them in a servlet?

Hey
I have a HTML which has Javascript scripts which I have to get values from (a array to be exact) and pass them to a servlet so I can process the information in a certain way. I cant seem to find a way to do this properly as the servlet is server side and Javascript is client side. How can I implement this?
Using a quick example example I have
C:/index.html
C:/js/script.js
Index.html contains:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="js/script.js">
</script>
</head>
<body>
a href="javascript:void(0);" id="add"><img src="images/menunew.png" alt="plus" border="0" />
/a>
</body>
</html>
Script.js contains:
var Script = Class.create({
a:4,
b:5,
add: function(){       
return (this.a + this.b);
(Ignore syntaxis errors as this is a quick example I wrote up just to see if you can give me a practical example on how to read it.)
How can from a Java servlet access a and b from the script.js file (which contains a class named Script) and also access the function add which returns that value?
Thank you for the help
Edited by: 902756 on 16-dic-2011 0:18

DrClap wrote:
902756 wrote:
1: Yes, it seems like the logically answer but Im not too up on AJAX and even less on mixing it up with servlets. Do you mind giving me a simple add (function) sample or something similar?You are looking at it the wrong way. What you actually want to do is to have the browser send a request (which somehow contains that Javascript data) to a URL which causes the servlet to receive the data. There's no "mixing it up" going on there. The client and the server are entirely separate.
And since that request would be an HTTP request, it's just text. There's no concept in HTTP of transmitting objects, whether they be Javascript objects or Java objects. Anything you want to transmit has to be converted into text by the sender and converted back into objects by the receiver.
So there's no such thing as "a simple add function". You're going to have to stop thinking in that way and start thinking of client-server systems in the way they actually are.The thing is I want to start simple to grab a simple concept....
Im trying a AJAX route and I have the following:
/index.html
/js/Adding.js
Index contains:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
     <title></title>
     <script type="text/javascript" src="js/Adding.js"></script>
</head>
<body>
<select name="num1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<select name="num2">
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<form method="get" name="adding">
Do
<span id="res"></span>
</form>
</body>
</html>
Adding.js contains
var Adding = Class.create({
x: null,
y: null,
add: function()
     var xmlHttp = new XMLHttpRequest();
     var value1 = document.getElementById("num1").value;
var value2 = document.getElementById("num2").value;
     xmlHttp.open("GET", "index.html", false);
     xmlHttp.send(value1 + value2);
     var result = document.getElementById("res");
     result.innerHTML = xmlHttp.responseText;
This shows 2 comboboxes full of numbers and link saying "Do" which calls the javascript function and adds the two numbers in the comboboxs and shows them on the screen without refreshing the page. This does not work and I would like this to work before I continue onto the bigger picture.

Similar Messages

  • I want to get another 4s and use it not as a phone, but only as a video camera and editor and hook it up only with wifi. i would sync it to itunes so i can pay for apps and upload. would this work, or must it be connected to a phone carrier?

    I want to get another 4s and use it not as a phone, but only as a video camera and editor and hook it up only to wifi. i would sync it to itunes so i can pay for apps and upload. would this work, or must it be connected to a phone carrier?

    Trust me when I say this coming from 20 years of experience.
    Get a powered external drive, format it 1 Partition Option: GUID and OS X Extended Journed as the format in Disk Utility.
    Download and install Carbon Copy Cloner, clone internal drive to external drive.
    Set a schedule to remind you to do it at least once a week, keep it near your charger.
    When you plug your charger in, do plug the clone and power the machine up, set the display to sleep only,
    CCC will do the rest.
    If you want to boot from it, hold the option/alt and select it Startup Manager.
    I've seen many TimeMachine and TimeCapsule nightmares and so far haven't seen a problem from anyone using a bootable clone.
    It's simple, it's easy, it's more reliable and more powerful than what Apple does and it only takes plugging in a extra cable.
    Make as many clones as you want, keep them time seperated, off site etc. etc.
    Cables don't have network issues, clones can be verified in seconds merely by booting from them.
    Clones protect your productivity, your up in seconds on a clone despite even the hard drive dying.
    Software problem? No sweat, boot of the clone and reverse clone your problems away.
    If you want to fuss and muss with half implemented TimeMachine and TimeCapsule network headaches then prepare to suffer.
    I don't like to suffer, I bought a Mac not to suffer, but it appears you do with TimeMachine and TimeCapsule.
    Most commonly used backup methods

  • Get textfield value and put it session  JSP

    Hi all .
    I have issuse with Session . this the code . file name (order.jsp)
    %>
    <p>Compute</p>
    <table width="354" border="1">
    <tr>
    <td width="36" scope="col"> </td>
    <td width="148" scope="col">Computer Type</td>
    <td width="148" scope="col">Price</td>
    </tr>
    <%
    while (rset.next ()) {
    %>
    <tr>
    <td><input type="text" name="compno" value="<% out.print (rset.getString ("COMPUTERID"));%>"</td>
    <td><input type="text" name="compty" value="<% out.print (rset.getString (2));%>"</td>
    <td><input type="text" name="comppr" value="<% out.print (rset.getString (3));%>"</td>     
    *<td width="61"><a href= "detailorder.jsp?<% session.setAttribute("comp", request.getParameter("compno"));*
    *     String str=(String)session.getAttribute("comp");     *
    *     System.out.println("file name is"+str);%>=">Add <%=str%></a></td>* </tr>
    <%
    rset.close();
    pstmt.close();
    %>
    my problems is that I would to get "COMPUTERID" value and put it in "comp" and save it as session .
    please help
    raid
    Edited by: raid200 on Apr 23, 2008 12:40 PM
    Edited by: raid200 on Apr 23, 2008 12:41 PM

    Copied from a newly opened topic:
    raid200 wrote:
    Hi
    Thanks for your help . I can take one textfield value and send it to another jsp file
    BUT I would to take all textfield in the row that I would use it .
    Code .
    <p>Compute</p>
    <table width="354" border="1">
    <tr>
    <td width="36" scope="col"> </td>
    <td width="148" scope="col">Computer Type</td>
    <td width="148" scope="col">Price</td>
    </tr>
    <%
    while (rset.next ()) {
    %>
    <tr>
    <td><input type="text" name="compno" value="<% out.print (rset.getString ("COMPUTERID"));%>"</td>
    <td><input type="text" name="compty" value="<% out.print (rset.getString (2));%>"</td>
    <td><input type="text" name="comppr" value="<% out.print (rset.getString (3));%>"</td>     
    <td width="61"><a href=" "detailorder.jsp?compno=<%= rset.getString("COMPUTERID")%">>                               <%session.setAttribute("compna",rset.getString(2));
                                  session.setAttribute("comppr",rset.getString(3)); %>"> BUY ME! </a></td>
    </tr>
    In the detailorder.jsp::::::
    String selectedCompId = request.getParameter("compno");
         session.setAttribute("comp", selectedCompId);
    String computerid=(String) session.getAttribute("comp");
    String computername=(String) session.getAttribute("compna");
    String computerprice=(String) session.getAttribute("comppr");
    in the detailorder.jsp ("""""the compna and comppr give the last record in formation""""""")
    Please Help.
    Raid</a>
    You question shows that you still don't understand how JSPs work.
    Try reading [this article|http://www.javaranch.com/journal/200510/Journal200510.jsp#a1].
    You seem to think that the session.setAttribute call is done when you click the link. This is definitely NOT the case.
    All of the java code runs (including all of those session.setAttribute) calls, and produces HTML. So it will store each element into session, overwriting the previous one.
    To get information from one jsp to another you either pass parameters or use session attributes.
    I showed you how to pass the selected id as a parameter, that you could retrieve in the next JSP.
    So you can get the compid.
    You could pass the other values as parameters as well - thats one approach.
    Alternatively you could use the id to look up the data from the database again.
    Alternatively you could store the +entire list+ of computers in the session, se the selected id to determine which one of those was selected, and get the answers like that.
    The full solution to my mind would be to write a bean method that executes the query, and generates a List of java Objects representing your information.
    You can then put that list in the session, and use it to both generate this JSP and get the information once the user selects one line.
    Hope this helps,
    evnafets

  • How to retrieve comments from one OfficeTask activity and use them in another OfficeTask activity for Multi level Approval sequential Workflow

    I'm designing a sequential site workflow using Visual Studio 2010 for Project Server 2010. In my case, I have following 6 stages in the workflow:
    1. InitialProposal Stage
    2. Approval Stage1 -- Needs approval from Approver Project Security Group Members1
    3. Rejection Stage
    4. Approval Stage2 -- Needs approval from Approver Project Security Group Members 2
    5. Execution Stage
    6. Completed Stage
    Requirement is workflow should move to Approval stage2 from Approval stage1  if approved by all members of Approver Project Security Group1and it should move to Rejection Stage even if a single member rejects it.
    Workflow should move from Approval Stage2 to Execution Stage if approved by all members of Approver Project Security Group2 and it should move back to Approval Stage1 on rejection by a single member of the group.
    I'm using inbuilt PSWApproval content type and OfficeTask activity for creating approval task for the group members at both stages.
    On task rejected in Approval stage2, task will be assigned again to Approval Stage1 and I want to show comments given by members of Approver Project Security Group2 to the members of Approver Project Security Group1 with this assigned task
    but I'm not able to retrieve comments from officeTask activity.
    My question is where exactly these comments are saved? how can we retrieve them and use them in another officetask activity? If this is not possible then what is the possible solution for meeting above mentioned business requirement?

    Hi Paul,
    Thanks for your suggestion.
    By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
    the task).
    I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
    public string officeComments;
            public string officeDescription;
            private void TaskCOmplete(object sender, EventArgs e)
                CodeActivity Sender = (CodeActivity)sender;
                Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
                officeComments = ofctask1.Comments;
                officeDescription = ofctask1.Description;          
    Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
    Thank you

  • I have a Ipod Nano and want to get another one , and use both. Can I use the same computer and library for both?

    I have a Ipod Nano and want to get another one , and use both. Can I use the same computer and library for both?

    Yes

  • My computer crashed with all my itunes files.  I was able to get some off and transfer them to another computer.  I am afraid to sync my ipod to the new computer becaused I do not want to loose all of my playlists and other music.  Will this happen?

    My computer crashed with all my itunes files.  I was able to get some off and transfer them to another computer.  I am afraid to sync my ipod to the new computer becaused I do not want to loose all of my playlists and other music.  Will this happen?

    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    Delete the "songs" that do not play in your iTunes library and reimport them.

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • How to create RFQ s and use them to complete the program

    hi,
    how to create RFQ s and use them to complete the program
    thanks in advance

    Hi Santosh,
    RFQ is created through transaction ME41.
    You need to write down BDC for mass update of RFQ, because BAPI is not available.
    Regards,
    Tutun

  • External definition and used them as Data Type Templates

    hi all
    how to Develop external definition and used them as Data Type Templates .
    Thank u
    Swari

    HI
    External Definitions: If a definition of the message structure exists in wsdl, xsd, dtd formats, we can use it in the integration repository by importing it as an external definition.
    External Definations:
    An external definition enables you to import a local WSDL, XSD, or DTD file to the Integration Repository and specify which parts of the schema to extract as the description for a message. You can use these extracted message schema as:
    Output or input messages in message interfaces
    Source or target structures for message mappings
    There is a series of standard schema for describing the message structure at runtime. WSDL (Web Service Description Language), XSD (XML Schema Definition Language), or DTDs (Document Type Definitions) are often used to describe message schema. If a description of the message structure already exists in one of the above formats, you can use it in the Integration Repository by importing it as an external definition rather than re-entering it manually using the data type editor.
    Have a look at
    http://help.sap.com/saphelp_nw04/helpdata/en/43/ce49ef1019087ae10000000a1553f6/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/d4c23b95c8466ce10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/9e97b0f525d743882936c2d6f375c7/content.htm
    cheers

  • Difference between copy value and use one as many

    hi
    what  is the difference between copy value and use one as many?
    thanks

    [http://help.sap.com/saphelp_nw2004s/helpdata/en/26/d22366565be0449d7b3cc26b1bab10/content.htm]
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm]
    Much better understanding of UseOneAsMany: [http://help.sap.com/saphelp_nw2004s/helpdata/en/38/85b142fa26c811e10000000a1550b0/content.htm]
    Edited by: Praveen Gujjeti on Feb 18, 2010 11:42 AM

  • This may sound like a stupid question,,,but can i downlaod other programmes to my ipad, and use them like i would on a pc/net book ?

    this may sound like a stupid question,,,but can i downlaod other programmes to my ipad, and use them like i would on a pc/net book ?

    No.
    It is not a replacement for a computer.
    It mirrors the selected content of your computer.
    The only programs that can be loaded on an ipad are those found in the app store.

  • Reading values from JTextField and using them?

    Hello,
    I am trying to make a login screen to connect to an oracle database. Im pretty new to creaing GUI. I need help with reading the values from the JTextField and to be able to use them for my connection. So do I need to apply a listener? How do I go about doing that in this project. Thanks for any code or advice.
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.sql.*;
    public class UserDialog
        String databaseURL;
        String driver;
        String database;
        String username;
        String password;
        String hostname;
        String port;
        UserDialog() {
            getInfo();
        static String[] ConnectOptionNames = { "Login", "Cancel" };
        static String   ConnectTitle = "Login screen";
        public void getInfo() {
            JPanel      connectionPanel;
            JLabel     databaseURLLabel = new JLabel("Database URL:   ", JLabel.LEFT);
         JTextField databaseURLField = new JTextField("");
         JLabel     driverLabel = new JLabel("Driver:   ", JLabel.LEFT);
         JTextField driverField = new JTextField("");
            JLabel     databaseLabel = new JLabel("Database:   ", JLabel.LEFT);
         JTextField databaseField = new JTextField("");
            JLabel     usernameLabel = new JLabel("User Name:   ", JLabel.LEFT);
         JTextField usernameField = new JTextField("");
            JLabel     passwordLabel = new JLabel("Password:   ", JLabel.LEFT);
         JTextField passwordField = new JPasswordField("");
            JLabel     hostnameLabel = new JLabel("Host Name:   ", JLabel.LEFT);
         JTextField hostnameField = new JTextField("");
            JLabel     portLabel = new JLabel("Port:   ", JLabel.LEFT);
         JTextField portField = new JTextField("");
         connectionPanel = new JPanel(false);
         connectionPanel.setLayout(new BoxLayout(connectionPanel,
                                  BoxLayout.X_AXIS));
         JPanel namePanel = new JPanel(false);
         namePanel.setLayout(new GridLayout(0, 1));
         namePanel.add(databaseURLLabel);
         namePanel.add(driverLabel);
            namePanel.add(databaseLabel);
            namePanel.add(usernameLabel);
            namePanel.add(passwordLabel);
            namePanel.add(hostnameLabel);
            namePanel.add(portLabel);
         JPanel fieldPanel = new JPanel(false);
         fieldPanel.setLayout(new GridLayout(0, 1));
         fieldPanel.add(databaseURLField);
            fieldPanel.add(driverField);
            fieldPanel.add(databaseField);
            fieldPanel.add(usernameField);
         fieldPanel.add(passwordField);
            fieldPanel.add(hostnameField);
            fieldPanel.add(portField);
         connectionPanel.add(namePanel);
         connectionPanel.add(fieldPanel);
            // Connect or quit
            databaseURL = databaseURLField.getText();
            driver = driverField.getText();
            database = databaseField.getText();
            username = usernameField.getText();
            password = passwordField.getText();
            hostname = hostnameField.getText();
            port = portField.getText();
            int n = JOptionPane.showOptionDialog(null, connectionPanel,
                                            ConnectTitle,
                                            JOptionPane.OK_CANCEL_OPTION,
                                            JOptionPane.PLAIN_MESSAGE,
                                            null, ConnectOptionNames,
                                            ConnectOptionNames[0]);
            if (n == 0) {
                System.out.println("Attempting login: " + username);
                String url = databaseURL+hostname+":"+port+":"+database;
             // load the JDBC driver for Oracle
             try{
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   Connection con =  DriverManager.getConnection (url, username, password);
                System.out.println("Congratulations! You are connected successfully.");
                con.close();
                System.out.println("Connection is closed successfully.");
             catch(SQLException e){
                System.out.println("Error: "+e);
            else if (n == 1)
                    System.exit(0);
        public static void main (String args []) {
             UserDialog ud = new UserDialog();
    }thanks again,
    James

    the reason why you can't get the text is because you are reading the value before some actually inserts anything in any fields.
    Here is what you need to do:
    Create a JDialog/JFrame. Create a JPanel and set that panel as contentPane (dialog.setContentPane(panel)). Insert all the components, ie JLabels and JTextFields. Add two buttons, Login and Cancel to the panel as well. Now get the username and password field values using getText() inside the ActionListener of the Login.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class LoginDialog extends JDialog
    String username, password;
      public LoginDialog( ){
        setTitle( "Login" );
        JPanel content = new JPanel(new GridLayout(0, 2) ); // as many rows, but only 2 columns.
        content.add( new JLabel( "User Name" ) );
        final JTextField nameField = new JTextField( "" );
        content.add( nameField );
        content.add( new JLabel( "Password" ) );
        final JTextField passField = new JTextField( "" );
        content.add( passField );
        JButton login = new JButton( "Login" );
        login.addActionListener( new ActionListener(){
          public void actionPerformed( ActionEvent ae ){
            username = nameField.getText();
            password = passField.getText();
            // call a method or write the code to verify the username and login here...
        content.add( login );
        JButton cancel = new JButton( "Cancel" );
        cancel.addActionListener( new ActionListener( ){
          public void actionPerformed( ActionEvent ae ){
            dispose(); // close the window or write any code that you want here.
        content.add( cancel );
        pack( ); // pack everything in the dialog for display.
        show(); // show the dialog.

  • How to get the values and attributes of Longlived processes by using ProcessID.

    Hi Experts,
    For  every process we creates, LC ES2 creates processID.
    we know that if you creates  a long lived process, all  the  values which are in proces will be stored some where  in DB.
    Here my requirement is by using  processID I need to get all/some values/variables stored in database.
    I am not able to get values using processID. Here I don't have clue on  how to get the values.
    Please tell me  how to get the same by using  Process Management. Link/guide would be helpful
    Thanks
    Praveen.

    Searchable means you can put a filter criteria on it (e.g. where amount > 50000)
    Visible means you can add have this column returned as an output (and therefore you can add it as column in listview and see it in Task Details).
    These two attributes were provided so that queries could be done against the process variables, but the exact contents of the variables are not allowed to be seen.

  • Creating page items from pl/sql procedure and using them on a page

    I have a page containing 2 select lists (P21_DEPARTMENTS and P21_DATE). Originally I added them as items that were "select list with submits". The problem is that based on the clearance level of the currently logged on user I only wanted the P21_DEPARTMENTS to be a select list if the user was an administrator. If however the user is not an admin then I want the page to have a hidden form field called P21_DEPARTMENTS that stores the user's department and has a label item that has the department name.
    There is also a report region that generates a table based on the department selected from the select list (if the user is an admin) or the value stored in the hidden form field if the user is not.
    My problem is that I cannot have both those items on the same page and use the HTML built-in authentication to determine which item should be rendered because I need to use the same ID for both items so that the stored procedure in my report region doesn't break. HTML does not permit items to share the same ID.
    I tried to circumvent the problem by creating a stored procedure that performs all of the item rendering in the procedure and uses "htp.p()" to output all of my HTML code. This solution would allow me to pass a parameter into the procedure informing me as to whether or not the user is an administrator. If the user is an administrator the procedure would use a conditional statement and render a select list. If not, the hidden form field and label option would be used instead.
    I finally got the stored procedure working perfectly. Now I am encountering the most bizarre thing. Since the "select list with submit" was not working (I used the same code that gets generated when I created other items using htmlDB's GUI) I decided to use a JavaScript function instead that gets triggered by the onChange event. I send along the value that is currently selected in the select list and in the function I set:
    location.href='http://www.myoraclesite.com/pls/htmldb/f?p=111:21:729740000000000000::NO::P21_DEPARTMENTS:1';
    In theory this should work. The problem is that it doesn't. The page reloads and the P21_DEPARTMENTS select list is not pre-selected.
    The only thing I can think of is that when htmlDB generates page items that you've created with it's own admin tool it assigns some internal guid or something as opposed to when someone tries to generate dynamic page items of their own from a pl/sql procedure it's like the application doesn't even know they exist.
    Any help would be GREATLY appreciated.
    My only other solution would be to create a totally separate page (one for admin and another for non-admin). I would really like to avoid this.
    Thanks in advance.

    I would love to be able to generate my menus and
    various other items in my htmlDB applications in much
    the same way I can using ASP, PHP and Cold Fusion.
    Users should have the ability to write server-side
    code wherever they feel like it. The way htmlDB works
    right now I spend more time trying to figure out how
    to create simple effects and generate simple
    interfaces when I need to be building a portal. Ami - it's important to understand that HTML DB is not like other languages. Thus, trying to force concepts which are common in other languages into HTML DB will often result in more work.
    It's definitely worth the time to go over the HTML DB 2-day Developer, which can be found here: http://www.oracle.com/technology/products/database/htmldb/pdf/B14377_01.pdf
    I can build a portal using Classic ASP, C#, PHP or Cold
    Fusion in like 1/10 of the time that it takes me to
    build one using htmlDB. I understand that this is not
    meant for the hard-core programmer but no web
    programming application in today's day and age should
    prevent experts from getting under the hood.And I can build a Portal in HTML DB in 1/10 the time it will take me to do it in any other language. It's like anything else - proficiency comes with practice and work.
    As for getting under the hood, there is plenty of places you can do that with HTML DB. Keep in mind that HTML DB itself is an HTML DB application, so the limits on what you can build with HTML DB are virtually limitless.
    Sorry for the vent there. After spending the last 2
    days trying to figure out how to implement such a
    straightforward thing and now being informed that it
    can't be done kind of bugged me.I understand your frustration, as I've been there before. My rule for beginners is that if you are writing more than a line or two of code in the first week, you're doing something wrong. Stop, take a break, and then use the ample resources (including searching this forum) to help solve your problem. There are plenty of resources available for you to learn about HTML DB on the HTML DB home page: http://otn.oracle.com/htmldb
    Good luck,
    - Scott -

  • How to take human task values and store them in DB table

    Hi, I have a workflow and when I assign the task to someone I want to store some info in a database table that I created.
    I have checked the box allow task and routing customization in bpel call backs.
    And under the on Assign message, I put an assign bpel construct and an invoke.
    in the assign construct I am trying to copy some of the elements from my humantasks_globalvariables to certain columns in my database table.
    I have found out you can't copy them directly because the humantasks_globalvariables are of type string and my database columns are anonymous. So I tried using parseEscapedXML(), when I do this I get the error that
    oracle.fabric.common.xml.xpath.XPathFunctionException: parseXML() expects the argument to be either a string or an XML element.
    The humantasks_globalvariable I am using says it's of type string but it gives me this error.
    I am obviously doing something wrong. If anybody know how to take values from a human task and store them in a database table any help would be greatly appreciated.

    In the actual database the column types are varchar2. But when I drag an invoke from the bpel constructs I associate it with by DBadapter partner link and click the button automatically create input variables. It creates an xsd and this is what one of the elements looks like.
    <xs:element name="anyvalue">
        <xs:simpleType>
            <xs:restriction base="xs:string">
                 <xs:maxLength value="20"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:element>When I do an assign and try to assign the values from the humantasks_globalvariables xsd there types look like this.
    task:title string
    and the input variable I automatically generated look like this.
    ns7:anyvalue <anonymous>

Maybe you are looking for

  • New Installation / EM doesn't start.

    Hi All, I am installing a 11gr2 database on a RHEL... These are the OS and DB versions: Host> [oracle@rhel98 /]$ uname -a Linux rhel98 2.6.32-100.34.1.el6uek.x86_64 #1 SMP Wed May 25 17:46:45 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux DB> SQL> select *

  • Cannot Access Itunes

    Okay. I realize that itunes is busy with the Christmas rush. But, I've done everything listed in these forums and still cannot access itunes. People are saying they are getting in, intermittantly, but I've had no luck since Christmas Day when the new

  • Quicktime 7 final (from iTunes 5 install) only crashes...

    Whenever I run quicktime or the browser plugin is launched I get this error: DDE SErver Window: QuicktimePlayer.exe - Application Error The instruction at "0x0046162a" referenced memory at "0x00000000". The memory oculd not be "read". Anyone know hot

  • OVI Suite 2.2.0.245 - using E: drive & sms draggin...

    As is a well known problem with the N97, the C:\ drive is far too small & fills up & regularly jams up the phone. So, I have my message settings configured that incoming sms messages are stored in E:\ instead of C:\ to try to preserve room on C:\. Th

  • Trying to get my cursive text to connect

    When I used the trial version of Elements 13 and used Cantoni Pro the text would connect...each letter touched. Now that I have purchased the full version they do not. They are VERY spaced out. VERY frustrating. Please help. Thanks Michelle