Topic
  • 1 reply
  • Latest Post - ‏2013-11-12T13:44:25Z by smithha
MolumaTresa
MolumaTresa
23 Posts

Pinned topic batch file to execute all the rules in IA 9.1

‏2013-11-11T11:13:49Z |

Can anyone tell me how to create a batch file as well as the command to be written inside the batch file to execute(run) all the rules in a projcect in IA 9.1

 

 

  • smithha
    smithha
    162 Posts

    Re: batch file to execute all the rules in IA 9.1

    ‏2013-11-12T13:44:25Z  

    There are two options to run the rules in a project in batch via command line.

    1) iaJob command

    To use this option, in the UI you will want to select all the rules that you wish to include and then choose the Run option.  Instead of selecting the Run Now check box, choose the Create External Bundle check box.  You will need to provide a location for the XML bundle file that is generated.  The command string to execute would be: 

    
    iaJob  -user 
    username -password 
    password  -isHost 
    hostname -port 
    port_number -runBundle 
    bundle_name 
    [the bundle name should include the path to the bundle file]
    

    For more details see:  http://pic.dhe.ibm.com/infocenter/iisinfsv/v9r1/topic/com.ibm.swg.im.iis.ia.schedule.doc/topics/dq_command_line_interface.html

    2) IAAdmin command

    This is the CLI for Information Analyzer and allows you to retrieve content, create content, or run IA functions.  In this case, you need to build an XML file listing the data rules that you wish to run.  It needs to conform to a defined XML schema as described here:  http://pic.dhe.ibm.com/infocenter/iisinfsv/v9r1/topic/com.ibm.swg.im.iis.ia.restapi.doc/topics/r_xsd_tasks.html

    It can be as simple as this:

    
    <?xml version="1.0" encoding="UTF-8"?>
     <iaapi:Project xmlns:iaapi="http://www.ibm.com/investigate/api/iaapi" name="
    yourProjectName">
       <Tasks>
         <RunRules>
           <ExecutableRule name="
    rule1"/>
           <ExecutableRule name="
    rule2"/>
           <ExecutableRule name="
    rule3"/>
         </RunRules>
       </Tasks>
     </iaapi:Project>
    

    The command string to execute would be:

    
    IAAdmin -user 
    username -password 
    password -host 
    hostname -port 
    port_number -
    runTasks -content <
    XML file name> 
    
    

    You can find further details on the IAAdmin CLI here: http://pic.dhe.ibm.com/infocenter/iisinfsv/v9r1/topic/com.ibm.swg.im.iis.ia.restapi.doc/topics/r_cli_api_syntax.html

    Note:  the IAJob and IAAdmin commands are found in the c:\ibm\informationserver\asbnode\bin directory on Windows or /ibm/informationserver/asbnode/bin directory on Unix/Linux.  If you have the IA UI on your client machine, the asbnode directory will be on your machine as well.

    Hope this helps.