BPEL processes and shell scripts

Hi,
I wish to invoke BPEL processes from a shell script so that it could be regulated from a typical Control-M environment. Can anybody let me know if its possible...?
Regards,
Roy

Some kind-of Java interface would just be fantastic. Is there anything like that...?
Well, I intend to execute some batch processes which would be scheduled and administered by Control-M; If i opt to use ws-clients within the same then auditing and monitering the status of my executing process would be an obvious overhead that i might need to hard wire in my implementation. Therefore, should it be possible to execute a BPEL process from a Java like interface, which i'd then wrap in a shell script; then Control-M on itself would be capable of monitoring the process status and all other performance parameters around the same.
Suresh - Thanks for your suggestion, will definately post the message on those groups as well.

Similar Messages

  • Error While Deploying the BPEL Process using obant script

    Hi All,
    I am getting the following error while deploying the BPEL Process using obant script. we are using the BPEL Version 10.1.2.0.2.Any information in this regard will be really helpful.
    Buildfile: build.xml
    main:
    [bpelc] file:/home5102/dibyap/saravana/Test/CreditRatingService.wsdl
    [bpelc] validating "/home5102/dibyap/saravana/Test/CreditRatingService.bpel" ...
    BUILD FAILED
    /home5102/dibyap/saravana/Test/build.xml:15: ORABPEL-01002
    Domain directory not found.
    The process cannot be deployed to domain "default" because the domain directory "/opt02/app/ESIT/oracle/esit10gR2iAS/BPEL10gR2/iAS/integration/orabpel/domains/default/deploy" cannot be found or cannot b
    e written to.
    Please check your -deploy option value; "default" must refer to a domain that has been installed locally on your machine.
    Total time: 23 seconds
    dibyap@ios5102_ESIBT:/home5102/dibyap/saravana/Test>
    Thanks,
    Saravana

    In 10.1.2.0.2 you need to create your own build.xml
    I have found an example, it may be of some help. This does call a property file
    cheers
    James
    <?xml version="1.0" ?>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Run cxant on this file to build, package and deploy the
    ASB_EFT BPEL process
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <project name="ASB_EFT" default="main" basedir=".">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Name of the domain the generated BPEL suitcase will be deployed to
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="deploy" value="default" />
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    What version number should be used to tag the generated BPEL archive?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="rev" value="1.0" />
    <!-- BPEL Best Practices Properties -->
    <!-- Defaults Properties for TARGET environments
    # CHANGE THIS FILE TO REFLECT THE TARGET ENVIRONEMNT
    # either dev, test, or prod.properties
    -->
    <property file="ebusd.properties"/>
    <property name="env" value="${env.name}"/>
    <property name="current.project.name" value="${project.name}"/>
    <property name="target.project.name" value="${project.name}_${env}"/>
    <property name="deployment.profile" value ="${env}.properties"/>
    <property name="source.development.directory" location="${basedir}"/>
    <property name="target.env.directory" location="${basedir}/deploy/${project.name}_${env}"/>
    <property file="${deployment.profile}"/>
    <property name="build.fileencoding" value="UTF-8"/>
    <!-- Prints Environment
    -->
    <target name="print.env" description="Display environment settings">
    <echo message="Base Directory: ${basedir}"/>
    <echo message="Deployment Profile: ${deployment.profile}"/>
    <echo message="target.env.directory: ${target.env.directory}"/>
    <echo message="Deploy to Domain: ${deployToDomain}"/>
    <echo/>
    <echo message="os.name: ${os.name}"/>
    <echo message="os.version: ${os.version}"/>
    <echo message="os.arch: ${os.arch}"/>
    <echo/>
    <echo message="java.home: ${java.home}"/>
    <echo message="java.vm.name: ${java.vm.name}"/>
    <echo message="java.vm.vendor: ${java.vm.vendor}"/>
    <echo message="java.vm.version: ${java.vm.version}"/>
    <echo message="java.class.path: ${java.class.path}"/>
    <echo/>
    <echo message="env: ${env}"/>
    <echo message="current.project.name: ${current.project.name}"/>
    <echo message="target.project.name: ${target.project.name}"/>
    <echo message="server.name: ${server.name}"/>
    </target>
    <!--
    Copies the current directory structure along with
    all the file into the target.env.directory and
    change the name of the project
    -->
    <target name="create.environment">
    <copy todir="${target.env.directory}">
    <fileset dir="${basedir}"/>
    <filterset begintoken="@" endtoken="@">
    <filtersfile file="${deployment.profile}"/>
    </filterset>
    </copy>
    <move file="${target.env.directory}/${current.project.name}.jpr" tofile="${target.env.directory}/${target.project.name}.jpr"/>
    </target>
    <target name="main">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    the bpelc task compiles and package BPEL processes into versioned BPEL
    archives (bpel_...jar). See the "Programming BPEL" guide for more
    information on the options of this task.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bpelc input="${basedir}/bpel.xml" rev="${rev}" deploy="${deploy}" />
    </target>
    </project>
    here is a property file
    project.name=ASB_EFT
    env.name=ebusd
    deployToDomain=default
    server.name=[server]
    server.port=7788
    ebusd\:7788=http://[server]:7788/
    IntegrationMailAccount=OracleBPELTest
    IntegrationMailAddress=[email]
    IntegrationMailPassword=[password]
    archivedir=[directory]
    inbounddir=/[directory]
    errordir=[directory]
    outbounddir=[directory]
    bpelpw=bpel
    dbhost1=[dbserver]
    dbhost2=[dbserver]
    dbport=1523
    dbservice=bpel
    dbconnstr=jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=[server])(PORT=1523))(ADDRESS=(PROTOCOL=tcp)(HOST=[server])(PORT=1523)))(CONNECT_DATA=(SERVICE_NAME=ebusd)))

  • Creating a Web Service to handle flow between BPEL process and XML Gateway

    I am new to Web Services. I have never created one, yet I have the task of designing the following for a project.
    Any help as to what steps I need to take would be very very helpful. There is a lot of information on XML, SOA and WSDL out there that it can get very confusing, and sometimes you just need someone to point the way
    What I need to do is create a Custom Send and a Custom Receive Program (both web services) handle the message flow between an Enterprise BPEL processes and a Deployed XML Gateway.
    BPEL compresses this XML business object document (for faster transmission), and sends remotely to this Custom Receive web service, which in turn calls a decompress java program and then send the document to the XML gateway inbound web service.
    The Custom Send web service does just the opposite. It needs to take the business object document from XML gateway, call the compress java program and then send to the Enterprise BPEL.
    In a nutshell...these Custom Send/Receive Web services handle the message flow between the Enterprise BPEL process and the Deployed XML Gateway.
    What I need help on...
    -Creating this in JDeveloper- where do I get started?
    -How does a web service receive a compressed file sent to me via BPEL? Does it just sit there waiting for it?
    -Is this a synchronous or asynchronous design?
    -Will this be 2 web services (Send and Receive) or do I make 1 with 2 functionalities
    -How do I call the java compress/decompress program within the web service? (this java function is already created and ready to be called)
    -Is this decompressed business object file an XML schema and an XML message? Or just a message?
    -I need to send this to the XML Gateway Web Service to load. How does that work?
    -I have a Generic XML Gateway WSDL file...I assume I need to take all the info I get and map it to this template? Is this true? How do I do that?
    Like I said, any help would be appreciated. Links answers to my many questions would be fabulous.
    -Jason

    If you are talking about simple XML transformation of the SOAP payload between the client calling your service and the final destination of the message you are routing, the ESB approach may be a better fit.
    If you have more complex transformation in mind, with major processing and rework of the message in the intermediary, you may be better of with using the POJO approach. Write your service and embed a callout to the other service in your implementation. If the two services share the same Java Model, you may even be able to re-use the same Java Bean.
    To get SOAP Element instead of Java bean, you just need to use the noDataBinding option with either genProxy and topDownAssemble (or assemble). See the WS-Guide [1] for details. Chapter 18 will give you all the details about the different WSA command line parameters.
    Hope this helps,
    -Eric
    [1] http://download-west.oracle.com/docs/cd/B31017_01/web.1013/b28974/toc.htm

  • Understanding asynchronous BPEL processes and threading

    Hi everybody,
    I have a question regarding asynchronous BPEL processes and threading.
    I have an asynchronous BPEL process which delivers a message (picked up from a JMS topic) to a repository (via for instance an ICAN server). This transaction must be time-sensitive, i.e. first-in is first-out.
    If I have several threads running concurrently I have no guarantee that the messages are delivered in the same order that they where generated. It seems that the suggested way around this problem is to use single-threading.
    So here's the part that I do not understand:
    An asynchronous request does not wait for a response. If I use single-threading then what happens to that single-thread if for some reason (for instance the ICAN server is not responding) the BPEL instance is dehydrated? Is the thread still allocated for waiting for the first response or does it go back and pick up the next thing on the topic? If the next thing on the topic is picked up then how can I be sure that the messages are delivered in the correct order? If the thread is still allocated to the single instance then does that not kindda go against the whole concept of an asynchronous process?
    I hope some one can explain this to me.
    Thank you in advance.
    Kind regards,
    Mathias
    PS. This question is an attempt of a different angle on another forum thread: Asynchronuos BPEL - how to get the order of messages right?

    Hi again,
    A quick follow up question:
    Is there any way to have several BPEL processes running on the same server with different settings for how many threads to use?
    It seems that the only way to set number of threads used by BPEL is to use the configuration in the BPEL console? This is an domain setting - which means that all processes deployed to the server is effected the same way?
    I am asking because I am facing a scenario where I need one BPEL process to read from a AQ queue (well actually a topic) with a single thread and another BPEL process - deployed to the same BPEL server - to read from the same AQ queue with multiple threads.
    Does anyone have any idea of how to do this? Can it be done?
    Any suggestions, hints or reference to any documentation would be very much appreciated.
    Thank you in advance,
    Aagaard

  • Invoke BPEL process and display result in BAM chart?

    Hi,
    I was wondering if there is any way to invoke a BPEL process and display the result back in BAM chart (Active Studio).
    I have in mind the Actionable Reports and getting the BPEl process populate the BAM Data Object to show the result back. Let me know if there's anything to connect these ideas to do the whole thing.
    The reason for this requirement is to have a single User Interface for having BAM charts and a query operation (synchronous BPEL process).
    Any inputs are welcome.
    Thanks in advance.
    Vikas

    Yes, this can be done with the help of Alert and setting up a external Action.
    Please refer the following document for more details.
    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_CallingExternal_WebServices.pdf
    regards
    Laj

  • Rman windows and  Shell Script

    hi,
    How to take the backup by windows script and shell script.please any one tell that.
    thanks
    with regards

    Dear user!
    How to take the backup by script is a very imprecisely kind of question. So the only thing I can give you is a very imprecise answer.
    For linux shellscript you may use:
    vim my_backup_script.sh
    #!/bin/bash
    BACKUP DATABASE;Save and run this script in the following way:
    rman target / catalog catuser/password@CATDB CMDFILE my_backup_script.shYou may customize this script to fit your needs. On Windows you may write a batchscript like that:
    notepad my_backup_script.bat
    BACKUP DATABASE;Save and run this script like that:
    rman target / catalog catuser/password@CATDB CMDFILE my_backup_script.batMaybe if you could state your needs a little bit more precisely I could give you a more helpful answer.
    Yours sincerely
    Florian W.

  • Xgettext for perl and shell scripts on Solaris 9

    Hi......I have to internationalized perl and shell scripts on Linux and Solaris 9.
    I have used gettext on linux to internationalized both perl and shell scripts but on solaris i m not able to
    achieve the same.
    If we see help of xgettect on Linux, it shows input file options for Perl, Shell, C, C++ etc but help for
    xgettext on Solaris shows input file option for C only.
    Can you please provide me some way of using xgettext for perl and shell scripts on Solaris 9 or
    is there any other way of internationalizing perl and shell scripts on Solaris 9.
    Many Thanks,
    Lokesh

    Signature link blocked.
    db
    Contentprise wrote:
    Hi......I have to internationalized perl and shell scripts on Linux and Solaris 9.
    I have used gettext on linux to internationalized both perl and shell scripts but on solaris i m not able to
    achieve the same.
    If we see help of xgettect on Linux, it shows input file options for Perl, Shell, C, C++ etc but help for
    xgettext on Solaris shows input file option for C only.
    Can you please provide me some way of using xgettext for perl and shell scripts on Solaris 9 or
    is there any other way of internationalizing perl and shell scripts on Solaris 9.
    Many Thanks

  • Error with dbms_scheduler and shell script execution

    Hi,guys.
    I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't work. Actually it works, but some of executable information in sh doesn't work, seems it just jump over of the part of the script. Sendmail part is running, maybe there is problem with rman script as it self?
    DB version: 10g
    And my scripts:
    Shell scripts (permisons 755):
    #!/bin/ksh
    export PATH=/home/oracle/product/asm_home/bin:/home/oracle/product/db_home/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.
    export ORACLE_BASE=/home/oracle/product
    export ORACLE_SID=zabbix
    export ORACLE_HOME=/home/oracle/product/db_home
    ${ORACLE_HOME}/bin/rman<<EOF
    connect target /
    run {backup recovery area delete all input;}
    EOF
    {       echo "From:[email protected]"
            echo "To: [email protected]"
            echo "Subject: Recovery area"
            echo 'Content-Type: text/html'
            echo
            echo '<html><body><table border="1" cellspacing="1">'
            echo '<tr><td><b>Process</b></td><td><b>Statuss</b></td></tr>'
            echo "<tr><td>RMAN</td><td><b>Works</b></td></tr>"
            echo "</table></body></html>"
    } | sendmail -tIn the first part i'm exporting all of the important stuff for oracle, then I call RMAN with specific atributes. And then there is just simply sendmail functionality inside script to represent if script works (for now).
    And below pl/sql script:
    begin
      DBMS_SCHEDULER.CREATE_JOB
      job_name => 'FLASH_RECOVERY',
      job_type => 'EXECUTABLE',
      job_action => '/home/oracle/backup/test.sh',
      start_date => sysdate,
      job_class => 'DEFAULT_JOB_CLASS',
      enabled => TRUE,
      auto_drop => FALSE,
      comments => 'FLASH RECOVERY USAGE AREA backup and delete'
      END;
      /And this job execution:
           begin
               DBMS_SCHEDULER.run_job (job_name =>'FLASH_RECOVERY',use_current_session => TRUE);
           end;What can be wrong? For me, I think it's something with permisions.
    I hope you got my idea and could help me.
    Tom
    Edited by: safazaurs on 2013.18.2 22:16

    There is no error, i just receive all the time e-mail, seems it jumps over rman. I tried almost everything and still couldn't get result as i want. And, if i'm running script from command line - it works. Rman calls, and starts to recover archivelogs.

  • SQL LOADER and SHELL SCRIPT ISSUE

    Hello Guys,
    I know this not the right forum but i am not sure where i should post this.
    Pelase help
    I am running a shell script which is giving me error
    Username:SQL*Loader-128: unable to begin a session
    ORA-01017: invalid username/password; logon denied
    SQL*Loader: Release 10.2.0.4.0 - Production on Thu Nov 19 13:02:04 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    SQL*Plus: Release 10.2.0.4.0 - Production on Thu Nov 19 13:02:06 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Enter user-name:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    0 rows updated.
    Commit complete.
    SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition
    SQL> SQL> Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options Thu Nov 19 13:02:06 EST 2009In shell script i have used the same username and passwd which i am using from command line
    the shell script is calling sql loader to load file
    and for that also the username and passwd is same.
    i am able to run sqlldr command from command line dont knw why here its giving error
    here is my shell script
    set -a
    . $HOME/.edw.env
    . $admlib/checklib.sh
    LOGDIR=$admsrc/sigma6/ppadala/copg
    LOGFILE=${LOGDIR}/log/test`date '+%m%d'`.xtr
    DB_USER=copg
    DB_PWD=copg
    set +a
    cd $LOGDIR
    if test ! -f $admsrc/sigma6/ppadala/copg/DM_Daily_EFolderCloseCancel_Report_11192009.txt
    then
       echo "Error: DM_Daily_EFolderCloseCancel_Report_11192009.txt does not exist and/or is not a regular file." >> ${LOGFILE}
       exit 1
    fi
    echo 'End of Checking for the existence of the file - Successful'>> ${LOGFILE}
    sqlldr control=$admsrc/sigma6/ppadala/copg/Close_Cancle.ctl log=$admsrc/sigma6/ppadala/copg/Close_cancle.log
    userid=${DB_USER}/${DB_PWD} silent=\(HEADER,FEEDBACK,DISCARDS\)>> ${LOGFILE} 2>&1
    case $? in 0) :;;1|3) echo "Error: SQL Loader" >> ${LOGFILE}
         exit 1;;
    esac
    sqlplus << EOD
    ${DB_USER}/${DB_PWD}
    @Close_Cancle.sql
    EOD
    if [ $? -ne 0 ]
    then
        echo "Error: SQL Plus for script Processing" >> ${LOGFILE}
        echo "Resi Unit Scheduling Report Refresh failed" >> ${LOGFILE}
    fi
    ) > ${LOGFILE} 2>&1
    echo `date` >> ${LOGFILE}
    if [ -f ${LOGFILE} ]
    then
    mail -s "Resi Unit Scheduling" "[email protected]" < ${LOGFILE}
    sleep 3
    `ck_error ${LOGFILE}`
    fiplease help guys
    thanks

    Thanks for the reply
    In Close_cancle.log also its the same msg which i posted.
    logon denied..............
    and this is the log file contents when i do set - X on
    + cd /u2144009/src/sigma6/ppadala/copg
    + test ! -f
    + /u2144009/src/sigma6/ppadala/copg/DM_Daily_EFolderCloseCancel_Report_1
    + 1192009.txt echo End of Checking for the existence of the file -
    + Successful
    + 1>> /u2144009/src/sigma6/ppadala/copg/log/test1119.xtr
    + sqlldr control=/u2144009/src/sigma6/ppadala/copg/Close_Cancle.ctl
    + log=/u2144009/src/sigma6/ppadala/copg/Close_cancle.log
    Username:SQL*Loader-128: unable to begin a session
    ORA-01017: invalid username/password; logon denied
    SQL*Loader: Release 10.2.0.4.0 - Production on Thu Nov 19 17:32:17 2009
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    + userid=copg/copg silent=(HEADER,FEEDBACK,DISCARDS)
    + 1>> /u2144009/src/sigma6/ppadala/copg/log/test1119.xtr 2>& 1
    + :
    + sqlplus
    + 0<<
    copg/copg
    @Close_Cancle.sql
    SQL*Plus: Release 10.2.0.4.0 - Production on Thu Nov 19 17:32:58 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Enter user-name:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
    0 rows updated.
    Commit complete.
    SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition
    SQL> SQL> Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    + [ 0 -ne 0 ]
    Thu Nov 19 17:32:59 EST 2009Edited by: user10647455 on Nov 19, 2009 2:35 PM

  • Random SP2 error when starting oracle process through SHELL script

    Hi All,
    I am trying to process data in n-Number of tables through a package. The package is called through a shell script to create start data processing. All calls to the package are in a sql script which is basically exec calls-
    exec package.process ('T1','some param');
    exec package.process ('T1','some param');
    exec package.process ('T..n','some param');
    I have a shell script which I use to execute commands from the sql script. There is a reason behind using shell script. For some strange reason, I keep on getting -
    ERROR: logon denied - check for valid user with valid privileges
    SP2-0640: Not connected
    SP2-0641: "EXECUTE" requires connection to server
    SP2-0640: Not connected
    for some EXEC calls. Problem is, errors are generated at random. So in one run, I get error for T10,T11 and then in next run I might get for some other tables.
    However, when I am running the sql script from the sql prompt, all calls to the package are executed without any problem.
    This makes me think, it is something to do with the way database connection being initiated through UNIX.
    Has anyone faced similar issue? Your help/gudence is much appreciated.
    DB: Oracle 10.2.0.5
    OS: SUN Solaris 10
    Thanks in advance.

    Login credentials are provided inside the shell script.
    I did put a sleep(10) after EOF but no help. As mentioned if I run script file from sql promt, it runs without any hiccup. So it is the connection through the UNIX that is causing issue.
    As pointed out by Sybrand, I agree that it does not make a sense to connect and commit after every sql statement. So decided to change the shell script and so far, the result from my initial tests on a sample data is quite encouraging. Hopefully I will have a solution.
    But it will be nice to know why SHELL is doing what it is doing!!
    Legacy prog are sometime big time eye-openers..;)

  • Command line parameters and Shell Script -- URGENT

    Hi folks,
    I am facing some problem in the Shell script and the command line parameter.
    The scenario is -- I am picking a file from a directory, whose path is <b>/interfaces/xid/receive/filename.dat</b>
    I have to encrypt filename.dat and move it to another folder, whose path is <b>/interfaces/xid/send</b>. So, the encrypted file will reside in the <b>send</b> directory.
    Now, I don't want to hardcode the new path, where the encrypted file has to be moved. Please let me know how to achieve this. Please consider this as urgent.
    Have a look at the command line in the "before message processing"  -- <b>/interfaces/xid/receive/xi_decompress.sh  /interfaces%F</b>
    Have a look at the shell script for the same --
    #!/bin/sh
    Setup environment variables
    COMMPRESS_DIR=/interfaces/software/commpress
    export COMMPRESS_DIR
    LOG_DIR=/interfaces/software/commpress/log/
    export LOG_DIR
    IN_FILE=$1
    export IN_FILE
    Find the directory where the unencrypted file is deposited
    IN_FILE_DIR=`dirname $1`
    export IN_FILE_DIR
    Make sure the working directory is where the unencrypt.key is...
    cd $COMMPRESS_DIR
    encrypt the file
    if [ `uname` = "HP-UX" ]
    then
       find $IN_FILE | $COMMPRESS_DIR/compx $IN_FILE_DIR logpath=$LOG_DIR
    else
       find $IN_FILE | $COMMPRESS_DIR/compx-sun $IN_FILE_DIR logpath=$LOG_DIR
    fi
    Get the result of the encryption
    RET_CODE=$?
    Check decryption result
    If error (retuen code <> 0), create an error log file in the
    same directory as the input file.
    if [ $RET_CODE -ne 0 ]
    then
        PREFIX="Decryption"
        DATE_TIME=$(date +%Y%m%d_%H%M%S%N)
        SUFFIX="err"
        FILENAME=$/$_$.$
        echo "Decryption Error log"        >$FILENAME
        echo "DATE_TIME:  $"   >>$FILENAME
        echo "DIRECTORY:  $" >>$FILENAME
        echo "FILE:       $"     >>$FILENAME
        echo "ERROR CODE: $"    >>$FILENAME
    fi
    exit $RET_CODE
    What else I need to add in this piece of code? Urgent help !!
    Thanks a lot in advance.
    Neetesh

    Hi Satish,
    I was able to figure that out, that we need to hard code the path as the 2nd parameter.
    But I guess there is a way out in Unix where we can handle this situation, where we are not willing to hard code.
    Anyways, thanks a lot for your input .. -:)
    Cheers,
    Neetesh

  • DBMS_SCHEDULER and Shell Script on 10.2.0.1

    Hi All
    My env, Oracle 10.2.0.1 and OS is Solaris.
    My script can run on OS that is work without error that contain create file, delete file, call sqlplus, function to get value from database and return to OS variables.
    In shell script some code as below
    get_val () {
    sqlplus -s /nolog <<EOF
    conn test/test
    set heading off
    set feedback off
    set pages 0
    SELECT SUBSTR (SYS_CONNECT_BY_PATH (Z, ' '), 2) z
          FROM (SELECT NAMEDQUERY , ROW_NUMBER () OVER (ORDER BY Z) rn,
                       COUNT (*) OVER () cnt
                  FROM X
                  WHERE Z LIKE '%FULL')
         WHERE rn = cnt
    START WITH rn = 1
    CONNECT BY rn = PRIOR rn + 1;
    EOF
    vx=$(get_val)
    if [ ${#vx} -gt 0 ]; then
    for xfile in $vx
    do
    rm -f $CURRDIR/$xfile.txt 2> /dev/null
    done
    fi
    When run by dbms_scheduler that show below error
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    STANDARD_ERROR="/home/oracle/script/test.sh: syntax error at line 26: `vx=$' unexpected
    How to resolve above error?  (owner of $CURRDIR/$xfile.txt is oracle user)
    One more question, How to force dbms_scheduler that using user oracle (OS) to run shell script?, as I know, default user is nobody and Oracle version 10.2.0.2 later that have external.job.ora to set it but 10.2.0.1 doesn't have it.
    Thank you in advance,
    Hiko

    I changed scheduler by set argument as below
    dbms_scheduler.create_job (job_name=>'TEST',job_type=>'EXECUTABLE',job_action=>'/usr/bin/bash',number_of_arguments=>1);
    dbms_scheduler.set_job_argument_value('TEST',1,argument_value,'/home/oracle/test.sh');
    That is work. below is conclusion to did
    1. Change permission of $ORACLE_HOME/bin/extjob to 4750 (-rwsr-x---)
    2. Change owner of $ORACLE_HOME/bin/extjob to oracle:dba
    3. Use '/usr/bin/bash' instead of '/usr/bin/sh'
    But I found error about download file process that I'm using wget to download source file in shell script and run by dbms_scheduler as above.
    My problem, first file can download normally and process until finish but second file was hang.
    Do you have any idea or solution to prove and resolve it?
    Thank you,
    Hiko

  • Strange Problem while deploying BPEL processes by ANT Script.

    Hi,
    Ant script is working fine in Dev environment but is failing in the other environment. Somehow the BPEL server is not able to pick the latest deployed process , due to this the dependent BPEL processes are failing. If we restart the server , it moves forward and then fails at the point where it couldn’t find reference to the processes deployed after restart. Restarting the server at every failed interval will deploy all the BPEL processes which is not the solution.
    example : we have BPEL Processes say A, B, C, D and E. A,B are independent processes C is dependent on A, D is independent and E is dependent on D. So I have Ant script to deploy in A,B,C,D,E order. Now I run the Ant Script: It deploys A,B processes and Fails at C saying it couldn't find the process A.wsdl(But A is deployed). So if i restart now it recognizes A and B are deployed so C is also deployed succesfully it also deploys D as it is Independent but fails at E. If i restart the server E is also deployed.
    The Environment is clustered.
    Any suggestion to make my Ant script to run at a go will be highly appreciated
    Thanks
    Krishna
    Edited by: KrishnaBhaskarla on Oct 30, 2008 5:22 PM

    Krishna,
    Could we see your ant script? If you are using oc4j andmin_client.jar, there is a -redeploy command which may prove helpful. You might redeploy AB, then CD, then E.
    -Mike

  • Java and Shell Scripts

    I have created a java program that its main target is to read from a log file. The GUI has six buttons and its button has a script running each time the button is being hit. The results of the script are presented on a JTextArea automatically. So I have six buttons and six scripts. The problem is that the first time the program works fine. But if I click one button for the second time I get no results or wrong results. The scripts alone(when they work without the java program) work right.
    Is this a memory problem? How can I have the scripts with the java program work right together? I must say that each script needs 4-5 seconds to execute and immediately after the execution, the results, as I told before, are shown in a JTextArea. How can I solve the problem, so that I have the right results every time I click the buttons and not just for the first time?
    I need your ideas as soon as possible. :)))
    For connecting the java program and the shell scripts I use:
    Process proc = Runtime.getRuntime().exec("bash script ");
    OutputStream out = proc.getOutputStream();
    PrintWriter p = new PrintWriter(out);
    p.flush();     

    I think u must use process.waitFor() method .
    By this, u r sure that the said process shall complete.
    Also I would recommend new Instance/Thread for running each script.

  • Applescript with Mail attachments and shell scripts (pdftk)

    I'm trying to create a script that I can call using mail rules that will:
    1. save an attached PDF file to a folder (folder name is 'PDFs_from_Mail:')
    2. save each page of the PDF as a separate file
    3. delete the old file
    so far, i used the script below called from mail to save the attachments to the
    -- script called from mail
    using terms from application"Mail"
      onperform mail action with messages theMessages
        tell application"Finder" to set ptd to (path to desktopfolder) as string
        tell application"Finder" to set pathToAttachments to(path to desktop folder as string) &"PDFs_from_Mail:"
        tell application"Mail"
           repeatwith theMessage in theMessages
                if theMessage's mailattachments is not {} then
                      repeatwith theAttachment in theMessage's mailattachments
                            settheFileName to pathToAttachments & theAttachment's name
                            try
                                     save theAttachment in theFileName
                              onerror errnum
                            endtry
                      endrepeat
                end if
             endrepeat
          end tell
      endperform mail action with messages
    end usingterms from
    tell application"Mail"
        setmyMessages to selection
        tellme to perform mail action with messages myMessages
    end tell
    -- end of script called from mail
    after the file is in the folder, i'd like to automatically call a script that splits it in to pages and saves each file.  I found pdftk can do what I need.  I got the following working, which uses a folder action script to process the file:
    -- burst script
    on addingfolder items to this_folder after receiving added_items
       tellapplication "Finder"
           set fold_name tothe name of this_folder
               try
                   repeatwith i from 1 to number ofitems in added_items
                          set theFile toitem i of added_items
                          set oldDelimiters toAppleScript's text item delimiters
                          set AppleScript's textitem delimiters to {":"}
                          set theFolder to(((text items 1 thru ((count everytext item of (theFile asstring)) -1)) of (theFile asstring))) as string
                          set AppleScript's textitem delimiters to oldDelimiters
                                --get the file name
                                   set theFileName to the name of theFile
                                                     do shell script"/usr/local/bin/pdftk " & (POSIX path oftheFile) & " burst output " & (POSIXpath of theFolder) & "/" & theFileName &"_%03d.pdf"
                                                      delete theFile
                                                    endrepeat
                                        end try
                         endtell
    end adding folder items to
    -- end burst script
    the shell script that is called is in the format:
    pdftk myfile.pdf burst
    the output parameter basically adds the page number to the end of the original filename for each file that is created
    my idea was to attach the folder action script to the 'PDFs_from_Mail' folder, and when the first script is called, the file would be saved to that folder and trigger the folder action script burst the file.  it works for individual messages, but when I try using it with the hundreds of messages that I have, all kinds of crazy things happen... the filenames are all wrong and it seems like it goes on infinitely.
    My familiarity with applescript is somewhat limited (as you may have guessed) and I'm wondering if there is a better approach.  perhaps if I incorporate the shell script into the script called from mail it may streamline everything.
    my problem is that I am not sure what code I need to keep in each script.
    can anyone take a quick look at this and give me some advice?
    my goal is to have these individual pages in a folder so that I can use quick view to page through them.  if the pdf is more than one page, then I have to get involved in scrolling up/down and it becomes difficult to find things efficiently.
    thanks!

    just a quick update and a general questions about applescripting with shell scripts...
    i attached the above folder action burst script to a folder, and have been dragging pdf files into it, one at a time.
    sometimes the script runs fine and the new files are created and the old pdf is deleted.  other times, there is a long delay between when I drop a pdf file into the folder and when the new files are created.  and sometimes nothing even happens at all (uaually if i dont wait for at least 30 seconds or so between dropping the files in the folder).  I also noticed that the window title text (area showing the folder name at the top of the finder window) becomes grayed out when the script is running and sometimes it remains grayed out for a few minutes after the script has run.
    could it be that the shell script just takes a really long time to work?  i am afraid to drop more than one file at a time as the last time I tried that the output was all wrong and I had to force quit processes and shut down. 

Maybe you are looking for