Dynamic expression in interface

Hi All
Could someone share a way how to create dynamic expression in ODI interface. Eg. I have metadata and want to build case expression on its basis and use it in interface.
I have tried several possibilities:
1) Use Java program in mapping expression.
But during interface steps creation getJDBCConnection() method returns null for both SRC and DEST.
Is there is a way how to connect to database?
2) Generate expression in procedure and use it in interface
Is there is a way how to pass string from procedure to interface?
3) Use variable to generate expression
Pure SQL is not enough to generate my expression, I need cycles, ifs etc.
4) Use special IKM which replace some substitution symbols with generated expression.
Well if there is no other choise I'll pick this up but don't want to have additional special KM.
Could someone propose other solution or workaround for listed?
Many thanks in advance!
Oleg Ivanov

Dev -
I followed this thread and thought I'll try it in my end. Did the following.
1)Created a procedure and pasted your code (changed the table name to mine)
2)Created an interface and connected my source and target. In one of the target columns I put <@=result@>
3)created a package and brought procedure and interface.
When I executed the procedure ran successfully but failed at the interface level. I am getting the following error message.
17008 : null : java.sql.SQLException: Closed Connection
java.sql.SQLException: Closed Connection
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
     at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:753)
     at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:670)
     at com.sunopsis.sql.SnpsQuery.a(SnpsQuery.java)
     at com.sunopsis.sql.SnpsQuery.a(SnpsQuery.java)
     at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
     at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
     at com.sunopsis.dwg.cmd.e.j(e.java)
     at com.sunopsis.dwg.cmd.h.z(h.java)
     at com.sunopsis.dwg.cmd.e.run(e.java)
     at java.lang.Thread.run(Unknown Source)

Similar Messages

  • Follow-up Dynamic expression in interface

    I created this thread so I can give credits to anyone helps me on this.
    I tried to follow the following thread and got some errors.
    Dynamic expression in interface
    When I execute the interface alone with out Java procedure(<@=result@>) its working.
    In the package the first step is Java procedure. The second step is the interface. When I execute the package its failing at the interface level even if I don't call the procedure result in the interface. Any idea.
    Dev - Yes I am using the same context
    -app

    When I right click and execute its working without the Java Procedure result in the interface.
    When I execute as a package I am getting same error message with or with out the procedure variable in the interface at the step "Insert flow into I$ table"
    Following is the command from the execution tab where its failing.
    insert into STAGING.I$_DYNAMIC_TABLE_1
         SRC_TAB_COLUMN,
         SRC_TAB_COLUMN_VALUE,
         PRODUCT_NAME,
         PRODUCT_NAME_1
    select
         DYNAMIC_TABLE.SRC_TAB_COLUMN,
         DYNAMIC_TABLE.SRC_TAB_COLUMN_VALUE,
         DYNAMIC_TABLE.PRODUCT_NAME,
         <@=result@>
    from      STAGING.DYNAMIC_TABLE DYNAMIC_TABLE
    where     
         (1=1)

  • How to use the Dynamic Expression in BRFplus

    Hi Experts
                   I am new to BRFplus. Can you give any document on BRFplus how to use the Dynamic Expression.
    Thankyou
    Venkat

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • Express Ship Interface (XSI)

    I've installed Business Connector and was able to successfully config UPS as an XSI Carrier.  After loading all master data, I can see that all the META data is loaded into transaction VTRC for UPS.  However, I'm not to sure how XSI will assign a carrier specific tracking number for each handling unit.  I've created a number range object call ZTRACKING and clicked the "Request Number Range" button with in VTRC.  However, when I create a delivery, no tracking number is assigned to the HU.  Also, where do you set the service (ex/ UPS Ground, etc.)?  Can someone please explain how XSI works (What calls are made to the carrier and at what time)?
    Thank you,

    Can you help me out in configuring Express Ship Interface .I am very new to it and i guess you have worked on.Please respond ASAP.

  • XSI (Express Shipping Interface)

    I've heard and read many different things about XSI - the express shipping interface - and I have some questions.
    1.  Do we need a carrier manifesting system to use XSI with SAP?   (For example, if we use carrier UPS, do we need a Worldship system? If we use carrier Fedex, do we need a Fedex server? )
    2.  XSI is an Interface, it's in the name - what does XSI interface <u><b>with</b></u>?
    3.  Is Fedex really available through XSI?  Fedex doesn't promote XSI like UPS does. Is other middleware required to ship Fedex parcels through XSI?  (I've read several different answers on this, on these forums.)
    4.  How big a role do IDOCs play in XSI ?   (Can a tracking number be assigned real-time, or is IDOC-time as fast as it gets?   Does any printing happen through IDOCs?  Does all printing happen through SAP handling-unit outputs?)
    5.  What is SAP's future direction on express shipping? (Will XSI be continued or expanded?  Will express shipping be handled through xCarrier in the future?)
    6.  Could someone walk me through the process?  1. create a HU, 2. pack the HU, then what?  How does the XSI interface assign the tracking number?   How does the label print?  When/how is the tracking number updated in the SAP delivery/parcel tracking?  When/how are electronic/end-of-day transactions sent to the carrier?
    7. Is there any way when using XSI to enable an interface to a scale, to automatically receive the package weight from the device?
    8.  Printing and barcodes - what are XSI restrictions?   Are SSCC-18 barcodes supported?  What about RFID ?
    Thanks much for your help,
    Maureen Farrell    (<i>I do have XSI technical documentation.zip</i>)

    Visited another pharma company and heard these answers -
    XSI has no functionality without a parcel application to interface <u>with</u> .  XSI doesn't assign tracking numbers or service levels. 
    Through use of the XSI interface, tracking numbers and package status can be made visible in the SAP delivery.    
    If you use only one carrier, or an XSI-enabled multi-carrier system, you'll need one XSI interface.  More than one carrier, more than one interface.
    Next year SAP may possibly introduce xCarrier, but schedule/features/relationship to XSI) are not clear to me.
    If anyone has heard differently, I would appreciate hearing about it.

  • Dynamic Expression

    Hello, My name is Alejandro Arango
    My problem is that i want to make expression dynamic, with that i mean the following:
    I want to be able to change an expression in a assign Statement from concat("var1") to concat("var2") and the expression is obtained from a service so the message in the assign can be changed dynamically without having to recompile and redeploy the BPEL process. The idea is to separte the message template from the bpel process.
    Thx BPEL Team

    Hey Clemens thanks for the reply and also i hope you had an esplendid vacation on Croatia. Back to the topic.
    The need for Dynamic Expression is due for many factors
    - Bug or a Behavior in Oracle BPEL Designer (JDeveloper) that constantly reformat the bpel process file so it always clears the line feeds and carrier returns making almost imposible to mantain the messages inside the bpel process (messages for notification pourposes).
    - Separate the message template from the process, so the message can be updated without having to compile again the bpel proceess for the simple reason to change a simple word in the message (Like Apache Velocity, where u have a template for creating dynamic messages)
    I know that this is more like a feature request rather than a simple or need bug fix.
    Also i want to know if it is possible to implement a java class that can obtain the bpel process variables outside the scope of the java:exec part. Look the example for more clarification:
    XYZprocess.bpel
    <process name="XYZprocess"
    <bpelx:exec name="getVariableData" language="Java" version="1.4">
    <![CDATA[
    // This will create a string based on the template given in the file
    String data = Template.generateMessageFromFile("template.txt", this);
    ]]>
    <process/>
    Template.java
    Class Template
    public static String generateMessageFromFile(String file, BPELXExecLet process)
    Element element1 = (Element) process.getVariableData("var1");
    Element element2 = (Element) process.getVariableData("var2");
    return element1.toString() + element2.toString() ;
    The idea is to fill the element1 and element2 variable with the variable of the bpel process. One dificult is that the class of the bpel process (BPELXExecLet) all the API methods are porotected so it can be only executed inside the bpelx:exec tag and not outside of this scope.
    Thanks You.

  • Dynamic expression evaluater

    I have a dynamic expression of this sort:
    { (( A || B ) && ( C || D )) || E }
    where A,B,C,D,E...(and so on) are boolean variables and the operators between them keep changing.
    How can i do this through some methods?

    If the expression is valid java syntax, then consider writing a piece of code that writes a piece of java with a method containing your expression, and where the letters in the expressions are local variables.
    Then invoke the compiler on the generated code using Runtime.exec, load the class and use it.
    How fast is this process you might ask? The slowest I have seen was one and a half second on a 550 MHz PIII W2K PC, the fastest was down around 0.01 second, on a recent Athlon with SCSI disks and Linux.
    Of course as soon as the class is loaded it is a method call like any other one, so if you want to invoke the expression many times with different values the runtime cost is only the cost of as many method calls, you don't have to regenerate the java again until you change the expression.
    You can trade simplicity of implementation for load time speed by generating the class file directly without using java source code as an interim format. O'Reilly has a book on how to write "assembler" for the JVM that explains how to do this. You won't be touching the disk system at all, but will be writing the bytes of a class definition directly to the ClassLoader.defineClass method

  • Can you call an express VI interface when running LabVIEW code

    I want to use an Express VI edit interface, in my program, so that I don't have to recreate the interface. Is it possible to call that VI to show its front panel in Express VI mode

    Yes but once you convert to a real vi, they look nothing like the express VI interface. I actually want to use the "Configure Mask and Limit" functinality inside of my code. If I convert it to a VI, then the interface has completely changed, and I need to recreate the Vi to get a interface that is similiar to the Mask and Limit Express VI configuration screen.

  • Dynamic virtual tunnel interface on 2821

    I tried to configure a dynamic virtual tunnel interface on a Cisco 2821 with release 12.4(9)T1 advanced ip services, aiming to terminate VPN client ipsec tunnels on it.
    The feature is supported by this software release. Documentation says:
    - enter configuration
    - configure a virtual-template interface
    - type "tunnel mode <mode>"
    but the router does not accept this command.
    Any hint?
    Thank you in advance.
    Denis

    Try:
    just have to take a look at the concentrator's configuration.
    http://www.cisco.com/en/US/products/hw/vpndevc/ps2284/products_configuration_example09186a00801ae24c.shtml
    and this one is an example with routers
    http://www.cisco.com/en/US/tech/tk583/tk372/technologies_configuration_example09186a0080143b0a.shtml

  • Dynamically change embedded interface view in window

    I have a Maincomponent M which embedds in its Mainwindow an interface view V_L from a component definition interface cid L. CID L handles the layout with several views and has two at runtime chosen variants (= cid_L-implementating components ) L1 and L2.
    now my wd-application starts e.g. with layout L1 and I want to switch at runtime via a button or an event to L2. how can I achieve this?
    Because M embedds in its window V_L (which can be filled by L1 or L2) I tried to delete the component in the usage of L1 and create the new component for showing L2.
    but this doesn´t work. should I change some navigation links dynamically? because I thought when I create component L2 the interfaceview V_L is filled and I it´s automatically shown in its higher-ranking Mainwindow from M which embedds V_L.

    Hi Thorsten.
    Is your scenarion as follows.
    You define an outbound plug in your main (e.g. 'OUT') at design time.
    Then you start the application and you create a dynmic navigation using OUT
    to L1 and embedd L1 in M this way.
    Then you click a button and create again a dynamic navigation using OUT as outbound to L2 and embedd L2 in M?
    If so you create 2 navigations which will be triggered when you fire OUT.
    You can test this by setting the break point on the fire method. Somehow you will come to a point where you will see a table which stores the navigations and should contain 2.
    I have a table with authorisation which contains all necessary data for the navigation to a corresponding component. I use the authoridation ID as name for the outbound which have to be created dynamically. And I use a Hashtable to store the value. This is of the type CL_C2S_SAPI_HASHTABLE. I create the object as attribute in view controller. Then each time a link is clicked I check whether the hashtable already contains a value for this authorisation. If not I call
    prepare_dynamic_navigation and use the ID as outbound. Afterwards I store it in th hashtable.
    lv_outplug = wd_this->outbound_plugs->getvalue( lv_auth ).
    *   the navigation to the specified auth is performed
    *   for the first time and have to be created.
        if lv_outplug is initial.
          lv_outplug = lv_auth.
          try.
              l_view_controller_api->PREPARE_DYNAMIC_NAVIGATION(
                  source_window_name          = 'W_MAIN'
                  source_vusage_name          = 'V_MAIN_USAGE_1'
                  source_plug_name            = lv_outplug
                  target_component_name       = lv_comp
                  target_component_usage      = 'USED_COMPONENT'
                  target_view_name            = 'W_MAIN'
                  target_plug_name            = lv_plug
                  target_embedding_position   = 'V_MAIN/UI_COMP_CONTAINER' ).
    *         save outbound_plug for later usage.
              wd_this->outbound_plugs->setvalue(
               exporting
                 name = lv_auth
                 value = lv_outplug
            catch cx_wd_runtime_repository into lr_exception.
              data s type string.
              s = lr_exception->get_text( ).
              raise exception type cx_wdr_rt_exception.
          endtry.
        endif.
        l_view_controller_api->fire_plug(
         exporting
           plug_name = lv_outplug
    Hope this helps.
    Cheers,
    Sascha

  • Using sql expressions in interfaces

    Hi All,
    I have created an interface that works very fine when used with constants.
    But when i am using a sql case expression for populating a target column, the target column value is updated as null.
    The expression that i have written is:
    CASE WHEN (TEMP.CTRY_CODE = 'A012' ) THEN 'NEWCASTLE' ELSE 'GATESHEAD' END
    This code works fine in sql developer but when written in odi intergrator, it is failing.
    Please help.
    Thanks.

    Can use maybe a DECODE:
    DECODE(DATA,'ASXXX','NEWCASTLE','SOMETHING')
    Allcxz ...

  • Dynamic Expression Evaluation in AS 3

    Hi all,
    AS 2 had the eval() function, but it was removed in AS 3. Does anyone know of a way to dynamically evaluate an expression in AS 3+?
    I'm trying to impliment a feature that allows a user to define the behavior of a component based on the evaluation of an expression (composed of  conditional, logical and grouping operators which operate on constants and remote data sources).
    Any ideas how one might do that using the current Flex toolset and or 3rd party libs?
    Thanks in advance,
    Carl
    PS - Anyone ever use this libarary:
    http://code.google.com/p/flexeval/
    Doesn't seem like there is much activity there.

    U can use it like any other netui tag.
    Kunal Mittal

  • Anonymous class instantiation expression with interface implementation??

    Is it possible to create an inline anonymous class instatiation expression that can implements an interface?
    For example:
    Frame myFrame = new Frame() implements WindowListner {
         public void WindowOpened(WindowEvent  e) {}
             +other interface methods....+
    }Apparently compiler doesn't like this code:(
    I know that I can create an extra named class with the interface, then instantiate it instead. But this is not what I want.
    (By the way, if someone wants to know why I want to do this, I say I think this may make my code simpler or look better, that's all:) )

    abstract class ListenerFrame extends Frame implements WindowListener {} This look pretty neat:)
    I guess I can rewrite my code then:
    abstract class FrameWithListener extends Frame
             implements WindowListener{}      //local class
    Frame myFrame = new FrameWithListener {
            public void WindowOpened {}
               blah, blah...
    }Not sure I can use abstarct class as local class, but otherwise I'll use it as a class member or some sort..
    Thank you for the reply
    Edited by: JavaToTavaL on Nov 27, 2009 4:04 AM
    Edited by: JavaToTavaL on Nov 27, 2009 4:04 AM

  • How to give dynamically mapping in interface

    Hi all,
    I have requirement for this requirement i am thinking various scenarios,
    could please tell me is there any way to we can give source,target data stores and mapping dynamically(execution time) to the interfaces ? if it is possible then i can re use job again and again ?
    please give your solutions for this post
    Thanks,
    Surya.

    Please let me know if I miss the mark here.
    If you are trying to build the 150 interfaces without spending the time to do so manually, use the ODI SDK. Check out David Allan's blog post for examples here https://blogs.oracle.com/warehousebuilder/entry/odi_11g_interface_builder. You can build your interfaces once - without need for dynamic mapping at execution time.
    I'm pretty sure there is no good way in ODI "out of the box" to dynamically map columns at execution time, but I imagine you could use the ODI SDK to write a Java program that does so. Then, use the Open Tools feature in ODI to run the Java program within your ODI processes. I'm not sure the value of this, but I do not have a full understanding of your requirement.
    I hope this helps. Enjoy!
    Michael R.

  • Dynamic Detection of Interface Addition

    How can the addition of new interface be detected on the fly (dynamically). The information of new interface IP Address, its properties are needed.

    and some other examples :
    http://apex.oracle.com/pls/apex/f?p=44785:24:8147367699973:::24:P24_CONTENT_ID,P24_PREV_PAGE:6065,24
    How to Use an Oracle Service Bus Customization File
    http://www.insemble.com/oracleservicebus-deployment.html
    customization won't be applied when you rightmouseclick in eclipse and deploy it to your server.
    so in that case you will need to use some ant script to be able to both deploy your sbconfig.jar and apply the customization file based on the enviroment you're deploying to.
    so you create different customization files for every environment (or use 1 placeholder script and use maven/ant to find/replace placeholder values) and apply those, this will need to be done from some custom script you need to create yourself.

Maybe you are looking for