Calling Shell Scripts in Business Workflow and Guided Procedures

Hi *,
is it possible to call shell scripts in business workflow and guided procedures? would need further documentation (how to, blog,...) about this issue.
Thx in advance,
Rene.

Hello,
Workflows consist of tasks.
A task executed an object's method.
Methods are written in ABAP.
In the method you can code whatever you like, including code to execute shellscripts.
How to do this is not really a workflow question, I would suggest asking in an ABAP forum on how to write a function module to do this in a pure ABAP context. Then it's just a matter of inserting it into a method for use in your WF.
Cheers,
Mike

Similar Messages

  • Call a Shell Script from a workflow

    Hi,
    I need to call a shell script from a workflow. How can I do this.
    If the script takes any input, How can I pass that input to the script
    and call the script in the workflow.
    Suggestions are needed.
    Thanks,
    Pandu

    Hi ,
    I am executing the following java code :-
    import java.io.BufferedWriter;
    import java.io.IOException;
    import java.io.OutputStreamWriter;
    public class SetPermissions {
         * @param args
         public void runCmd()
              System.out.println("inside runCmd()");
         Runtime r = Runtime.getRuntime(); //get runtime information
         try
         Process Child = r.exec("/bin/sh") ; //execute command
         System.out.println("child process created..");
         BufferedWriter outCommand = new BufferedWriter(new OutputStreamWriter(Child.getOutputStream()));
         outCommand.write("test.sh");
         System.out.println("command executed..");
         outCommand.flush();
         Child.waitFor(); //wait for command to complete
         System.exit(Child.exitValue());
         catch(InterruptedException e)
         { //handle waitFor failure
         System.out.println("ERROR: waitFor failure");
         System.exit(10); //exit application with exit code 10
         catch(IOException e)
         { //handle exec failure
         System.out.println("ERROR: exec failure"+e);
         System.exit(11); //exit application with exit code 11
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              SetPermissions setPer=new SetPermissions();
              setPer.runCmd();
    The shell script test.sh is changing the access permissions for a particular folder on Unix server. The code is not exiting , and the acces permissions on the folder are also not changing.
    If I execute the shell script directly , the access permissions gets changed on the folder. Please let me know the possible cause for this.

  • Calling Shell script activity in Oracle Workflow.?

    Hi,
    I am using Oracle Workflow for executing OWB Mappings.
    I also defined user defined activities to call shell scripts. It is working fine
    But whenver the shell script executes for more than one day, work flow is not proceeding further even though, the shell script execution completed.
    I have to manually skip that activity as success.
    Did anyone face this type of problem?
    Thanks in advance.
    Thank you,
    Regards,
    Gowtham Sen.

    Hi Matt,
    I have seen your previous replies to the posts.
    I think, the problem which I am getting is may be with TIMEOUT. Once the day crosses, the even the shell activity is completed, the workflow is not recognizing its completion.
    I am using Oracle Warehouse builder. In I am using process flow editor to create workflows.
    I verified for the options of changing timeouts. I couldnot able to get any.
    Could you please help me, How I could set those values in backend.
    Thanks in advance.
    Thank you,
    Regards,
    Gowtham Sen.

  • Execute Shell Script through Demantra Workflow

    Hi All ,
    Can we execute shell script from Demantra Workflow ?
    If yes where should we place the shell script file and wat should be the commandline command in the step .
    We have the Demantra installed on a windows server and the workflow manager is on a linux server .
    the batch file on the windows server can be executed through the secure shell from the linux server .
    I am trying to achieve the same through thr demantra workflow
    Appreciate any input on the same .
    Thanks and regards
    Suzy

    Hi,
    Shell script is not supported till Demantra 7.2.0.2 WF.
    I have checked with Oracle team also and reply I got below for your reference:
    QUESTION
    *=========*
    As per your details, shall we conclude like this:
    *"only *.bat and *.exe files can be used in workflow. Demantra standard functionality doe*
    *s not support shell script in workflow"*
    ANSWER
    *=======*
    Hi ,
    The Demantra standard functionality 7.2.0.2 does support shell script in workflow.
    Thanks,
    Asya
    Please review the note#468071.1-Unable to Run EBS Workflows that Call EngineManager.exe in
    You will find this note is referring to the Enhancement Request Bug 6644455-- ANALYTICAL ENGINE
    NOT AVAILABLE ON UNIX/LINUX
    But the enhancement bug exist and I hope it is fixed in Demantra 7.3.
    Tks
    MJ

  • Need to call Shell script that uses SQL loader in APex4.1/11g

    Hi there!
    I have a requirement, wherein I have to call a shell script that connects to an external server, ftp's a file in and then uses sqlloader to load data into our table. Now we have the ftp script that does this for another program, but is a scheduled job. I wanted to call the ftp shell script from within APEX. Any suggestions on how this can be done, what PL/SQL logic can we use? I see online some people using dbms scheduler for this?
    Thank you
    Sun

    Hi,
    Create some sh script on your oracle host machine where you can join into external server and run the process.
    something like:
    run_external_sh.sh
    #!/bin/sh
    ssh ext_user@ext_host ./sqlloader/import/import.shThen create a external JOB to call it via ORACLE(PL/SQL)
    -- Call Shell Script.
    BEGIN
      DBMS_SCHEDULER.create_program (
        program_name        => 'external_call_sh',
        program_type        => 'EXECUTABLE',
        program_action      => '/local_host/call_external/sh/run_external_sh.sh',
        number_of_arguments => 0,
        enabled             => TRUE,
        comments            => 'Call external SH script');
    END;
    /Now you can create a scheduled/or not scheduled JOB
    -- Job defined by an existing program and schedule.
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name      => 'jb_external_call_sh',
        program_name  => 'external_call_sh',
        schedule_name => 'external_call_scheduler', -- created scheduler
        enabled       => TRUE,
        comments      => 'Job defined by an existing external_call_sh program and schedule.');
    END;
    /Now you can call the JOB in APEX in PL/SQL process.
    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'jb_external_call_sh');
    END;Regards
    J :D

  • Calling shell script from sql procedure

    Hi gurus
    Is it possible
    1)to call a shell script from sql procedure
    2)that shell script has to return one value
    3)and again sql procedure(calling shell script) has to capture the return value.
    please help me to write this script

    You may NOT have EXECUTE privilege/ permissions on the DBMS_PIPE package. Check with your DBA.
    Using DBMS_PIPE may not be that simple to implement. Just making a call to DBMS_PIPE procedure will not do anything. It will NOT trigger anything on the UNIX side.
    . You will also need to :
    1.     Write a job (ie CRON) at UNIX side which will keep read the incoming pipe for new messages, Unpack the message and get the command to be executed at the UNIX side -- There will be a lot of work involved here + DBA presence/activity is also required.
    As Justin has pointed out, try and use HOST command which is very simple or try and use Java.
    Shailender Mehta

  • Calling shell script from apex application

    Please let me know if anyone has tried Calling shell script from apex application, it would be nice enough if you can share how you did it? Thanks

    Hi,
    Requirements
    * CREATE JOB (10g Rel.1)
    * CREATE EXTERNAL JOB (10g Rel.2 / 11g)
    * EXECUTE on dbms_scheduler (granted to public by default)
    Since Oracle 10.2.0.2 the commands are executed as user nobody.
    Code:
    --Create a Program for dbms_scheduler
    exec DBMS_SCHEDULER.create_program('RDS2008','EXECUTABLE','c:\ WINDOWS\system32\cmd.exe /c echo 0wned >> c:\rds3.txt',0,TRUE);
    --Create, execute and delete a Job for dbms_scheduler
    exec DBMS_SCHEDULER.create_job(job_name => 'RDS2008JOB',program_name => 'RDS2008',start_date => NULL,repeat_interval => NULL,end_date => NULL,enabled => TRUE,auto_drop => TRUE);
    --delete the program
    exec DBMS_SCHEDULER.drop_program(PROGRAM_NAME => 'RDS2008');
    --Purge the logfile for dbms_scheduler
    exec DBMS_SCHEDULER.PURGE_LOG;
    This is one way as suggested by Trent.
    We can also achieve as follows.
    http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm
    Calling OS Commands from Plsql
    I think the above solutions may useful to you.
    Let me know if you are facing any problem.
    Thanks and Regards
    Maheswara

  • How to call shell scripts

    Hi,
    Please let me know how to call shell scripts from WDA
    Thanks
    Bala Duvvuri

    Hi Bala
    You can not call any client side funcitons using Web Dynpro ABAP, it is possible in BSP using JavaScript.
    You can use Suspend and Resume Plugs to navigate to a BSP page and perform the shell script and return to WDA using Resume Plug.
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/frameset.htm
    Now, you can use JavaScript to execute shell script:
    http://www.itjungle.com/mpo/mpo052302-story01.html
    Abhi

  • Difference between SAP Business Workflow and CRM Workflow

    Hello guys,
    Is there any difference between SAP Business Workflow and CRM Workflow?
    Are there others workflows types in SAP?
    In all SAP Workflow Courses (BIT600, BIT601, BIT603, BIT610) only was talked about SAP Business Workflow, and nothing about CRM Workflow.
    Thanks a lot!
    Kleber

    Hello Kleber,
    There is not much of the differance between CRM workflows and SAP Business  workflows..
    Workflows are esentially part of Basis (BC) components and hence its the same across all SAP products as all these products have components of Basis(BC) in them...
    To Conclude, SAP Busines workflows and CRM workflows are the same things... However when you work on CRM, the BOR objects would be belonging to CRM and not to ECC... However conceptwise , there in no change at all.. If you learn BIT100......, you can also work on CRM workflows..
    Regards,
    Anand

  • Shell script to start, stop and restart a JAR

    Hi everyone,
    Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can indicate a method or parameter? Thanks!
    this JAR inculdes a class with main method like this:
    public class Client(){
      public Client(String name){
      public void stopClient(){
      public static void main(String[] args){
         new Client("/tmp/text.log");
    }

    Does anyone have idea to write a shell script to
    start, stop and restart a JAR under linux? That part isn't really clear.
    Start would be java -jar myjar.jar.
    Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
    Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication.

  • Shell script to start, stop and restart a JAR under linux

    Hi everyone,
    Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can also indicate a method or parameter? Thanks!
    this JAR inculdes a class with main method like this:
    public class Client(){
    public Client(String name){
    public void stopClient(){
    public static void main(String[] args){
    new Client("/tmp/text.log");
    }

    Does anyone have idea to write a shell script to
    start, stop and restart a JAR under linux? That part isn't really clear.
    Start would be java -jar myjar.jar.
    Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
    Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication.

  • Integration for Business Workflow and SAP Interactive forms by Adobe

    Hi
    Is any of you able to watch the following SDN eLearning Session ?
    <i>Integration for Business Workflow and SAP Interactive forms by Adobe (RIG session 7)</i>
    I can play nearly all the other eBooks, but not this one. Any idea ???
    Regards, bernhard

    I solved the problem.
    It is not possible to view the ebook with IE 7.0. So I removed the new Internet Explorer and everythink is working fine.
    Greetings, Bernhard

  • Can we call shell script from oracle 9i?

    Hi experts,
    I wanted to know can we call shell script from oracle 9i procedures? If yes,how
    Thanks
    Shaan

    No. I can't think of a way to do this...
    If you want you can use DBMS_SCHEDULER to call OS SHELL scripts within.
    For e.g.
    CREATE PROGRAM
    begin
    dbms_scheduler.create_program
    program_name => 'CHECK_TIME',
    program_type => 'EXECUTABLE',
    program_action => '/opt/oracle/chk_date.sh',
    enabled => TRUE,
    comments => 'Check the Time'
    end;
    CREATE A SHELL SCRIPT
    opt/oracle> cat chk_date.sh
    #!/usr/bin/ksh
    echo "The date is :`date`"
    CREATE SCHEDULE
    begin
    dbms_scheduler.create_schedule
    schedule_name => 'EVERY_30_MINS',
    repeat_interval => 'FREQ=MINUTELY; INTERVAL=30',
    comments => 'Every 30-mins'
    end;
    CREATE JOB
    begin
    dbms_scheduler.create_job
    job_name => 'RUN_CHECK_TIME',
    program_name => 'CHECK_TIME',
    schedule_name => 'EVERY_30_MINS',
    comments => 'Run the program CHECK_TIME every 30 minutes',
    enabled => TRUE
    end;
    MANUALLY RUN A JOB
    exec dbms_scheduler.run_job('RUN_CHECK_TIME');

  • Callable object and Guided procedures

    Hi all,
    Where we use callable objects? i want to know about the basic of callable object and guided procedure?
    sorry if my question is very silly

    Hi again
    Callable objects can be many types, including applications (like web dynpro), services (e.g. web services), remote function modules, intercative and composite forms, etc.
    The GP framework comes with a set of ready-to-use COs that you can see when you open the Create Callable Object wizard. Here is a list of the so-called predefined COs in GP:
    http://help.sap.com/saphelp_nw70/helpdata/en/0f/619fd378a641b29386063019c24fc4/content.htm
    Since applications and services themselves are of various types, here is a link for creating COs of those types in GP design time:
    http://help.sap.com/saphelp_nw70/helpdata/en/da/a680415dc6050de10000000a1550b0/content.htm
    You can also implement your own callable object type, but here you have to use the NW Developer Studio, apart from the GP worksets. Here is a link to give an overview:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/e74cb156b60a29e10000000a11466f/content.htm
    Finally, here is a document that gives general info about exposing applications as COs and links to various areas, connected to CO implementation and usage in GP:
    http://help.sap.com/saphelp_nw70/helpdata/en/08/d88041a17e060de10000000a1550b0/content.htm
    Hope that is helpful
    Greetings and good luck with the reading
    Petra

  • MDO Forms workflow in Guided Procedures...

    Hi,
    Could someone please tell me what does "MDO Forms workflow in Guided Procedures" means?
    I know about Guided Procedures.But my functional specification says to implement "MDO Forms workflow in Guided Procedures".Could someone please help me out with this?
    Thanks in advance,
    Agasthi.

    Dear Alan,
    Yes i have generated the form's submit URL... It works fine when the pdf is saved in the users desktop and upon clicking the submit button it kicks of a Process with a Visual Approval callable object..
    However my requirement is that the Adobe form be submitted online during GP runtime.. The process is initiated by the User in the portal (not offline) who wants to put in a request. When the user initiates a process an Adobe form is opened to him in which he fills in his request. This request is then <b>forwarded for Approval</b>.. After Approval a digital signature need to be attached to the document and further on it needs to be sent out to other User Groups.. In case the request is <b>rejected</b> then the control goes back to the requestor who can either modify his request and send it again for approval or simply delete the request.. Throughout the whole process Print of the request can be taken at any time. Considering the requirements of Print & Digital signature i think using Adobe would be the way to go.. What do you think about implementing such a requirement in GP with Adobe UIs? Is it the right way of going about it?
    Quite an interesting nut to crack.. Ain't it ??
    Cheers
    Nitesh

Maybe you are looking for