Define variable in package access from trigger

i want to accessing a variable that is defined in the package from trigger..how i must define this variable in the package ?

To add one more point to Justin,
Package variables are global variables. If you want to make it local to single call use PRAGMA SERIALLY_REUSABLE.
create or replace package pkg_variable
as
      g_var number := 1;
end;
create or replace package pkg_variable_local
IS
PRAGMA SERIALLY_REUSABLE;
      g_var number := 1;
end;
/ Testing Above Two pakcages
set serveroutput on
begin
  dbms_output.put_line ( 'Test 1 :');
  dbms_output.put_line ( 'Global Var: ' || pkg_variable.g_var); 
  dbms_output.put_line ( 'Local  Var: ' || pkg_variable_local.g_var);
end; 
Result:
Test 1:
Global Var : 1
Local Var : 1
begin
  pkg_variable_local.g_var := 10;
  dbms_output.put_line ( 'Test 2 :');
  dbms_output.put_line ( 'Global Var: ' || pkg_variable.g_var); 
  dbms_output.put_line ( 'Local  Var: ' || pkg_variable_local.g_var);
end; 
Result:
Test 2:
Global Var : 10
Local Var : 10
begin
  dbms_output.put_line ( 'Test 3 :');
  dbms_output.put_line ( 'Global Var: ' || pkg_variable.g_var); 
  dbms_output.put_line ( 'Local  Var: ' || pkg_variable_local.g_var);
end; 
Result:
Test 3:
Global Var : 10
Local Var : 1
But remember, Serially reusable packages cannot be accessed from database triggers.

Similar Messages

  • How can I access user defined column(in query) inside the trigger?

    Hi
    I have 3 unions and each query displays different records on some criteria. I also have a column hard-coded
    Ex:
    select a.col1, a.col2,
    add as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    change as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    del as update
    from table1 a
    where ...
    And I need to display a column in the report only if update is Add. I was thinking of writing a format trigger for that field. But I do not know how can I access this user defined column named update in the trigger?
    Any help?

    Try ":update" minus the double-quotes. Ex:
        IF :update = 'add' THEN
          RETURN(TRUE);
        ELSE
          RETURN FALSE;
        END IF;
    You'll want to place your hard-coded values in single-quotes. Ex:
        select a.col1, a.col2,
        'add' as update
    - Brian

  • BIP 11G - Retrieving a cursor from a function defined in a package

    We had previously deployed reports in OBIP 10G....
    The reports deployed in OBIP 10G used an XDO file to interact with the database and return data in XML format.
    This action used to be defined in the ‘sqlStatement’ tag of the XDO file.
    <dataQuery>
    <sqlStatement name="Q1"> select PK_AP_GEN_REP.AP_GEN_REP('AP_CH_R101',1) FROM DUAL </sqlStatement>
    </dataQuery>
    For this it would invoke our package called ‘PK_AP_GEN_REP’ and pass the report specific function name ('AP_CH_R101') to it as an input parameter.
    This returned a cursor.
    Hereafter the resultant cursor from above would get each column mapped with those mentioned in ‘dataStructure’ tags of XDO file to form an XML file.
    Currently we are trying the same in OBIP 11G.
    We are creating the dataset with SQL query
    The problem is that the SQL statement “select PK_AP_GEN_REP.AP_GEN_REP('AP_CH_R101',1) FROM DUAL” is not effective.
    Also if the above query is fired it does not retrieve the column names to define the data structure.
    Solutions tried:-
    1.     Forcefully defining the data-structure in XDM file created for this report. This did not work.
    2.     Firing a Before “Event Trigger”. This only works if the function is returning a Boolean and not a cursor.
    We tried modifying the function to return a Boolean and to populate the report specific table which could be queried to fetch the records.
    We defined Oracle DB Default Package = PK_AP_GEN_REP
    We defined the trigger as PK_AP_GEN_REP.AP_GEN_REP('AP_CH_R101',1)
    Now creating the dataset with SQL query does not return any data.
    It is giving the following error:-
    "XML document must have a top level element. Error processing resource 'http://iflmud5im00094:9704/xmlpserver/servlet/xdo'."
    However the query fires if Oracle DB Default Package is reset to nothing...But in this case the event trigger did not fire.
    If there is a wayout involving any of the above 2 steps or any other way please share the solution
    Kindly let me know how I may handle this issue of Retrieving a cursor from a function defined in a package in BIP 11g.

    Further regarding this....
    Not sure regarding performance issues of using pipelined functions
    Just to share with you that instead of what you suggested I have tried out returning a 'table' type object from a PL/SQL function after CAST ing the required query to this Object.
    Stretching the discussion forward, is there a way to cast a ref cursor into a plsql table.
    This could absolutely fit my requirement...
    Thanks in advance

  • Non-static variable cant accessed from the static context..your suggestion

    Once again stuck in my own thinking, As per my knowledge there is a general error in java.
    i.e. 'Non-static variable cant accessed from static context....'
    Now the thing is that, When we are declaring any variables(non-static) and trying to access it within the same method, Its working perfectly fine.
    i.e.
    public class trial{
    ���������� public static void main(String ar[]){      ////static context
    ������������ int counter=0; ///Non static variable
    ������������ for(;counter<10;) {
    �������������� counter++;
    �������������� System.out.println("Value of counter = " + counter) ; ///working fine
    �������������� }
    ���������� }
    Now the question is that if we are trying to declare a variable out-side the method (Non-static) , Then we defenately face the error' Non-static varialble can't accessed from the static context', BUT here within the static context we declared the non-static variable and accessed it perfectly.
    Please give your valuable suggestions.
    Thanks,
    Jeff

    Once again stuck in my own thinking, As per my
    knowledge there is a general error in java.
    i.e. 'Non-static variable cant accessed from static
    context....'
    Now the thing is that, When we are declaring any
    variables(non-static) and trying to access it within
    the same method, Its working perfectly fine.
    i.e.
    public class trial{
    ���������� public static void
    main(String ar[]){      ////static context
    ������������ int counter=0; ///Non
    static variable
    ������������ for(;counter<10;) {
    �������������� counter++;
    ��������������
    System.out.println("Value
    of counter = " + counter) ; ///working fine
    �������������� }
    ���������� }
    w the question is that if we are trying to declare a
    variable out-side the method (Non-static) , Then we
    defenately face the error' Non-static varialble can't
    accessed from the static context', BUT here within
    the static context we declared the non-static
    variable and accessed it perfectly.
    Please give your valuable suggestions.
    Thanks,
    JeffHi,
    You are declaring a variable inside a static method,
    that means you are opening a static scope... i.e. static block internally...
    whatever the variable you declare inside a static block... will be static by default, even if you didn't add static while declaring...
    But if you put ... it will be considered as redundant by compiler.
    More over, static context does not get "this" pointer...
    that's the reason we refer to any non-static variables declared outside of any methods... by creating an object... this gives "this" pointer to static method controller.

  • Local variable can't be accessed from inner class ???????? Why ??????

    Plesae help, help, help. I have no idea what to do with this bug.........
    <code>
    for ( int i = 0; i <= 2; i++ ) {
    for ( int j = 0; j <= 2; j++ ) {
    grids[i][j] = new MyButton ();
    grids[i][j].setBorder(but);
    getContentPane().add(grids[i][j]);
    MyButton sub = grids[i][j];
    sub.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if ( sub.getState() == 0 ) {
         sub = new MyButton( (Icon) new ImageIcon(imageFile));
         if ( imageFile.equals("cross.jpg") ) {
              sub.changeState(1);
         else {
              sub.changeState(2);
    </code>
    The compiler complains that "sub" is in the inner class, which is the ActionListener class, must be declared final. Please tell me what to do with it. I want to add an ActionListener to each MyButton Object in the array. Thanks ......

    OK, now I changed my code to this :
    for ( int i = 0; i <= 2; i++ ) {
      for ( int j = 0; j <= 2; j++ ) {
        grids[i][j] = new MyButton ();
        grids[i][j].setBorder(but);
        getContentPane().add(grids[i][j]);
        grids[i][j].addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
            if ( grids[i][j].getState() == 0 ) {
               grids[i][j] = new MyButton( (Icon) new ImageIcon(imageFile));
              if ( imageFile.equals("cross.jpg") ) {
               grids[i][j].changeState(1);
              else {
              grids[i][j].changeState(2);
    [/cpde]
    Thanks for your advice !!!!!!
    Now the compiler says that i and j are local variables accessed from inner classes, needs to be declared final. How can I solve this then ???

  • Oracle PL/SQL type defined within a package can't be passed from JAVA

    Hello,
    I am trying to create an Oracle ArrayDescriptor in order to receive a colloection element of type "TABLE".
    The PL/SQL array type is defined in a package - the array descriptor creation fails.
    The type is created within a package call MyPackage
    TYPE SERVERLIST IS TABLE OF VARCHAR2(50);
    I try to create the ArrayDescriptor using MyPackage.SERVERLIST but it fails with the message:
    java.sql.SQLException: invalid name pattern: MyPackage.SERVERLIST
    If I create the SERVERLISTtype at the database level - everything works. The problem is that we have a requirement not to pollute the global namespeace with our types, so I can't create the type at the top level.
    I got no input from the Oracle JDBC tean - so any ideea would be very much appreciated.
    Database is Oracle 8.1.7
    And I am using oracle-jdbc thin driver.

    This is only possible, when u define ur custom type globally. The reason being, in JDBC code when u define struct statement, the code with db connection in constructor finds that if the custom type is present in DB , it does not search in specific procedure, so it would only get this , if ur cuustom type is defined globally.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Flash Wrapper and Accessing user-defined variables

    I am working on creating a Flash AS3 wrapper to combine several cpativate files.  I am able to retrieve system variables, however I am not able to retrieve user-defined variables.  I have a user defined variable in my Captivate called passedScore, in my Flash script I have the following...
    var mcLesson1:MovieClip;
    btnHit.addEventListener(MouseEvent.CLICK, test);
    var vLoader:Loader = new Loader();
    vLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
    vLoader.load(new URLRequest("untitled1.swf"));
    function swfLoaded(e:Event):void {
    mcLesson1 = MovieClip(vLoader.contentLoaderInfo.content);
    vLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
    addChild(mcLesson1);
    function test(event:MouseEvent):void
              feedback1.text = mcLesson1.cpInfoCourseName;
              feedback2.text = mcLesson1.m_VarHandle.passedScore;
    feedback1 correctly shows the course name, however, for feedback2 it errors saying a term is undefined (refering to m_VarHandle)

    try using mcLesson1.cpEIGetValue('m_VarHandle.passedScore');

  • How do I use bin variable in package without asking a user?

    hi,
    I would like to write an SQL but I want to use bind variable in package as a static without asking user? Like below?
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    If not, like this SQL how can define a BIND variable as static inside a code? not asking a user?
    db version. 9.2.0.8
    regards and thanks

    OracleADay wrote:
    I would like to ask you, below there is a emp_id variable? Is this BIND variable?
    DECLARE
    bonus NUMBER(8,2);
    emp_id NUMBER(6) := 100;
    BEGIN
    SELECT salary * 0.10 INTO bonus FROM employees
    WHERE employee_id = emp_id;
    END;
    /In the query "SELECT salary * 0.10 INTO bonus FROM employees WHERE employee_id = emp_id" emp_id is turned into a bind variable because
    if you are coding static SQL in PL/SQL then PL/SQL wil automatically use bind variables: please read http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/overview.htm#sthref145.
    This can also be proved with SQL trace. The following code:
    alter session set sql_trace=true;
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    show errors
    alter session set sql_trace=false;generates following raw trace file section with 10G XE:
    =====================
    PARSING IN CURSOR #2 len=79 dep=0 uid=69 oct=47 lid=69 tim=33338762257 hv=2860574766 ad='3c10120c'
    declare
    v number;
    c number;
    begin
    select count(*) into c
    from t
    where x=v;
    end;
    END OF STMT
    PARSE #2:c=46800,e=329811,p=0,cr=9,cu=0,mis=1,r=0,dep=0,og=1,tim=33338762253
    =====================
    PARSING IN CURSOR #1 len=35 dep=1 uid=69 oct=3 lid=69 tim=33338788761 hv=3539261652 ad='3c10053c'
    SELECT COUNT(*) FROM T WHERE X=:B1
    END OF STMT
    PARSE #1:c=0,e=216,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=33338788755
    =====================Edited by: P. Forstmann on 17 mai 2011 17:47
    Edited by: P. Forstmann on 17 mai 2011 17:55

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Using global variable in package

    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package. Can someone help me in the declaration of this variable as a global variable? Also, is it necessary for me to initialize this variable whenever the package executes. If yes, how would I do this?
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    FUNCTION Retrieve_SerialNo RETURN VARCHAR2 IS
        v_serial_no VARCHAR2(20);
        CURSOR Serial_Code IS
          SELECT S.Serial_Code
            FROM Spare_Parts s, Orders r
           WHERE s.serial_code = r.serial_code;
      BEGIN
        OPEN Serial_Code;
        LOOP
          FETCH Serial_Code
            INTO v_serial_no;
          EXIT WHEN Serial_Code%NOTFOUND;
          v_serial_no := v_serial_no;
        END LOOP;
        CLOSE Serial_Code;
        RETURN v_serial_no;
      EXCEPTION
        WHEN OTHERS THEN
          RETURN NULL;
      END;

    user13415143 wrote:
    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package.All variables have scope or "visibility". A variable defined in a procedure is only visible within that procedure.
    A variable defines in a package body. is visible within that package body (i.e. procedures and functions in that package body can "see" that variable.
    A variable defined in the package definition? Well, who can see the definitions of procedures and function in a a package header/definition? Everyone else basically (other PL/SQL packages and procedures and functions). So this is also true for variables defined in the package interface. These are global variables that not only can be used by the code in that package's body, but also can be used by other packages and PL/SQL code.
    So when you create a global variable you need to decide on its scope:
    - define it in package header for global usage in all PL/SQL code
    - define it in package body for global usage within that package only
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    ..snipped..Ugly code as there is no need to use an explicit cursor if returning a value from a single row. Also buggy code. If there are multiple rows returned by the cursor, the function returns the serial of the last random row. How does this make sense?
    This is what I would expect to see from a function like this. You pass it a unique identifier and it returns the applicable attribute (column) value for it.
    E.g.
    create or replace function GetSerialNo( orderNo number ) return number is
      serialNo number;
    begin
      select
        s.serial_code into serialNo
      from spare_parts s,
           orders o  
      where s.serial_code = o.serial_code
      and o.order_no = orderNo;
      return( serialNo );
    exception when NO_DATA_FOUND then
      return( null )
    end;Also note that there is no need to write ugly uppercase code. This is not a proper coding standard. Programming standards for all languages (ranging from C# to Java to Delphi to Visual Basic to C/C++) specify that camelcase should be used for variables and pascalcase for procedures/functions/methods. Uppercase is very seldom used and then only for constant names and compiler options/flags for example.
    Coding reserved words in uppercase? That is just plain silly - and not found in today's programming languages. Do yourself a favour and forget the idiotic standards used by some for PL/SQL and look at the standards for Java and .Net/C# - as the latter are the de facto standards for programming (and have been for the last 2 decades and more).

  • && Substitution Variable in Package Body using SQL Developer

    Hi Folks,
    I've moved over to working to in SQL Developer (its a very early version - 1.0.0) from a combination of SQL*Plus command line and a text editor. I'm trying to get this upgrgraded, but I think the question will be the same with a newer version anyway.
    I am creating a package, and in the package body I have some &&my_var substitutions that I was previoulsy prompted for when calling the .sql from the command line SQL*Plus. I need this as the variable needs to be different for the development and live environment.
    When working in SQL Developer, I can load the package body from Connection->Packages->My Package->My Package Body, and click the edit button to edit the code, however, when I click the Compile button in the top of the window my code error's because of the substituion variablle. An example is:
    CREATE OR REPLACE
    PACKAGE BODY MY_PACKAGE AS
    PROCEDURE MY_PROCEDURE
    BEGIN
    my_variable := &&my_function_from_live_or_dev_database
    END MY_PROCEDURE
    Can anyone tell me if there is a way of defining a compiler variable within the IDE widow while editing a package body stored in the database, without manually copying the code into the Worksheet and running it as a script?
    Thanks,
    AM

    953104 wrote:
    Thanks for the reply, the code was just quickly typed to show the sort of thing I am doing, it wasn't actual code form my project.
    I've come from a C background so what I would have done would be create a #define and changed to when on live or development - or passed the variable to the build environment from the IDE or makefiles and the change would have reflected through my whole project.
    What I want to be able to do is alter a definition of some sort that will reflect throughout my whole project, so I can change it in one location to minimize code changes before going live. I don't really want to be prompted at all. On one system it needs to be DEV_10 and on the other it needs to be LIVE_10.Is there a possibility to elimiante this difference at all?
    For example if DEV_10 is the oracle schemauser on the development database and LIVE_10 would be the one on the production system. THen you could just remove all references to the schema from your code.
    IF you are already connected to this schema, then you don't need to specify the schema name anymore.
    example
    instead of
    create or replace package dev_10.myPackage
    ...you can simply use
    create or replace package myPackage
    ...If needed you can alter the cuurently connected user just before you run the script.
    alter session set current_schema = LIVE10;
    create or replace package myPackage
    ...This would be a different working window in the developer (script worksheet, instead of direct pl/sql editor).
    Substitution variables are allowed there.

  • Newbie how to define variable of type element?

    JDEV 10.1.3.1
    When I perform the following from BPEL designer in JDEV...
    variable new
    create variable
    Select element type
    Select a local file schema xsd
    Select element of choice
    Seems to define OK but fails to compile. Namespaces appear to include the namespace defined in the xsd.
    When I define variables of type message and browse to the appropriate wsdl and pick a message from there this seems to work / compile just fine.
    I am sure that since I am just getting started that this is a common error, please assist and thanks. Must all variables be defined as message types and reside in a WSDL?
    Thanks,
    John

    Hello John,
    I'm not sure whether it is possible to import a schema into a process directly. What I usually do is to import it into the wsdl-file describing the process interface. This is the file you use to define the client-partnerlink. If your schema is imported correctly, you can access the type-definition via the partner-links-node in the type chooser (this works at least in JDEV 10.1.3.3 and 10.1.3.4).
    To import your schema into the wsdl, you need to go to the structure-view in wsdl-editor and after a right-click on the types-node select "insert types". Inside types you insert XML-Schema, inside schema you need to insert an import-tag. The properties for this tag are the file-location and the target namespace used in the schema. The resulting XML-structure should look like this:
    <wsdl:definitions xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:tns="http://xmlns.oracle.com/Order_Booking___Shipment" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Order_Processing_SystemPLT" targetNamespace="http://xmlns.oracle.com/Order_Booking___Shipment">
    <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import schemaLocation="Order_Booking___Shipment.xsd"
    namespace="http://xmlns.oracle.com/Order_Booking___Shipment"/>
    </schema>
    </wsdl:types>
    </wsdl:definitions>
    Greetings,
    Christoph

  • To define variables for all pages

    How can one define variables which can be accessed from all pages. 'Public' does not do it

    Hello,
    Is your query related to Project Server PWA?
    Thanks
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • "VS_NEEDSNEWMETADATA" error while running a package created from C# code

    I have gone through most of the answers for similar questions here however none has resolved the issue. We have created a package using C# code which stages data from a source table to destination (ChildPackage.dtsx).
    Source Table : RowKey, Col1, Col2
    Destination Table : RowKey, Col1, Col2, RowID, RunID (RowID is an identity column in destination table and RunID is a derived column whose value is set using a variable)
    This package runs fine when we execute it directly however, we run these packages from a master package (MasterPackage.dtsx). When we are trying to run the package (ChildPackage) from a MasterPackage we get an error:
    [SSIS.Pipeline] Error: "Oledb Destination" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
    We have tried setting DelayValidation to true for the ChildPackage and even tried setting the values for "ValidateExternalMetadata" for the source and destination component as "False" for the data flow task
    of the ChildPackage.
    There is no case difference between column names in source and destination and it runs fine when we run the ChildPackage directly.
    The only additional task that the Master package performs is to generate and set a variable that is used as RunID value by the child package.
    If we hardcode the RunID in the ChildPackage and run it directly, it runs fine.
    The MasterPackage.dtsx is not created from code and has a step to run ChildPackage.dtsx. We generate the ChildPackage.dtsx from code and replace in original solution.
    Any help would be appreciated.
    Gaurav Agarwal

    Where then this RunID is consumed?
    Arthur My Blog
    The RunID is set by the MasterPackage in a parameter, this parameter is used as value of derived column in the data transformation task of the ChildPackage.
    As mentioned ChildPackage has a RunID column.
    Gaurav Agarwal

  • Is there a way to play an mp4 file at the beginning of a published project only when the project is accessed from a specific site?

    Is there a way to play an mp4 file at the beginning of a published project only when the project is accessed from a specific site?
    A little background info. I use Captivate 7 and currently have over 100 projects that I maintain on a quarterly basis. I publish using the SWF format and upload the swf/htm files to a server where they are then accessed from a few locations (within our online documentation, in our software product, on two different websites). Many of the projects are linked so some will be viewed as a series and others viewed as a standalone video. Each video uses the same template and includes an intro and end slide. Now my organization wants to implement a new intro to all videos (those I publish and those from several groups across the organization). My current intros provide overview material for the specific video so the new intro, which is an animation with audio in mp4 format, would need to be placed at the start of each project. The issue is, the intro adds 9 seconds to every video and in many cases doesn’t add any value (say, if a user accesses the video from within our product or views the videos as a series). I’ve talked it over with my boss and we want to try to add the intro only to videos accessed from site X, not any other location. So now to my question. Is there a way to play an external mp4 file (intro) only when the published project is accessed from a specific site, therefore eliminating the need to update each project? Maybe there's a way to add a parameter or variable to the URL or the html code?
    Thanks in advance for your suggestions. Please let me know if you need additional information.

    AimeeLove,
    I have a solution for you.  You may have to modify the code a little bit based on how long the timeline animation is for your clock.  I based mine on 3 seconds to complete a minute hand sweep around the clock.
    Milliseconds for each point on the clock:
    12 = 0
    1 = 250
    2 = 500
    3 = 750
    4 = 1000
    5 = 1250
    6 = 1500
    7 = 1750
    8 = 2000
    9 = 2250
    10 = 2500
    11 = 2750
    In the mouseover section for 12 o' clock, put this code...
    myVar = setInterval(function(){
         var pos = sym.getPosition();
         if (pos > 0 && pos < 50){
              sym.stop(0);
              clearInterval(myVar);
    },10);
    When you point to the time, the setInterval method loops every 100th of a second and checks the current position of the timeline.  When the timeline reaches the range between 0 and 50 milliseconds (almost impossible to hit 1 specific point), the timeline will stop at 0.  Also, the clearInterval will be fired to stop the loop.
    In the mouseout section, put this...
    sym.play();
    clearInterval(myVar);
    It start the clock again, and it also clears the loop in case you mouseout before you reach the range.
    Make sure that myVar is a global variable so you can clear it from the mouseout section.
    Repeat this for each point on the clock.  To avoid potential conflicts, you may want to use my12, my1, my2, etc. instead of myVar.  I put the milliseconds at the top that you would use as the beginning of the range.  50 milliseconds should be enough to catch it.  So, for 5 o' clock, you would make your range between 1250 and 1300.
    Let me know if you have any questions.  Thanks!
    Fred

Maybe you are looking for

  • Authroisation group in posting periods

    Dear Sapians, Kindly help me in this issue I have an authorisation group in open and closed posting periods(OB52), so that i am maintaining posting periods in INterval 1 as from 09 to 09 which is applicable for  authorisation grouo users. in inerval

  • SAP query HR

    Hi All I am trying to fetch records for wage type range between 8100 to 8214 for a particular finacial period . I have written this provide statement. e.g say a emp A which has 3 wage types 8110, 8150 , 8214 which are valid for the current period. bu

  • Set Up stock transfer order between storage location

    Hi, We are already using Inter company Stock transfer order. Now we have found that it is possible to set up Inter company stock transfer order between two storage location. Can i have some configuration steps. I have tried it but not working. Thanks

  • Refresh Workbook 7.0

    Hi, I have a workbook which was working fine earlier. Today I changed the underlying query by adding a new characteristic and its attributes. Since then the query does not reflect the new fields in the workbook. When executed in the query, it is work

  • How can I delete updates ready to install?

    I regularly download software outside of the Mac App Store.  I now have an item "Angry Birds" available as an update in my App Store list.  I don't have Angry Birds.  I've never played Angry Birds (would you believe).  I've never downloaded Angry Bir