Questions about scripts in ai2

Hello

Two questions about the new install script.

(1) where to find documents on the "object model" which is available for use during the writing of scripts. There the Javadocs available to all classes, getters, setters, etc that can be used?
For example, I want to write a custom rule to detect foreign keys "without columns. For some reason, this error occurs during generation DOF, but I have not found a standard rule of prior design detect these problems before the generation of DDL. So, I'm interested in knowing how to navigate through the object model to create a rule of mine (IE is it a table.getFK (.getColumns ()) use?).

(2) is it possible to use Groovy as a scripting language? If Yes, does anyone have the docs (or even draft notes) on how join as a script engine in the Data Modeler?

Thank you, BP

Hi BP,.

to detect foreign keys "without columns. For some reason, this error occurs during generation DDL

What version did you use to create these cases? There was such a problem in one of the pre-production versions published two years ago.

Meta definitions, you can watch datamodeler\datamodeler\xmlmetadata directory.
In fact, it is preferable to define the rule of index/constraint - you will get a clue that is used to represent the PK, UK, the FK constraints and indexes.
So for your rule, you select index/constraint as object and the next Java scrip will be your rule:
var index;

{if (index.isFK () & {index.getElements () .length == 0)}
fake;
} else {}
true;
}

If you remove index.isFK (control) then the rule will be valid for all PK, UK, the FK constraints and indexes.

For script engines - you can start here - https://scripting.dev.java.net/
I see groovy is supported - http://groovy.codehaus.org/JSR+223+Scripting+with+Groovy
How to install it - you can follow the instructions in the first link above, it's much easier just to copy related jar in the "ext" directory - for groovy I copied "groovy - 1.7.5.jar" (I downloaded 1.7.5 version)
in the "D:\jdk1.6.0_20\jre\lib\ext" directory on my computer. You must restart the Data Modeler - I engine script groovy as a choice in the engine drop-down list box.

You must test how Groovy will return true or false for the Data Modeler - generally ordinary (not library), it is strange that you see in the example. If the library is used then the standard return is used.

Philippe

Tags: Database

Similar Questions

  • Question about scripts in the form under repeatbel objects

    Hello

    I'm working on the creation of a form that has a secondary form that can be repeated as many times as the user wants. There is a button 'Add' that creates an instance of the secondary on the form form, when you click on it.

    The secondary form I have 5 numeric fields say a1 - a5 and 1 field b1 which is the sum of all these 5 fields.

    On the main screen, I have a 2 fields - say t1 and f1.

    The requirement is t1 = f1 + b1 + (instance sous-forme 2 B1) + (sub-form instance 3's b1) + and so on... .depending on as many instances sub-shape there that the user adds.

    I created actions using the Action Builder such as when none of the a1 to a5 fields are out, b1 will be updated with the sum of a1 - a5. At the same time t1 will be updated with the sum of f1 and b1.

    This works very well for 1 instance of the form under. But when click on 'Add' and a second instance of the secondary form is added, then the script does not work as it did for the first instance of the secondary form. So for all instances of the subshape added, when values are added to a1 - a5 and the fields are exist, b1 not updated.

    How can I fix?

    See attached form that I create for clarity.

    "The total number of hours worked this week" are the t1 I was talking about. See how it is updated when values are entered in all areas of the time. It works great with the default instance of the form on T100/strategic/advantage customer information as well. But when I click on the button "Add Customer" to add another instance of the form sub, it does not work as expected.

    Please let me know if it is still is not clear and I can explain the problem.

    Hi Ameeth,

    Please find below the link that has your document.

    https://workspaces.Acrobat.com/?d=OEkwisQ99LXgJ4e9GrCnZg

    Hope it works very well...

    I don't know why you created these functions?

    Let me know if you need any clarification.

    Thank you

    Sofiane

  • A question about script objects

    I placed a script object in my form to control the color of the field and it works very well in Adobe Reader X but not in earlier versions of the reader and not in Acrobat pro 9.

    Can someone tell me what is the problem?

    The script object looks like this:

    form1. #variables [0]. RGA_format - (JavaScript, client)

    function RGA_colorOld()

    xfa.resolveNode("this.ui.#textEdit.border.fill.color").value = '220,220,220';

    function RGA_color()

    xfa.resolveNode("this.ui.#textEdit.border.fill.color").value = "255,255,255";

    And name fields on the docReady event and the event of modification of this script:

    Form1.blanketB.moder.EftNvnMor::docReady - (JavaScript, client)

    RGA_format. RGA_colorOld (the);

    Form1.blanketB.moder.EftNvnMor::change - (JavaScript, client)

    RGA_format. RGA_color (the);

    Kind regards

    Kirstine

    Hi Kirstine,

    When you call the function, you pass through the object as a parameter. However the function in the script object doesn't have a setting to receive this.

    You can probably get through the object as a reference:

    RGA_format.RGA_color(this);
    

    However I prefer to declare a variable first and pass through:

    var fieldObj = this.somExpression; // declare a variable to be passed into the function
    colourControls.fieldGetsFocus(fieldObj); // calls the function "fieldGetsFocus" in the script object "colourControls"
    

    Notice in the example, I have, when you declare the function, I have a 'fieldObj' parameter, to receive the information that is passed through.

    function fieldGetsFocus(fieldObj) // first function
    {
         ...
    }
    

    A small point on the function in the script object. I know that the function is a single line, but I'd rather see this wrapped in braces.

    Finally changing the fill requires access to the properties of the user interface. They are different for each type of object. For example, the script that you have is for a textfield. This does not work on a numericfield.

    I have an example here of a function that does what you are looking for: https://acrobat.com/#d=XGj9UEk4lSbDSoArnQU8dQ. Note how to check what is the object and then resolve the correct ui property. What makes the more reusable must function.

    Hope that helps,

    Niall

    Ensure the dynamics

  • Question about OWA scripts - how much time do need to run or not at all

    Just a question about OWA on Exchange 2010 scripts. I have a site and unique Exchange Server. I noticed that we have a powershell script scheduled in the Task Scheduler running daily that defines all the mailbox OWA strategy. This policy is defined in the EMC access client/organizational Configuration (EMC) tab.

    My question is... If the policy is already configured in the access client/organizational Configuration tab, should this powershell script run at all?  Not all new users get this strategy by default (since we have only one policy OWA) If you enable Outlook Web access on the mailbox of the user in the appearance of the mailbox tab?  My thought is that the powershell script and the calendar was just a postponement of the old Exchange 2003 for strategies for the OWA...

    Thank you.

    Hello

    Your question is beyond the scope of this community.

    I suggest that repost you your Question in Exchange for TechNet Forums.

    https://social.technet.Microsoft.com/forums/Office/en-us/home?category=ExchangeServer

    Or here:

    https://social.technet.Microsoft.com/forums/Exchange/en-us/home?Forum=exchangesvrgeneral

    See you soon.

  • Question about my script

    I have a question about my script and why Im not return desired output. Could someone please help me solve this and also let me know what I was doing wrong, why their working version vs my return empty result. Thanks in advance and have a nice day.

    Mike P.

    First of all, I ran this for a list of all virtual cards ovf all my virtual machines. It comes out OK but gave me too much, I was looking for something a little more specific.

    Get - VM | Get-NetworkAdapter | Select-Object Parent, name, NetworkName, ConnectionState

    the script above has given me all the names of VM, AdapterName, PortGroup name and the connection status of the adapter of the said

    I wanted to filter this down a little more. I was looking for netowrk adapters connected to a specific NetworkName with a ConnectionState connected object. Mainly because I have another script, I want to run after the fact that would make this particular NotConnected and NoStartConnected adapter.

    I thought I could do it with the following script. The script works fine without errors and filter unwanted information. However, my problem is that it does not return what it finds on the screen as the previous script. I'm missing a piece for this script that will give me the output of the screen for each card that meets the criteria. I tried out channelling to a .csv, of course, it was empty as well. I tried a failed in an echo statement after him as well.

    Get - VM | Get-NetworkAdapter | where {$_.NetworkName - eq "Network 1" - and $_.} ConnectioState - eq 'Connected'}

    Thanks again for your help!

    You can better use the operator contains this

    {$_.NetworkName -eq "Network 1" -and "Connected","NoGuestControl","StartConnected" -contains $_.ConnectionState}
    

    It checks if the value property is present in the array of values that you give on the left side

  • HTML (Web), I have a question about the models.

    Hello CC animate developers.

    New features are really good.

    HTML (Web), I have a question about the models.

    <! DOCTYPE html >

    < html >

    < head >

    < meta charset = "UTF-8" >

    < title > $TITLE < /title >

    < meta name = "ad.size" content ="width = $WT, height = $HT" > "

    $CREATEJS_SCRIPTS

    $SCRIPT_START

    var canvas, stage, exportRoot;

    function init() {}

    $CJS_INIT

    }

    $PLAYSOUND

    $SCRIPT_END

    < script type = "text/javascript" >

    "clickTAG" var = "";

    < /script >

    < / head >

    < onload = "init (); the body"style =" background-color: #D4D4D4; " margin: 0px; ">

    < a href = "javascript:window.open (window.clickTag)" >

    < div style = "position: absolute;" cursor: pointer; box-sizing: border-box; border: 1px solid #000000; overflow: hidden; height: $HTpx; Width: $WTpx; Background: rgb (255, 255, 255.0); "> < / div >

    < canvas id = "$CANVAS_ID" width = "$WT" height = "$HT" style = "background-color: $BG" > < / canvas >

    < /a >

    < / body >

    < / html >

    In the example above, the model;

    < Meta name = "ad.siz of" content = "width = $ WTI height = $ HT" > "

    and

    < Div style = "position: absolute;" cursor: pointer; box-sizing: border-box; border: 1px solid # 000000; overflow: hidden; height: $HTpx; Width: $WTpx; Background: rgb (255, 255, 255.0); "> < / div >"

    I use labels. But these tags in the template and import, it gives an error does not occur.

    I think it was a mistake. I want to help in this regard.

    $ HT or Properties $WT , I get an error when I use elsewhere.

    I think I should be able to use anywhere I want.

    The same problem here - I worked around by some DRM models with different values of ad.size, but it's a solution quite short-seight

    Also - you are not able to create the model with transparent background by removing style = "" background-color: $BG ' as it also throws errors - is the only solution that I managed to get updates style = "background-color: $BG; background: none; ", but it's a really bad way of coding things.

    It would be really great to have freedom in changing patterns.

  • A question about external authentication with PHP OCI8 using a portfolio store

    Hello
    SQL> SELECT * FROM v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    SQL> 
    OS: Linux Fedora Core 17 (x86_64)
    PHP Version: 5.4.14
    Apache version (httpd): Apache/2.2.23 (Fedora) 
    I have a question about OCI8 connection to the Oracle server via portfolio, which I understand is a good practice because we do not have to hard code the users password. I'm trying to read pages 117 and 118 of the book The Underground PHP and Oracle manual online to learn how to set up a portfolio. I proceeded by steps as explained in these two pages (except that at the end I connect, as a normal user, not a privileged user) yet, apparently PHP does not detect the user.

    Here's what I write in my script
    $connection = 
                    oci_connect 
                        (
                            "training", 
                            "", 
                            "php_ora_usr", 
                            "AL32UTF8"
                        );
    the training is the name of the user that I use in my PHP scripts to connect to the oracle database and the password is mypassword (is not true, just for the purpose of this thread :)) the code above gives me the following error:)
    Warning: oci_connect(): ORA-01005: null password given; logon denied in /var/www/html/myscript.php on line 91
    
    Fatal error: Connection step: ORA-01005: null password given; logon denied in /var/www/html/myscript.php on line 13
    But if I also provide the password which is,
    $connection = 
                    oci_connect 
                        (
                            "training", 
                            "mypassword", 
                            "php_ora_usr", 
                            "AL32UTF8"
                        );
    Obviously it works, but at the same time, this means that my wallet is not operational.

    So I'll write here, step by step, how I did according to the instructions contained in the pages 117 and 118 of the above mentioned book and I would be grateful if you could kindly tell where I made the mistake (s)

    The following text was performed under my oracle linux (so the dbagroup)

    Step 01:_
    I created and provided the password for the directory of portfolio
    mkstore -wrl /home/oracle/wallet_dir -create
    Step 02:_
    I created an entry for my oracle user that will be used in my PHP scripts to connect to oracle
    user: training
    password: mypassword
    mkstore -wrl "/home/oracle/wallet_dir" -createCredential php_ora_usr training mypassword
    I also checked that the entry was actually created for my user in the portfolio
    $ mkstore -wrl "/home/oracle/wallet_dir" -listCredential
    Oracle Secret Store Tool : Version 11.2.0.1.0 - Production
    Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
    
    Enter wallet password:                
       
    List credential (index: connect_string username)
    1: php_ora_usr training
    $ 
    Step 03:_
    I added the following to my $TNS_ADMIN/tnsnames.ora
    .  .  .
    php_ora_usr = 
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = db02)
        )
      )
    .  .  .
    Step 04_
    I added the following to my $TNS_ADMIN/sqlnet.ora
    # sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    
    ADR_BASE = /u01/app/oracle
    
    WALLET_LOCATION =
        (SOURCE =
            (METHOD = FILE)
            (METHOD_DATA =
                (DIRECTORY = /home/oracle/wallet_dir)
            )
        )
    SQLNET.WALLET_OVERRIDE = TRUE
    SSL_CLIENT_AUTHENTICATION = FALSE
    SSL_VERSION = 0
    _ Step 05
    The TNS_ADMIN environment variable is already set correctly in * / etc/sysconfig/httpd * so I didn't need to do something for this step


    Step 06_
    I gave to access Apache (as root) in the directory of portfolio (in fact, it seems that the user oracle (dba) of linux also has the required privileges to grant this access to the apache)
    # setfacl -m u:apache:rx /home/oracle/wallet_dir
    # setfacl -m u:apache:r /home/oracle/wallet_dir/{cwallet.sso,ewallet.p12}
    Step 07_
    Restart Apache
    # service httpd restart
    Step 08_
    Finally make a test connection using the connection string php_ora_usr which the entry was created earlier. And the test was not successful, as indicated above
    $connection = 
                    oci_connect 
                        (
                            "training", 
                            "", 
                            "php_ora_usr", 
                            "AL32UTF8"
                        );
    The error message:
    Warning: oci_connect(): ORA-01005: null password given; logon denied in /var/www/html/myscript.php on line 91
    
    Fatal error: Connection step: ORA-01005: null password given; logon denied in /var/www/html/myscript.php on line 13
    I would appreciate it if you could kindly shed some light.

    Thanks in advance,
    Dariyoosh

    That gives a good clue to begin with. With your platform/Apache/DB, you might need different ACLs. Test directory and permissions. Check what euid your Apache runs as. Good luck.

  • A question about license Eula agreements

    Hello:

    I have a question about the license agreements (EULA end user). Could someone figure this out for me?

    My question is, what is the significance of the AE6 2.1.7.2 EULA?

    EULA - after effect 6 download link: http://www.adobe.com/products/eulas/pdfs/Gen_WWCombined-MULTI-20111031_1230.pdf

    2.1.7 use of server

    2.1.7.1.

    2.1.7.2... (e) for operations not initiated by an individual user (for example, the server automated processing).

    Everything (e), means that I can't start automatically processes via the AE AE script? That's what I'll do below.

    There will be a few AE works in the work list (DB), my script would read the list, and then automatically start program main AE,.

    After some processes, the work will be done. The script should continue to work until all the works being completed.

    What is a legal way to use AE?

    Thank you.

    Neil

    As far as my understanding of the legal points will: No. you would breach 2.1.7.1 and also on some level 4.7 and 4.8 break - Amazon is not your local network and since otehrs can access the server outside the number of permits users who could carry some influence in the judgememnt. Anyway, I'm not a legal expert by any means. However, technical obstacles remain: AE and SOUL do not necessarily play with the server because of CoDecs software, licenses and other things system level get involved Server security mechanisms can stop working...

    Mylenium

  • A question about the REEL in sqlplus command

    Hi all


    I have a question about the order of the COIL and I would be grateful if you could kindly give me a helping hand. Consider the following sql script.
    SPOOL result.txt
    SELECT * FROM mytable;
    SPOOL OFF;
    It works pretty well, and all the contents of the table "MyTable" is exported to the textfile "result.txt". However, sqlplus also prints the number of lines
    Print after each query. So after you run this script, the end of the file, I always have a line like
    ...
    "20541 lines returned"
    How can I avoid this line (the number of returned rows) in my output file?


    Thanks in advance,
    Dariyoosh

    Type this command prior to winding.

    set feedback off
    

    Kind regards
    Prazy

  • A question about the order of COLUMN sqlplus and PL/SQL

    Hello everyone.



    I would like to ask a question about sqlplus command COLUMN that I use in order to define the length of my queries of output columns. So, for example, I run something like:
    COLUMN market FORMAT a20
    That is why any column with the name 'the market' will be composed by sqlplus as 20 characters.

    Currently I'm working on a PL/SQL script that makes this automatic procedure, in other words, instead of manually write for each column in the above COLUMN order, it uses the DBMS_SQL. He read first as input the name of the table and then inside a loop, it detects the maximum length.

    For those interested, here is the Oracle documentation page that I found (example 8)
    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_sql.htm

    If everything worked well enough I managed to recover the maximum of each column in my table length, except that I don't know how to use the COLUMN sqlplus command in my PL/SQL block. I would like to do something like that (it's just a pseudo-code)
    FOR colIndex in 1 .. numberOfColumns LOOP
            currentColumnName = getColumnName(tableDescriptionObject, colIndex);
            currentColumnLength = getColumnLength(tableDescriptionObject, colIndex);
            
            COLUMN  currentColumnName FORMAT a -- and here after 'FORMAT a' I have to write currentColumnLenth but I don't know how to proceed.
    
    END LOOP;
    I would like to know is there a command in PL/SQL to define the appropriate column typeset in sqlplus length?


    Thanks in advance,
    Dariyoosh

    Hi, Dariyoosh,

    Sory, I don't think that there is a simple way to publish SQL * most orders fom PL/SQL.
    PL/SQL runs in the database (back-end); There isn't any direct contact with SQL * more at the front end.

    The best way I know is that PL/SQL script (myfile.sql) with orders of the COLUMN, and then have SQL * more run the script (@myfile).

  • Where can I ask a handful of general order questions about Firefox OS as a consumer and get the answers? (a forum or something similar)

    I have about seven questions about Firefox OS. I'm potentially interested in opting for a tablet that works instead of Android or iOS. I couldn't find a place to ask questions like that. Thank you!

    https://support.Mozilla.org/en-us/forums/Firefox-OS-English-Forum

    There is another option.

  • About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    Hi Michael,

    If you want to stop receiving notifications by electronic mail, in the thread, that you have created, then I suggest that you follow the steps below:

    One time connected to the Apple Support communities, visit your mini profile and select manage subscriptions.

    Content

    To manage this content, you are currently subscribed and changing your preferences, select the content.

    Select next to see what content you are currently following.  Note that any thread you are responding you subscribe you automatically to this thread.

    You can select to terminate a subscription to a thread.

    Learn how to manage your subscriptions

    Take care.

  • Where and how do I ask questions about Email?

    The Commission opening thingy is complicated, I have trouble finding my way around it.  I don't know where or how questions about email.  Is there an easier way than trawling through all these icons?  Like a list or something - as you get on all other forums on the internet?

    It would be a good starting point: Mac mini

    Or the appropriate under MAC Os and system software section.

    You might also find this useful: find answers and new questions

  • Many questions about the HP 50 g

    I just ordered a HP 50 g graphic calculator! I have a few questions about this so hang on tight! What is the USB connector on the calculator? Mini-USB, micro USB, or is it a connector owner, "custom". Then, it would be possible to connect a keyboard to the HP 50 g by using the USB Port? Is there a program that would make this possible? (I doubt it would work if you plug it..) I have a Mini-USB to female USB 2.0 connector. So I could just plug the keyboard right, provided that the port on the calculator is a Mini-USB Port. If this is not so that I could use my female to female USB adaptor to connect the keyboard.

    Thanks for your help,

    Zekelegge

    Hi!, zekelegge:

    Welcome to Forum!

    The only printer I use, 50G calculators, 48GII, 39GS and 17BII +, as well as many former models, such as the 48 s/SX/G/G + / GX, 38 G, 39 G, 42, 41 C/CV/CX and 28 C/S, is the infrared printer HP 82240 b. If you can use the emulator HP50G, on the PC, the simulator of the printer, you can download, since... http://www.HPCalc.org/details.php?id=7386

    The printer... HP 82240 B

    The cable series...

    The description... http://www.allenwan.com/hpcalcserialcable/

    The original cable...

  • Question about warranty after exchanges of RAM on Satellite module series

    Hello together,

    I have a question about the warranty. My laptop is 5 months old and now I want to improve it with more RAM. I want to do it myself, and now I'm wondering if the warranty will be getting hurt.
    Thanks in advance for your answers.

    Concerning

    TiG3r

    For new models of laptops the RAM upgrade described in s operating manuals. It is public act and it shows the owner of the notebook how do RAM upgrade only.

    If Toshiba offers something like this he won't have the negative influence of valid warranty.
    Buy a compatible module and RAM upgrade.

    Bye and good luck!

Maybe you are looking for

  • I uninstalled and re-downloaded but the home page is still blurred

    What has happened a few times before, but usually if I close and reopen all returns to normal bt right now

  • After running a Norton PC Cleanup utility, some web pages are formatted incorrectly

    I had installed Firefox v17 and it was running. I installed a copy of Norton PC Tools and ran from cleaning that removes temporary internet files, cookies, and other things. After running Norton, some web pages do not properly format. Instead of the

  • Acer Aspire One D270 does not turn on!

    Have an Acer Aspire One D270. I've had for about 4-5 months now. Today it suddenly has stopped and it won't turn on. I left for a few hours but nothing yet. I thought it was a battery problem but the charging light does not turn. I know for sure, it

  • What is the removable storage management?

    I just checked the "turn windows features on or off" and I noticed that the "removable storage management" is turned OFF. I used a hard drive portable USB and flash drives since I have this computer without problem. What does the "removable storage m

  • EPSON wp 4525

    Buon giorno, sono passato just a W7 my non riesco a funzionare stampante epson wp 4525 airfare. Come may? Grazie confido nella vostra professionalism