Implementation of the custom function

Hello

I use OPA version 10.4. Could someone please give me an example implementation of end-to-end custom in OPA function simple (including the code of JAVA/.NET, extension.xml and all the dll/pots to be included in the modules project). Thanks in advance.

Kind regards

Mounia

You can find all this in the "Oracle policy Automation for Java" or "Oracle policy Automation for .NET ' zip downloaded from the cloud of delivery for software (OSDC) Oracle or Oracle Technology Network (OTN) web sites (http://www.oracle.com/technetwork/apps-tech/policy-automation/downloads/index.html).

The relevant issues in the developer of the OPA's Guide are

Tags: Oracle Applications

Similar Questions

  • Error-could not create an instance of the custom function

    Hello

    I'm trying to implement an extension of the simple custom function OPM 10.2. Here is the code:
    package com.oracle.determinations.examples;

    import com.oracle.determinations.engine.CustomFunction;
    import com.oracle.determinations.engine.EntityInstance;
    import java.util.Random;

    SerializableAttribute public class RandomFunction extends CustomFunction {}
    public Object evaluate (EntityInstance entityInstance, Object [] items) {}

    If (items [0] == null) {}
    return 0;
    } else {}
    -Code to generate a random number
    }
    }
    }

    The xml extension is the following:
    -< extension >
    -< features >
    -name of the function = "RandomFunction" type return = 'number' >
    < name arg = "enterednumber" type = "number" / >
    < Manager platform = 'java' class = "com.oracle.determinations.examples.RandomFunction" / > "
    < Manager platform = "dotnet" class = "com.oracle.determinations.examples.RandomFunction" / > "
    < / feature >
    < / functions >
    < / extension >

    I placed the code extension xml under the Development\Extensions\Examples folder and the jar file named "JavaLibrary1" containing only the above mentioned code is under Development\Extensions\Examples\lib.

    The rule that calls the custom function is as follows:
    the random number = RandomFunction (figure)

    I get the error "Unable to create year instance of com.oracle.determinations.examples.RandomFunction" when I debug the project.

    Please tell me how to solve this problem.

    Thank you
    JAS

    Received your email and found the problem. The problem is the custom .NET, function definition is invalid, and must be (or must be removed).

    When you are debugging with screens, it uses a combination of dosages of Web for Java and the host of the debugger, which takes place in .NET. Although the modules runs into reality in the determinations of web, the debugger needs always to be able to open the modules locally for purposes of reflection (eg. obtaining a list of all possible attributes and the type of data). Even if the modules is not actually executed in .NET, it must therefore be loadable, which means that if you do not provide a custom function .NET Manager, it must be valid. This:

    >

    >

    Does not appoint a .NET class, that's why the debugger complains. Delete this line (only the Manager of java leaving intact) and your example works.

    >
    You also mentioned that the random function is not a good choice, that means that the engine of dosage will not work with the random function?
    >

    Yes, a random function will not work because the engine must be (and is optimized to be) deterministic - same entry should always produce the same result.

    It is difficult to imagine what you can in theory of random numbers for (otherwise), but if you don't need, you may either) front of seeds new sessions with random inputs as attributes of basic (requires customization of your host application, for example, web determinations) or b) generate the random number from other values in your modules such as the customer, name and date of birth. This should ensure that the same combination of inputs will result in the same number of 'random' each time.

  • When the Manager of the custom function in a configuration of link file gets error?

    The question she get error when the Manager of the custom function in a config file in the plan to include the link.
    When she went to join the custom function Manager in the debugger, everything is OK.

    <? XML version = "1.0" encoding = "utf-8"? >
    < configuration >
    < custom function platform = "DotNet".
    library-path="G:\RB1\Include\CustomFunctions.dll".
    Class="Viking.CustomFunctions.CustomFunctions"/ >
    < / configuration >

    THS, category and path is correct.
    So is there any problem for < custom function platform = "DotNet"?

    OPA version 10.2

    OPA error message translated from the Germany into English: Exception has been thrown by the target of a call

    In general, you should not give the full path of the custom function, it should be rather in relation to the project include file.

    for example:

    and then make sure that the CustomFunctions.dll file is copied into the project folder until the project is built.

    In addition, if you use 10.2 for a new project, the mechanism that you use is now replaced. An extension of the custom function is the new thing, and it will look much nicer when it is used in the rules. Refer to the section 'Write a Custom function Extension' in aid of developer for more information.

  • OPM does not have the custom function Manager

    1. I have manually created an 'include' file in the 'Development' folder and add it to the project in the OPM.
    2. I put the program manager JAR in the "include" folder
    3. I created "" MyProject - config.xml "and place it in the"include"folder."
    4 OPM charge MyProject - config.XML when I generate the project. I found this by making the XML invalid, and OPM has complained about this.
    5. When you debug the project, OPM says:
    A custom function "isValidSPId" has been called and there is no custom function Manager. Choose a DLL and a class to provide a custom functions for this one.


    And I chose "Java" as a platform for the project properties.

    5. When you debug the project, OPM says:
    A custom function "isValidSPId" has been called and there is no custom function Manager. Choose a DLL and a class to provide a custom functions for this one.

    The debugger expects a function custom .NET, not a custom Java function

    And I chose "Java" as a platform for the project properties.

    I'm not sure what you mean - there is no such thing as a platform of modules - all rulebases are platform independent. Do you mean the setting of "Regression Tester - platform properties? If so, these effects only the platform used to run regression tests - not for compiling, debugging, or running with or without screens.

  • Custom schema and the custom functions, menus and responsibilities

    Hi all

    My company has developed an integration of the EBS activate the third-party software create elements and other objects. We use a JDBC connector and call the underlying pl/sql API (such as EGO_ITEM_PUB. PROCESS_ITEM) Oracle. We have added some features, menus and responsibilities to our EBS 12.1.1 installation in order to provide a mechanism for access control for our JDBC integration because it connects directly to a db schema. We call FND_FUNCTION. TEST to see if the user connected / responsibility has the function it wants to call which are assigned to him. We also plan to use a custom schema, so that we don't have to plug directly into the apps schema, because we believe that our customer will not do. What do you think?

    I have planed to use FNDLOAD to download all the function menus and responsibilities to provide a script for our client, so that they can download simply all objects (menus,...).

    Now my issues are:

    Should they download these menus, functions and responsibilities in our custom schema or in the apps schema?

    The menus and responsibilities always defined in the apps schema?

    In the schema are defined if they are created in the GUI (oracle forms)?



    Thank you
    Konrad

    I would say FNDLOAD takes care to put all objects in the schema corresponding to FND/APPLSYS, right?

    Fix.

    What about subsidies for the apps schema? Don't the apps schema now on the new features, menus and responsibilities after the DOWNLOAD of FNDLOAD process?

    What grants you are talking about? The apps schema will certainly know about these new functions/menus/responsibilities (if not, you will not be able to see or access it from the application) - most of the data that is stored in the APPLSYS schema is accessible by the APPS schema.

    Thank you
    Hussein

  • Implementation of the custom permission JSF pages login problem

    ADF 11 g

    Hello
    I created an application of small adf secured using Basic authentication formed and implemented a login JSF custom page as described in the developer's guide the merger and 11 g JDEv manual.

    The only difference being that my homepage is protected, which means that the login page is called before you reach the home page, and there is no link connection on the home page.

    The home page has a button calling a stubborn workflow.

    If I use the original login page, login.html, I log on, access the home page and the button calls the stubborn properly workflow.
    However, if I use the JSF login page I login, access the home page but the button does not call the bounded flow taks - there is no error no displayed, its as if the button is more "connected".

    Here's the doLogin code in the bean connection
        public String doLogin() {
            byte[] pw = _password.getBytes();
            FacesContext ctx = FacesContext.getCurrentInstance();
            HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();
            CallbackHandler handler = new SimpleCallbackHandler(_username, pw);
            try {
                 Subject mySubject = Authentication.login(handler);
                 ServletAuthentication.runAs(mySubject, request);
                 //String loginUrl = "/adfAuthentication?success_url=/faces" +ctx.getViewRoot().getViewId();
                 String loginUrl = "/adfAuthentication?success_url=/faces/main.jspx" ;        
                 HttpServletResponse response =
                 (HttpServletResponse)ctx.getExternalContext().getResponse();
                 sendForward(request, response, loginUrl);
                 } catch (FailedLoginException fle) {
                 FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                                     "Incorrect Username or Password",
                                                     "An incorrect Username or Password" + " was specified");
                 ctx.addMessage(null, msg);
                } catch (LoginException le) {
                    reportUnexpectedLoginError("LoginException", le);
                }
             return null;
         }    
    I have the impression that I am authenticated but not authorized.
    Can someone explain what is happening?

    Concerning
    Paul

    Hello

    Try changing

    String loginUrl = "/ adfAuthentication?success_url=/faces/main.jspx";

    TO

    LoginUrl = string ' / adfAuthentication? "success_url = / face/hand;

    (without the .jspx at the end).

    Pedja

  • How to use the custom function to put in shape of line chart Axes?

    Hello...

    I use a graphic line which the axis value is vary from 0 to 50000. It is a number which he gets from its dataProvider. I want to format it and show it as

    $50,000

    $40,000

    $30,000

    $20,000

    $10,000

    $0

    Instead of

    50000

    40000

    30000

    20000

    10000

    0

    Here is my code linechart:

    < mx:LineChart id = "revTimeLineChart".
    Width = "100%" height = "100%".
    showDataTips = "true" >

    < mx:horizontalAxis >
    < mx:CategoryAxis id = "lcCatAxis" categoryField = "name" / >
    < / mx:horizontalAxis >

    < mx:series >
    < mx:LineSeries id = "ls" yField = "income" displayName = "Recipes" showDataEffect = "{slideIn}" / > (yField, this is what I want to do a format...)

    < / mx:series >

    < / mx:LineChart >

    Can you please let me know how can this be achieved?

    See you soon!

    Deepak

    Hello

    you need a labelFunction in AxisRenderer.

    See the example in the documentation

    http://livedocs.Adobe.com/Flex/3/langref/MX/charts/AxisRenderer.html#includeExamplesSummar y

  • Print questions after the custom section changes using a printed code

    Hello

    We have problems with the order of the custom section. Please find below bottom

    1. we have a custom code to print sections customized specification associated with the material specifications

    2 this custom code developed 2.5 years ago and absolutely perfect job

    3. this custom code actually built XML sections customized the associated specification which is transformed into PDF using XSLT by extending the print features.

    Recently, we changed the order custom sections appear in hardware specifications. Once the order gets modified with the help of Admin-> Data-> custom section order Custom. New order got reflected in all the technical features without any problem

    But the custom sections do not print in the same order

    When we studied, we found the following

    1. printing order is fine when using the default print template provided by oracle

    2. printing order is not very well when we use our custom print template that uses our custom code developed 2.5 years back

    When we have investigated further, we discovered that any new record is created once the order has changed to print very well in the same order using our custom code

    But the old specifications that were created before the implementation of the custom section control do not print in the same order

    Debug us the solution, with the old card and discovered that code is return data in the old order and not in the order indicated in the specification

    We tried all the properties we could and noting works as expected for the old specifications and new specifications get the order appropriate under the new defined order

    None of the sub properties get the data in the correct order in the old specifications

    ICollection customSections = ingSpec.ExtendedAttributeSections.OrderedModifiableValues;

    ICollection customSections = ingSpec.ExtendedAttributeSections.OrderedValues;

    ICollection customSections = ingSpec.ExtendedAttributeSections.ModifiableValues;

    Can you please let us know if this is a bug in the product? or is it possible that we can do our custom code works for the old specifications?

    Can you also let us know which table stores information about order of custom hardware specifications section?

    Thank you

    Mani

    Sounds like the same issue post to https://community.oracle.com/thread/3804143.

    Thank you

    Pourbaix

  • Jar of custom function

    I made a custom for the web service call function.
    Now, the custom function is wrapped in a jar, which in turn needs external jar for his reference as "jaxrpc - api .jar '.

    During the execution of the project, it generates an error of "1 [http - 127.0.0.1 - 9000-Processor4] ERROR com.oracle.determinations.web.platform.servlet.WebDeterminationsServletUtility - java.lang.NoClassDefFoundError: javax/xml/rpc/Service»

    Where should I copy these additional pots, while they are taken over everything by deploying the application?

    Thank you!

    You have specified the path to the library (which is the classpath in Java terminology) for an inference listener, not a custom function. What you need is:

    "library path" acts like a classpath in any other java environment. The list of all the pots you use, make sure that they are available in the zip of modules by copying in the project include directory, and you should be set.

    Published by: Stephen French on 25 March 2012 18:08

  • Custom function test

    Hi all

    I am trying to run the custom test function, the "CapitalizeFunction".


    Apart from placing the lib, example.jar, the extension.xml file in the "Extensions" folder - is that what I need to do? "

    My rule is

    {code}
    the test is done if
    -the uppercase name is known

    the name uppercase = CapitalizeFunction (the name in lowercase)
    {code}


    I get the error message is: "error after 'the name uppercase =', one finds:"CapitalizeFunction (lower case name)".» Constant variable, expression expected.


    Hope that helps.

    Published by: user9015745 on August 25, 2011 06:47

    Sorry the error message is: the local name for elements or attributes cannot be null or an empty string

    Custom function are only supported for the OPA v10.2 or later. I watched the provided project and the extension of the custom function was written against OPA v10.3 yet the project is indeed v10.1 OPM, so he won't get the extension.

    Recompile your custom function to use v10.1 OPA and to change the rule to be:

    the test is complete if
        the uppercase name is known
    
    the uppercase name = CallCustomFunction("CapitalizeFunction", "LOWER")
    

    where "BELOW" is the public name of the attribute 'name in lowercase.

  • Get the custom IdocScript function contributor data file

    Hello

    I have a requirement to retrieve a number of elements of a given contributor data file. The problem is, I don't know how to retrieve the XML code inside a custom component of IdocScript.

    Given the content of the data contributor file ID, is there an easy way to get the XML file, or do I need to use with a service call?

    Thank you!

    If it's a Java component, why not just get the direct file system XML file? The demand function, you could have a file path in the binder... If not, use the IdcFileDescriptor object:

    https://groups.Yahoo.com/neo/groups/intradoc_users/conversations/topics/25937

  • Problem in the implementation of the function forgotPassword

    Hello

    I need to implement the forgotPassword function in my jsp.

    I followed all of these links: -.

    https://forums.Oracle.com/message/10958330

    Handling forgotten passwords

    I don't get the emails.

    In the logs there is no newspaper of EmailService start-up. Y at - it configurations I need to take care of... ??

    Thank you

    Aurélien

    Hi Grando,

    I was able to solve the problem.

    There was error of authentication in the newspapers, so I contacted the server administrator and now the email is sent.

    Thank you

  • Why is there a limit to the number of Boolean parameters in a custom function?

    We have a custom function which "flattens" four time values of the text in a single time value.

    We want to do the same thing with the Boolean time values.

    However, OPM throws an error when it reads the metadata for the function in extensions.xml.  It shows all the Boolean parameters must be the last.  We can not put all changed because there is more than one.

    This is error code W00001-OPM OPM.

    Any ideas on how I can work around this limitation?

    Excerpt from the OPA developer assistance:

    Only a Boolean parameter can be passed to a function, and it must be the last parameter.  This is due to a limitation in the compiler of the rule.  Any number of other parameters may however be present.

    If you want to pass multiple Boolean values, create a temporary text variable / document values "True" / "False" using the table of rules.

  • Custom function giving the compile error

    Hi all

    I created a custom function to get the current timestamp. The following java code:

    package com.oracle.determinations.examples;

    import com.oracle.determinations.engine.CustomFunction;

    import com.oracle.determinations.engine.EntityInstance;

    Import Java.util;

    java.text import. *;

    SerializableAttribute public class extends CustomFunction {CurrentTimeStamp

    public Object evaluate (EntityInstance entityInstance, Object [] items) {}

    Date dNow = new Date ();

    SimpleDateFormat ft =

    new SimpleDateFormat ("YYYY/MM/DD HH: mm:");

    / * System.out.println (ft.format (dNow)); * /

    Return ft.format (dNow);

    }

    }

    My Extension.xml is as below:

    <? XML version = "1.0" encoding = "utf-8"? >

    < extension >

    < functions >

    < name of the function = back "CurrentTimeStamp" type = "text" >

    < name arg = "input name" type = "text" / >

    < Manager platform = 'java' class="com.oracle.determinations.examples.CurrentTimeStamp"/ >

    < / feature >

    < / functions >

    < / extension >

    The extension.xml is placed under the following path:

    Development/Extension/CurrentTimeStamp/extension.xml

    The JAR file is located under the following path:

    Development/Extension/CurrentTimeStamp/lib/CurrentTimeStamp.jar (the jar file includes the com.oracle.determination.example folder structure)

    When I am using CurrentTimeStamp() in the basis of rules, is throw say compilation error:

    "Error after the CurrentTimeStamp text (' fount text: ' ')'. Expected variable value or constant OPA - E00111

    Can you please help me where I am doing wrong and therefore not identify the function?

    Thank you

    KK

    Version of the class 51 is Java 7, this suggests that you have compiled your classes in the Java JDK 7, but try to load them into an earlier version of Java (I guess Java 6 since this is the first version of Java that runs under Apache Tomcat 7).

    You can specify the JDK compiler to create classes that target Java 6, which should then work - see "javac - Java programming language compiler.

  • Is it possible to use formulas (for example 'if' or VLOOKUP functions) in the "custom calculation Script?

    I'm working on a PDF form fill converted from MS excel. It is for others to use who do not have MS excel required to use my spreadsheet.

    1. I would like to know, how can we have complex formulas being the custom tab calculation script calculate under properties in a menu of cell?

    2. where can I find it that the formulas will work in the calculation script custom as well as the format of these formulas work properly (tutorials would help)?

    I tried to write an 'if' function but I get and error so I guess that is functions do not work in the script, or there is a different format of spreadsheet standard formats.

    Bruce

    .

    In this case the loop would be:

    for (var i = 0; i)< 8;="" i="" +="1)">

    sum += + getField("Total."_+_i).value;

    }

    So initially, the counter i is zero, so the domain name used with the getField method is:

    'Total': + 0, which results in the string "Total.0". At each iteration, the variable i is incremented by 1, so the following field names are the following:

    "Total.1".

    "Total.2".

    'Total.3 '.

    'Total.4 '.

    'Total.5 '.

    'Total.6 '.

    "World.7.

    The script gets the value of each field, it converts numbers and adds the number to the cumulation.

Maybe you are looking for

  • 'THotkey' recovery has no code error 0 x 00031402 0 x 00000002 message.

    Recently, my Toshiba F20 (OS Windows XP) starts, reached the office and then I can't go any further. The cursor does not double click all the icons - I can not enter START or use ctrl + alt + delete. basically unable to use the computer. I get the me

  • How can I stop workpad opning automaticley

    How can I stop automatickley opening button work

  • sd card problem help

    You can get photos off a sd card which is no longer registered as work. It took 4 GB of photos, said it was full, has seen all the photos, he has released has got at home, it won't register in my camera or a computer.  It just says: this sd card cann

  • Java is unable to install the update, missing file msi

    I tried to install Java 6 Update 31 but you first need to uninstall my previous version. I am currently using Java 6 Update 30. If I try to uninstall, reinstall, or update, I get the same error. I get an error saying that it cannot find the file ' jr

  • Influence the movements of the mouse on the search result

    Hello I noticed that when I use the search in the start menu: Start-> 'Query' button-> Enter, the result I get will depend on if I moved my mouse between the seizure of the search query and press ENTER. If I move the mouse the result the research ope