User Defined Activity Process Flow Help

Hello,
I'm trying to create a process flow that will rename a file. I'm using the User Defined Activity, but I've ran into a couple problems. First some background info, Oracle 10G is the DB, and it's ran on a Unix system, the Oracle user account does have read/write access to the directories used.
For the Activity Parameters I've set
Command > I've tried everything here
Parameter > Blank
Script >
filefullname=ip_xref.dat
filename=${filefullname%.*}
fileext=${filefullname##*.}
DATE=`date +%Y%m%d`
newfilename="${filename}_${DATE}.${fileext}"
mv $filefullname $newfilename
mv $newfilename backup/
in the command section, I've tried every possible thing I can think of from : /usr/bin/ksh, /bin/ksh, ksh, /bin/bash, made a script outside owb with the same thing, and pointed it at that and still all I get is "/bin/bash: not found" or "/usr/bin/ksh: not found"
Ideas/suggestions, I'm open to anything.
As a side note I tried to do it with UTL_FILE, but I was informed by our DBA that it was disabled for security, so that's out.

What type of execution is configured for user defined activity (this type is defined in file Runtime.properties on server side, available types for UDA - SCHEDULER or NATIVE_JAVA)?
For SCHEDULER type ask your DBA about Uinux user used for executing external jobs (usually nobody user used with very limited rights - maybe this user doesn't have rights for executing any program/scripts).
Regards,
Oleg

Similar Messages

  • User Defined Activity "hangs" Process Flow if it runs for more than 10mins

    I have been using OWB (10g r2) for a while and have used "User Defined" activities in production process flows successfully before.
    However my problem now is that the activity (shell command) I want to perform, takes more than 10 minutes to complete. If I run the process flow with a parameter that generates a shell command that executes in two or three minutes, the process flow continues past the sucessfully executed user defined activity to the next activity.
    BUT
    If I run the same process flow (without modification or even redeployment) with a different parameter , the user defined acivity sucessfully executes (after about 11 minutes or so) but the process flow , doesnt seem to know that it is finished and just says it is still executing.
    my "user defined" activity has
    COMMAND: /usr/bin/ksh
    PARAMETER_LIST bound to a variable which is set earlier in the process flow.
    RESULT_CODE:
    SCRIPT :
    SUCESS_THRESHOLD : 0
    by examining (RUNTIME CONTROL CENTER SCHEMA).all_rt_audit_execution_params
    I can see that the variable contents assigned to RESULT_CODE look like this
    '/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_SHORT'
    or this
    '/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_LONG'
    I put the -n in because I thought that may have been the problem, but I think its more likely that there is come sort of ".properties" in a runtime file that needs to be set to control the "timeout" of user defined activities.
    (like in Runtime.properties
    property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    except maybe
    .........Nativeexecution.timeout = .....?????
    Has anybody had a problem like this? Found a document describing available configuration properties for PF activites?
    Can anyone help?

    I have been using OWB (10g r2) for a while and have used "User Defined" activities in production process flows successfully before.
    However my problem now is that the activity (shell command) I want to perform, takes more than 10 minutes to complete. If I run the process flow with a parameter that generates a shell command that executes in two or three minutes, the process flow continues past the sucessfully executed user defined activity to the next activity.
    BUT
    If I run the same process flow (without modification or even redeployment) with a different parameter , the user defined acivity sucessfully executes (after about 11 minutes or so) but the process flow , doesnt seem to know that it is finished and just says it is still executing.
    my "user defined" activity has
    COMMAND: /usr/bin/ksh
    PARAMETER_LIST bound to a variable which is set earlier in the process flow.
    RESULT_CODE:
    SCRIPT :
    SUCESS_THRESHOLD : 0
    by examining (RUNTIME CONTROL CENTER SCHEMA).all_rt_audit_execution_params
    I can see that the variable contents assigned to RESULT_CODE look like this
    '/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_SHORT'
    or this
    '/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_LONG'
    I put the -n in because I thought that may have been the problem, but I think its more likely that there is come sort of ".properties" in a runtime file that needs to be set to control the "timeout" of user defined activities.
    (like in Runtime.properties
    property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    except maybe
    .........Nativeexecution.timeout = .....?????
    Has anybody had a problem like this? Found a document describing available configuration properties for PF activites?
    Can anyone help?

  • User defined activity problem in process flow

    Hi ,
    any one can help me out
    I have added a user defined activity in process flow , and given command values as \\windows\system32\cmd.exe
    and parameter list : ${input.value}
    and in script : kpi.bat
    where i written
    cd \kpi_sap
    for /f "tokens=1-5 delims=/ " %%d in ("%date%") do copy "c:\kpi_sap\kpi_sap.csv" %%e-%%f-%%g.dat
    but its not working ...
    can any one give me direction to get success in this activity
    best regards,
    mahi

    Hi Mahi,
    I see that your post is a few days old and you might have resolved this issue, but if you haven't you might want to change the command value to c:\windows\system32\cmd.exe instead. Its been a while since I worked with commands, but I remember that I had a lot of problems when I defined paths with '\\'. What I found out was that OWB jobs was run under the windows system account and the system account don't have access to networkshares (even if its really not on the network).
    I can't say whether the script in the kpi.bat is wrong, but as long as you can run it manually using cmd.exe you should be ok.
    If this doesn't help it might be helpful with some more specific error messages.
    regards Ragnar

  • How to configure "User defined" activity in a process flow

    I want to start a shell script from a workflow process in an Unix environment. I use owb 10.2.0.1
    Name of shell_script:           verify_infile.sh
    Location of shell_script:     /ASW/dw
    3 parameters to the script:     X X /local/db/import/rain/finans.dat
    First parameter is the letter X
    Second parameter is the letter X
    Third parameter is the path and file name I want to verify
    I assume it's the User defined activity I should use and the parameters of the user defined activity are as follows
    4 IN PARAMETERS
    COMMAND
    PARAMETER LIST
    SUCCESS THRESHOLD
    SCRIPT
    1 OUT PARAMETERS
    RESULT_CODE
    So my question is what shall I have as in parameters in the User defined activity?
    Kind regards
    Jan

    Here is the solution to the case
    First make sure parameter in (owb_home)\owb\bin\admin\Runtime.properties is not disabled.
    If it is, change the parameter to the value NATIVE_JAVA as described in the file:
    property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    Second
    COMMAND: /bin/sh
    PARAMETER LIST: ?/ASW/dw/verify_infile.sh?X?X?/local/db/import/rain/finans.dat?
    RESULT_CODE: 0
    SCRIPT:
    SUCESS_THRESHOLD: 0
    Regards
    Jan

  • User Defined Activity: Run OS Command with OS parameters

    OS: OELR5 U3 x64
    DB: 11.1.0.7
    OWB: 11R1
    I would like to be able to run an os command from a user defined activity within a process flow. I am trying to make use of VMWare's vmrun to control a virtual machine. From the OS command line I enter:
    /usr/bin/vmrun -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "[standard] VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
    How many I duplicate this OS command from within a user defined activity in a process flow?
    I create a user defined activity:
    COMMAND: /usr/bin/vmrun
    PARAMETER_LIST:
    RESULT_CODE:
    SCRIPT: -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "[standard] VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
    SUCCESS_THRESHOLD: 0
    The process runs without error in the log, but the os command is not being run.
    I tried again with:
    COMMAND: /usr/bin/vmrun
    PARAMETER_LIST: ?-T?server?-h?https://server:port/sdk?-u?user?-p userpassword?-gu?guest?-gp guestpassword?runProgramInGuest "[standard] VM/Virtual Machine.vmx"?-activeWindow?-interactive?"c:\path_to_program\program.exe"?/switch?
    RESULT_CODE:
    SCRIPT:
    SUCCESS_THRESHOLD: 0
    with the same result.
    And I also tried calling sh:
    COMMAND: bin/sh
    PARAMETER_LIST:
    RESULT_CODE:
    SCRIPT: /usr/bin/vmrun -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "[standard] VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
    SUCCESS_THRESHOLD: 0
    also with the same result.
    The process runs in each case, and ends with: "Log file is available", but when I look in the log, I don't see errors or any information that might help me adjust the user defined activity.

    This method works:
    COMMAND: bin/bash
    PARAMETER_LIST:
    RESULT_CODE:
    SCRIPT: /usr/bin/vmrun -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "standard VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
    SUCCESS_THRESHOLD: 0
    The issue seems to be caused on an upgrade to OWB 11R2. Our installation does not always update the VALUE entry when a user types in a value, meaning that our entry changes were not reflected into the deployed process package.

  • User Defined activity does not log messages

    I have created a User Defined activity which calls a unix shell script.
    This script writes messages to standrard output ("echo") that I want
    the process flow to catch in its log, so I can see the messages in
    Control Center Manager.
    This was actually the behaviour of my User Defined activity until recently.
    I must have changed, unintentionally, some parameter/configuration that
    I cannot remember. Maybe some "suppress script-messages" parameter? :-)
    Anyone in this forum who knows which paramater I might have changed
    and/or how I can get back the old behaviour of my activity?
    // Pontus

    I had the same experience recently: I was trying to log a message to a Unix file, but the process flow would always fail, even though the script executed well from the Unix prompt.
    The problem in my case was that redirection is not supported from within an OWB version 9.0.4 process flow. Once I eliminated the "echo My message > logfile" everything was fine. You can even keep "echo My message" with no redirection and it's still ok.
    The above holds regardless of where you put your script -- external Unix file, or as part of an "external process" icon in the flow.
    If things are the same in your case, you'll need to figure out an alternative way of logging messages when executing the script. I decided to use external files as flags, by renaming them from the script.
    Santiago

  • User Defined Module Processing

    Could some one send me the User Defined Module Processing Step By Step guide to
    [email protected]
    Thanks for your help.

    Hi,
    Are you talking about Adpter Modules ?
    If so , here is a guide from service.sap.com-
    https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202
    Regards,
    Moorthy

  • Problems with user-defined update-process

    Hi.
    I have a small problem in the right syntax in an user-defined updated process.
    The process is called by a button on the page and should update a record in a table.
    BEGIN
    UPDATE wam_mod_allocation SET
    alloc_assessment = V('P2120_ASSESSMENT'),
    last_update_date = LOCALTIMESTAMP,
    last_update_staff = V('APP_USER')
    WHERE username = V('P2120_USERNAME')
    AND module_id = V('P2120_MODULE_ID')
    END;
    This is the code of the process. The line with the problem is marked bold. P2120_USERNAME is a text field in the page and contains the username to be updated.
    The problem is, that the comparison doesn't work. the value "smith" is available in the table and is the same as in the text field. (both in lower case).
    If I replace the part V('P2120_USERNAME') with 'smith' (with single quotes), the update statement works properly.
    How do I have to compare the username with the item value that it works properly?

    1. Stephan
    2 + 3 Well. I enclosed both tags in the TRIM-Operator and it works. First, I thought, a whitespace caused the problems. To determine which value contains the whitespaces I removed the trim-tags on both sides. It works.
    It is quite funny, because,if I remove both tags, it works too? Well. Yesterday it didnt.
    To be on the safe side, I will include the trim-tags.
    Thanks very much.
    Stephan

  • Batch file execution using user defined activity

    Can anyone please explain me what is the structure of the user defined activity in order to execute batch file. I've read like 10 post about this problem in this forum but nothing seems to work. So to finally clear it out...
    I have simple batch file d:\test_dir\test.bat that has only one line in it "echo this is test>>test.txt"
    what should i put in the user defined activity setting?
    COMMAND = ?
    PARAMETER_LIST = ?
    RESULT_CODE = ?
    SCRIPT = ?
    SUCCESS_THRESHOLD = ?
    i have the setting in the runtime.properties file to:
    property.RuntimePlatform.0.NativeExecution.FTP.security_constraint = DISABLED
    property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.SQLPlus.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.OMBPlus.security_constraint = DISABLED

    Did you read this blog?
    https://blogs.oracle.com/warehousebuilder/entry/how_to_use_user_defined_activity_in_owb_process_flow
    What error do you get? Did you stop/start the runtime service after changing the parameter file?
    Cheers
    David

  • Problem with ALV and user defined selection screen. please help!

    Hi Experts,
           I have program which has a user defined selection screen 9001. On executing the selection screen i call a ALV using resuse_alv_grid function module.
    What problem I am facing is that when I press back button from ALV page it goes to the se38 editor instead of selection screen.
    How to resolve this?
    Thanks
    Gopal

    Hi,
    This might be due to LEAVE TO TRANSACTION statement. You might be running the program from SE38. Try to run the program using Z-TCode assigned to it.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was edited by: Bharat Reddy V

  • User defined packages in TOMCAT HELP PLEASE!!!!

    Hello all,
    I am have created a package (foo).
    I then tried to import it into a jsp but TOMCAT say the package foo
    doesn't exist. I have stored the class file for the foo package in the same root directory with the jsp file. I have I stored the class file in the wrong place.
    <%@ page import="java.util.*,foo.*"%>
    <%!
    ResourceBundle bundle = null;
    public void jspInit()
    bundle = ResourceBundle.getBundle("forms");
    %>
    <jsp:useBean id="formHandler" class="foo.FormBean" scope="request">
    <jsp:setProperty name="formHandler" property="*" />
    </jsp:useBean>
    <%
    if (formHandler.validate())
    %>
    <jsp:forward page="<%=bundle.getString(\"process.success\")%>/">
    <%
    }else{
    %>
    <jsp:forward page="<%=bundle.getString(\"process.retry\")"%>/>
    <%
    %>
    can anyone help PLEASE!!!!!!!!!!!!
    Rohan

    you should read the docs provided with tomcat showing where to put your classes!
    WEB-INF/classes !

  • Problems using user defined activitys in Process Flows

    Hi everybody,
    i have problems using an user defined activity in my owb process flow.
    I did the following according to https://blogs.oracle.com/warehousebuilder/entry/how_to_use_user_defined_activity_in_owb_process_flow.
    1. create a script in /tmp called test.sh
    2. chmod +x on the script so it can be executed
    3. Changed the Runtime.properties file under ORACLE_HOME/owb/bin/admin
    property.RuntimePlatform.0.NativeExecution.FTP.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.SQLPlus.security_constraint = NATIVE_JAVA
    property.RuntimePlatform.0.NativeExecution.OMBPlus.security_constraint = NATIVE_JAVA
    4. Creating an Process Flow with just the user defined activity
    5. Deploying the Process flow was successfull
    But everytime i execute the pf i get the following error in my Job Details.
    TEST_PF:USER_DEFINED                                        
    Parameters                                                  
    Log file is available. Click Information button to view.                                             
    It says Log file is available. But i can't find this file. Also i don't know what the problem is.
    Can anybody help me out of this?
    Thanks a lot

    Hi,
    solved the problem by myself.
    I had problems with my script. So i insert set -x into the script an executed the pf again. Know i can see whats happening in a log. You can find this log in the job detail window by pressing the blue ! Button when the whole PF (the first entry) is marked.
    Greetings

  • Using of user defined activities in process flow: issue

    Hi out there,
    there is a problem in my environment which I don't understand and which I want to share with you. Hopefully there is somebody who can help me.
    I have a user defined activity in my process flow with the following parameters (where <empty> means no value):
    COMMAND: C:\WINDOWS\system32\cmd.exe
    PARAMETER_LIST: <empty>
    RESULT_CODE: <empty>
    SCRIPT: C:\oracle\bise1\scripts\source_file.bat
    SUCCESS_THRESHOLD: 0
    The bat-file is containing the following:
    cd c:\oracle\bise1\owb\owb\bin\win32\
    ombplus.bat c:\scripts\source_files.tcl
    exit
    When I execute the bat-file in the cmd-shell manually it works perfect (the tcl-script copies and renames sourcefiles to naming conventions). But when I want to execute this from the process flow nothing happens. The process is running without reading the correct source files and therefore ends in errors.
    Is there anything wrong in the usage of the user defined activity? I prepared the runtime properly.
    Any help is appreciated. :-)
    Kind Regards,
    Jens

    Hi Detlef,
    thanks for the input. I tried it but then I get the following error message (in german) in the logfile of the process flow:
    "Der Befehl "chcp" ist entweder falsch geschrieben oder konnte nicht gefunden werden."
    My scripts don't contain letters in this combination. The scripts are working fine when I start them manually from the command shell. Is there maybe something else I need to consider? Is it possible to start omb tcl-scripts via this feature?
    Kind Regards,
    Jens

  • Activity Templates - User Defined

    Hi all,
    I want to execute a shell from a process flow. I have created a User Defined Activity as follows:
    COMMAND - #!/usr/bin/ksh
    PARAMETER_LIST -
    SUCCESS_THRESHOLD - 0
    SCRIPT - full path+shell_name (/folder1/folder2/file.sh)
    RESULT_CODE - 1
    I have added it in a process flow and I deployed it without errors. Then when I start the process flow it doesn't work and the Control Center doesn't provide me any information/log about the error.
    Could someone please help me on that?
    Thanks in advance!
    Castella.

    Also, note that OS calls are disabled by default in OWB for security reasons (shell, email, sqlplus). You can read the discussion about the parameters that need to be set to enable those activities here if you have not done so:
    Re: Manual Commit using Process Flows

  • Date parameter in a process flow

    Hi,
    I´m working with OWB 10.1.0.2.0.
    I have a process flow with a transform.
    The transform has a date parameter and I´ve defined a date parameter in the start activity, which is bound to the start parameter.
    If I try to pass a date parameter in this form, sysdate, the process doesn´t recognize it and in the all_rt_audit_execution_params table i can see that the param process has no value.
    If I pass a date parameter in this format 2006/08/07 the process works fine
    I need to pass the date parameter from start activity to the process activity using expresions with sysdate,
    may anyone help me? please and thanks
    beatriz

    Hi,
    there are several tasks you want to accomplish:
    1. "I need to check if the parameter file exists"
    Therefor OWB has the File Exists Activity (Process Flow). This one checks if a file exists with specified name on specified location. If so it returns with SUCCESS. If not, it returns a WARNING. In second case you should do a sleep for a while and then re-check.
    2. "accessing the date value from the parameter file"
    There will be several ways to do this. The easiest one may be, to declare a external Table on this file and simply select from it (use it as a source in your mapping)
    3. "After the ETL is finished running, the name of the parameter file needs to be changed"
    In your process flow you create a user defined activity. In this one you start cmd.exe (on windows) and execute any DOS-commands you like. In this case a move or rename.
    Hope I could help you...
    Bye,
    iOn.

Maybe you are looking for

  • Cut and paste not working in iphoto

    I can't cut and paste between events in iPhoto any longer.  i tried flagging a photo but the add flag item to event was grayed out. how can you move photos between events.  i tried dragging but page didn't scroll very well so was a little inefficient

  • Table/Function module to find description of SD document currency

    Hi, I have a specific requirement from my client. In the invoice output, we are presently displaying the invoice total value in words and the respective SD document currency against it (For ex: USD if sd document currency is USD, or GBP, EUR etc.). T

  • Web Service WSDL/URL not seen by Excel

    Hello, I have a BW function module with a web service created over it and I am trying to get this to connect to Excel 2003.(The web services tool kit is installed)  I can get Excel to see this web service: http://www.webservicex.net/WS/WSDetails.aspx

  • Command S doesn't work

    A few days ago my "Command S" function went kaput. I posted this question on the Craigslist Apple Discussion Forum and have already tried just about everything people have suggested but nothing works. I'm ready for the possibility of some fresh solut

  • Inspection lot not created

    Hi Experts, Inspection lot is not created after delivery even Billing no and Invoice no. has been generated. so we are not able to issue the Certificate of Analysis(COA). So plz help me to  understand this issue. Thank's in Advance. Regard's Olet Mal