How to kill an instance process in BPM studio 6.0

Hi i'm Fabio.
I'm working on BPM Studio 6.0 and i need to complete a task.
I have an instance id process, and i need to create a new process in order to kill this istance id.
I read how to create a PAPI client (http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/papi/index.html?t=modules/papi/c_Writing_Your_First_Java_PAPI_Program.html) but it doesn't work for my purpose.
First of all, i understood that i have to follow these step:
* Import the required libraries.
* Create a process service.
* Create a process service session.
* Perform operations with PAPI.
* Close the process service.
Now, i'm working on my xpdl file and i'm using the Standard Module "Fuego" and my plan is to create a process servcie, a process service session and then operate with PAPI.
But using the PAPI module include in the BPM studio 6.0 i'm no able to load the library for the session import fuego.papi.ProcessServiceSession;
so i'm worng something. Could you tell me how can menage this problem? Really do i need a session? Is possible to abort an istance process in BPM studio or i need to load my ear project in Enterprise environment and then kill my instance process? Thanks, regards Fabio.

Thanks Dan, i read your suggestion but my boss was to implement a different solution:
package hp.abort.process;
import fuego.boot.*;
import fuego.papi.CommunicationException;
import fuego.papi.InstanceInfo;
import fuego.papi.InstanceId;
import fuego.papi.ProcessService;
import fuego.papi.ProcessServiceSession;
import fuego.papi.OperationException;
import java.util.Properties;
import javax.transaction.*;
import java.lang.Exception;
public class AbortProcess {
public static void main(String[] args) {
/////////////////// API Initialization ///////////////////
Properties configuration = new Properties();
configuration.setProperty(ProcessService.DIRECTORY_ID, "default");
configuration.setProperty(ProcessService.PROJECT_PATH, "C:/Documents and Settings/Administrator/AlbpmWorkspace/EarOMatic");
configuration.setProperty(ProcessService.WORKING_FOLDER, "C:/tmp");
try {
ProcessService processService = ProcessService.create(configuration);
/////////////////// Establish a session ///////////////////
ProcessServiceSession session = processService.createSession("adminEarOMatic", "adminEarOMatic", "localhost");
/////////////////// Operate with PAPI ///////////////////
for (String processId : session.processesGetIds()) {
System.out.println("\n Process: " + processId);
for (InstanceInfo instance : session.processGetInstances(processId) ) {
System.out.println(" -> " + instance.getId());
System.out.println("ActivityName -> " + instance.getActivityName());
System.out.println("ActivityId -> "+ instance.getActivityId());
//Problema: nn vuole ActivityId ma Process Id
session.activityAbort("/CreateEurekaSRService#Default-1.0/eomWait","/CreateEurekaSRService#Default-1.0/1/0@EarOMatic");
/////////////////// Close the session ///////////////////
session.close();
/////////////////// Release API Resources ///////////////////
processService.close();
} catch (CommunicationException e) {
System.out.println("Could not connect to Directory Service");
e.printStackTrace();
} catch (OperationException e) {
System.out.println("Could not perform the requested operation");
e.printStackTrace();
Now, i got the following exception:
Local folder C:/tmp\system\Schema-4154784351820594721\catalogs found.
Loading catalogs from local folder: C:/tmp\system\Schema-4154784351820594721\catalogs
0 jars found locally.
[CatalogMgrCache] =======================
Registering CatalogMgr [EarOMatic] ...CatalogManagerCache 10390580:
Managers:
Counters:
[CatalogMgrCache] =======================
CatalogMgr [EarOMatic] REGISTERED!CatalogManagerCache 10390580:
Managers:
{EarOMatic=fuego.util.LocalCatalogManager@106df95}
Counters:
Process: /AbortInstanceProcessService#Default-1.0
Unreachable Engine Tolerance (seconds):
by default: 0
to be used: 0
This papi client will not cache exceptions which imply that an engine could not be reached.
Changing InstanceCache Entry[processId=/AbortInstanceProcessService#Default-1.0, state=0] to 3
Changing InstanceCache Entry[processId=/AbortInstanceProcessService#Default-1.0, state=3] to 2
Process: /CreateEurekaSRService#Default-1.0
Changing InstanceCache Entry[processId=/CreateEurekaSRService#Default-1.0, state=0] to 3
Changing InstanceCache Entry[processId=/CreateEurekaSRService#Default-1.0, state=3] to 2
-> /CreateEurekaSRService#Default-1.0/1/0
ActivityName -> eomWait
Adding local catalog for project: 1
ActivityId -> /CreateEurekaSRService#Default-1.0/eomWait
Exception in thread "main" fuego.server.exception.InvalidIdRuntimeException: Invalid identification.
Detail:Invalid identification (Identification value: /CreateEurekaSRService#Default-1.0/eomWait)
     at fuego.server.ActiveProcessImpl.getActivity(ActiveProcessImpl.java:632)
     at fuego.server.execution.microactivity.AbstractProcessExecutionHandler.getExecutableActivity(AbstractProcessExecutionHandler.java:58)
     at fuego.server.AbstractProcessBean.abortActivity(AbstractProcessBean.java:3262)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
     at fuego.lang.JavaObject.invoke(JavaObject.java:227)
     at fuego.component.Message.process(Message.java:587)
     at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:778)
     at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:753)
     at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
     at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
     at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:248)
     at fuego.component.ExecutionThread.work(ExecutionThread.java:837)
     at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
     at fuego.component.CustomExecution.next(CustomExecution.java:172)
     at fuego.component.ExecutorClient.invoke(ExecutorClient.java:118)
     at fuego.papi.impl.rmi.ProcessControlProxy.abortActivity(ProcessControlProxy.java:407)
     at fuego.papi.impl.rmi.ProcessControlProxyWrapper.abortActivity(ProcessControlProxyWrapper.java:683)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at fuego.papi.impl.AbstractProcessControlHandler.invokeInternal(AbstractProcessControlHandler.java:72)
     at fuego.papi.impl.rmi.RMIProcessControlHandler.invoke(RMIProcessControlHandler.java:165)
     at $Proxy23.abortActivity(Unknown Source)
     at fuego.papi.impl.ProcessInstanceOperation.abortActivity(ProcessInstanceOperation.java:726)
     at fuego.papi.impl.ProcessServiceSessionImpl.activityAbort(ProcessServiceSessionImpl.java:184)
     at hp.abort.process.AbortProcess.main(AbortProcess.java:45)
Caused by: fuego.metadata.exception.InvalidIdException: Activity '/CreateEurekaSRService#Default-1.0/eomWait' was not found in process '/CreateEurekaSRService#Default-1.0'.
     at fuego.metadata.Process.getActivity(Process.java:261)
     at fuego.server.ActiveProcessImpl.getActivity(ActiveProcessImpl.java:629)
     at fuego.server.execution.microactivity.AbstractProcessExecutionHandler.getExecutableActivity(AbstractProcessExecutionHandler.java:58)
     at fuego.server.AbstractProcessBean.abortActivity(AbstractProcessBean.java:3262)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
     at fuego.lang.JavaObject.invoke(JavaObject.java:227)
     at fuego.component.Message.process(Message.java:587)
     at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:778)
     at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:753)
     at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
     at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
     at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:248)
     at fuego.component.ExecutionThread.work(ExecutionThread.java:837)
     at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
I understood that tha activity id's format is not valid, but i obtained it just using the following function: instance.getActivityId()
Are you abel to give me some suggestion? Is it good this method to kill instance?
Thanks a lot, regard Fabio.

Similar Messages

  • BPEL Process in BPM Studio

    Hello,
    First, are there any examples, tutorials, or documentation on how to create and run a BPEL process within BPM Studio (5.7) ?
    I've gotten quite a ways by trial and error, but am having trouble running / testing out the process.
    I've tried doing a Process->Generate Process Interface and Process->Run but nothing happens in BPM Studio when these are performed. What else do i need to do to test out my BPEL process with external webservice ?
    Here's the steps i've taken so far.
    1. Developed a simple external webservice with netbeans (JAX-WS).
    2. Generated WSDL and XSD with wsgen executable.
    3. Developed WSDL & XSD for BPEL Process request & reply.
    4. Created a new project within BPM Studio.
    5. Created a new module under "Catalog" for wsdl introspection.
    6. Cataloged webservice component with local wsdl/xsd files.
    7. Configured the Server configuration generated under the "External Resources" to point to the webservice host.
    8. Configured the web service under "External Resources" to point to the webservice endpoint on the host (Server configuration)
    9. Created a new BPEL Process.
    10. Created new Instance variables for the process input and output as "component" type that point to the introspected request & response types.
    11. Assigned the port type & method of the BPEL Receive to the introspected service defined in #3.
    12. Assinged the input variable to the request variable created in #10.
    13. Assigned port type & method & output variable to the BPEL reply.
    14. Created a BPEL Invoke node between Request & Reply.
    15. Assigned port type & method on the Invoke node to instrospected web service defined in #2.
    16. Created instance variables for input & output of invoke node based on introspected request & reply
    17. Assigned input & output.
    Once all of this was complete, doing a Process->Check Design yeilded no errors or warnings.
    Thanks for any help,
    Chris

    Hello,
    First, are there any examples, tutorials, or documentation on how to create and run a BPEL process within BPM Studio (5.7) ?
    I've gotten quite a ways by trial and error, but am having trouble running / testing out the process.
    I've tried doing a Process->Generate Process Interface and Process->Run but nothing happens in BPM Studio when these are performed. What else do i need to do to test out my BPEL process with external webservice ?
    Here's the steps i've taken so far.
    1. Developed a simple external webservice with netbeans (JAX-WS).
    2. Generated WSDL and XSD with wsgen executable.
    3. Developed WSDL & XSD for BPEL Process request & reply.
    4. Created a new project within BPM Studio.
    5. Created a new module under "Catalog" for wsdl introspection.
    6. Cataloged webservice component with local wsdl/xsd files.
    7. Configured the Server configuration generated under the "External Resources" to point to the webservice host.
    8. Configured the web service under "External Resources" to point to the webservice endpoint on the host (Server configuration)
    9. Created a new BPEL Process.
    10. Created new Instance variables for the process input and output as "component" type that point to the introspected request & response types.
    11. Assigned the port type & method of the BPEL Receive to the introspected service defined in #3.
    12. Assinged the input variable to the request variable created in #10.
    13. Assigned port type & method & output variable to the BPEL reply.
    14. Created a BPEL Invoke node between Request & Reply.
    15. Assigned port type & method on the Invoke node to instrospected web service defined in #2.
    16. Created instance variables for input & output of invoke node based on introspected request & reply
    17. Assigned input & output.
    Once all of this was complete, doing a Process->Check Design yeilded no errors or warnings.
    Thanks for any help,
    Chris

  • Infinte loop is going on how to kill the instance

    Hi friends
      In leave workflow instead of wait step i added loop and a condition container when wait step condition is put inside the conditional container and loop is set a flag when set a flag come out of the loop. The condition inside the condational container is REQ.Status = posted. But this condition is met. But still the loop is going on. I have generatated new version and deleted all the old version. Still loop is on. I also tried swwl and deleted the 1st workitem of the workflow. But still the instance is on. How to delete or kill  the instance. This is the problem in development.
    Regards
    vijay

    Hi vijay kumar,
    Yes, you are correct, since the endless loop will be procesed by the background user, it may or may not be displayed in SM50.
    The other way to kill the process is.
    1. go to sm12 with the user id wf-batch delete the running section and immediately do the process with reddy has informed you.
    Thanks and Regards
    Balaji K.

  • How to start a new process in BPM

    There are many ways to start a new process in BPM.However I was wondering whether there is any specific way to kick off an instance in the process with the help of PAPI from external systems.I would be thankful if someone could advise.

    Check the PAPI Javadoc & Samples in the [enterprise_install_dir]/client/papi/ directory.
    Basically, you must:
    a) create a Process Service object
    service = ProcessService.create(properties);
    b) create a PAPI session with a participant
    session = service.createSession(user, pass, "localhost");
    c) create an instance:
    instance = session.createProcessInstance("/Orders", "BeginIn", arguments);
    d) destroy the session
    session.close();
    Hope this helps!
    Fernando

  • How to create automatic timer process in BPM?

    Can anyone tell me how to create an automatic timer process in BPM?
    Can I just create an manual process, and drag the timer event into the swam lane, can connect the timer to the service and then to the end event?
    Thank you

    Hi,
    You can make use of Global Automatic activity to kick off your process at a particular time. Place a Global Automatic activity in your process and right click on the Global Automatic activity and select Properties --> General --> Global Automatic Type: Automatic Schedule, Automatic Schedule: <Configure with your requirement>.
    Else you can make use of due transition/timer activity to get your task done.
    Bibhu

  • How to kill back ground processes?

    I had installed Amonitor app and it shows there are these 3 processes, poc-bbot, bash, cp running. It was never there. can anyone tell me how to kill it?

    Hi, thanks.
    Actually these 3 processes has never shows up. And yes, i was kill all the apps once i dont use them. my recently open bar is always empty.
    The reason why i has concern is my bat life is shorter when these 3 processes are running. It used to has this, so i restore to factory mode. then after awhile, these came back.

  • How to kill Forms Runaway Process using 95% CPU and running for 2 hours.

    We had a situation at E-Business Suite customer (using Oracle VM server) where some of Form processes were not being cleared by form timeout settings automatically.
    Also when user exits the form session from front end, the linux form process (PID) and DB session did not exit properly, so they got hung.
    They were spiking CPU and memory usage and causing e-business suite to perform slowely and ultimately causing VM host to reboot the production VM guest (running on Linux).
    We could see the form processes (PIDs) using almost 100% cpu with "top" command and running for a long time.
    Also we verified those Form Sessions did not exist in the application itself.
    ie. Using from Grid Control -> OAM-> Site Map -> Monitoring (tab) -> "Form Sessions".
    It means that we could safely kill that form process from Linux using "kill -9 <PID>" command.
    But that required a continuous monitoring and manual DBA intervention as customer is 24x7 customer.
    So, I wrote a shell script to do the following;
    •     Cron job runs every half an hour 7 days a week which calls this shell script.
    •     Shell script runs and tries to find "top two" f60webmx processes (form sessions) using over 95% cpu with 2 minutes interval.
    •     If no process is found or CPU% is less than 95%, it exits and does nothing.
    •     If top process is found, it searches for its DB session using apps login (with hidden apps password file - /home/applmgr/.pwd).
    a.     If DB session is NOT found (which means form process is hung), it kills the process from unix and emails results to <[email protected]>
    b.     If DB session is found, it waits for 2 hours so that form process times automatically via form session timeout setting.
    It also emails the SQL to check the DB session for that form process.
    c.     If DB session is found and it does not timeout after 2 hours,
    it kills the process from unix (which in turn kills the DB session). Output is emailed.
    This are the files required for this;
    1. Cron job which calls the shell script looks like this;
    # Kill form runaway process, using over 95% cpu having no DB session or DB session for > 2hrs
    00,30 * * * * /home/applmgr/forms_runaway.sh 2>&1
    2. SQL that this script calls is /home/applmgr/frm_runaway.sql and looks like;
    set head off
    set verify off
    set feedback off
    set pagesize 0
    define form_client_PID = &1
    select count(*) from v$session s , v$process p, FND_FORM_SESSIONS_V f where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='&form_client_PID';
    3. Actual shell script is /home/applmgr/forms_runaway.sh and looks like;
    # Author : Amandeep Singh
    # Description : Kills runaway form processes using more than 95% cpu
    # and Form Session with no DB session or DB session > 2hrs
    # Dated : 11-April-2012
    #!/bin/bash
    . /home/applmgr/.bash_profile
    PWD=`cat ~/.pwd`
    export PWD
    echo "`date`">/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR1=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID1=`echo $VAR1|awk '{print $1}'`
    CPU1=`echo $VAR1|awk '{print $2}'`
    TIME1=`echo $VAR1|awk '{print $3}'`
    PROG1=`echo $VAR1|awk '{print $4}'`
    PID_1=`echo $VAR1|awk '{print $5}'`
    CPU_1=`echo $VAR1|awk '{print $6}'`
    TIME_1=`echo $VAR1|awk '{print $7}'`
    PROG_1=`echo $VAR1|awk '{print $8}'`
    echo "PID1="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    echo "PID_1="$PID_1", CPU%="$CPU_1", Running Time="$TIME_1", Program="$PROG_1>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    sleep 120
    echo "`date`">>/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR2=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID2=`echo $VAR2|awk '{print $1}'`
    CPU2=`echo $VAR2|awk '{print $2}'`
    TIME2=`echo $VAR2|awk '{print $3}'`
    PROG2=`echo $VAR2|awk '{print $4}'`
    PID_2=`echo $VAR2|awk '{print $5}'`
    CPU_2=`echo $VAR2|awk '{print $6}'`
    TIME_2=`echo $VAR2|awk '{print $7}'`
    PROG_2=`echo $VAR2|awk '{print $8}'`
    HRS=`echo $TIME1|cut -d: -f1`
    exprHRS=`expr "$HRS"`
    echo "PID2="$PID2", CPU%="$CPU2", Running Time="$TIME2", Program="$PROG2>>/tmp/runaway_forms.log
    echo "PID_2="$PID_2", CPU%="$CPU_2", Running Time="$TIME_2", Program="$PROG_2>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    # If PID1 or PID2 is NULL
    if [ -z ${PID1} ] || [ -z ${PID2} ]
    then
    echo "no top processes found. Either PID is NULL OR CPU% is less than 95%. Exiting...">>/tmp/runaway_forms.log
    elif
    # If PID1 is equal to PID2 or PID1=PID_2 or PID_1=PID2 or PID_1=PID_2
    [ ${PID1} -eq ${PID2} ] || [ ${PID1} -eq ${PID_2} ] || [ ${PID_1} -eq ${PID2} ] || [ ${PID_1} -eq ${PID_2} ];
    then
    DB_SESSION=`$ORACLE_HOME/bin/sqlplus -S apps/$PWD @/home/applmgr/frm_runaway.sql $PID1 << EOF
    EOF`
    echo " ">>/tmp/runaway_forms.log
    echo "DB_SESSION ="$DB_SESSION >>/tmp/runaway_forms.log
    # if no DB session found for PID
    if [ $DB_SESSION -eq 0 ] then
    echo " ">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "Killed: `hostname -a` Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    # If DB session exists for PID
    if [ ${exprHRS} -gt 120 ]; then
    echo $DB_SESSION "of Database sessions exist for this forms process-PID="$PID1". But its running for more than 2 hours. ">>/tmp/runaway_forms.log
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo $DB_SESSION "of Database sessions exist for PID="$PID1" and is less than 2 hours old. Not killing...">>/tmp/runaway_forms.log
    echo "For more details on this PID, run following SQL query;">>/tmp/runaway_forms.log
    echo "-----------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "set pages 9999 lines 150">>/tmp/runaway_forms.log
    echo "select f.user_form_name, f.user_name, p.spid DB_OS_ID , s.process client_os_id,, s.audsid, f.PROCESS_SPID Forms_SPID,">>/tmp/runaway_forms.log
    echo "to_char(s.logon_time,'DD-Mon-YY hh:mi:ss'), s.seconds_in_wait">>/tmp/runaway_forms.log
    echo "from v\$session s , v\$process p, FND_FORM_SESSIONS_V f">>/tmp/runaway_forms.log
    echo "where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='"$PID1"' order by p.spid;">>/tmp/runaway_forms.log
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    fi
    else
    #if PID1 and PID2 are not equal or CPU% is less than 95%.
    echo "No unique CPU hogging form processes found. Exiting...">>/tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    If you have the same problem with some other unix and DB processes, the script can be easily modified and used.
    But use this with thorough testing first (by commenting out <kill -9 $PID1> lines.
    Good luck.
    Edited by: R12_AppsDBA on 19/04/2012 13:10

    Thanks for sharing the script!
    Hussein

  • How to kill a system process from java code.

    Hi,
    i need to kill or remove windows system process like cmd.exe from java code.
    like removing it from end process in task mgr.
    i tried below code but its not removed.
    is there a better way we can do this.
    killing a system process from java code will create any issues?
       public static void main(String[] args) throws Exception {
       String[] cmd = { "cmd.exe" };
       Process p = Runtime.getRuntime().exec(cmd);
       p.destroy();
    any suggestions or ideas are really appreciated.
    thanks.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • How to kill the apps process?

    Is my Yoga tab 2 1050F In this few weaks, after turn on the tab 2-3 hours, RAM has 500m onlyand cannot kill the apps process at all... WHY? Standby under than 24hours ... few weaks before that is 1 week standby times. I was turn on ALL power save function. WHY? I need help pls   Look at picture, Aweak has never stop.  Thx

    Hi
    If the process chain is running in background,
    goto <b>SM37</b>
    Give * in the jobname
    Give the username who scheduled the process chain
    Job status - check the check boxes - SCHED, relased, ready, active
    click <b>execute</b>.
    It displays all the process chains that, scheduled & running.
    You can select the process chain that need to be stopped & click STOP active job or ctrl+F1.
    Hope this helps!
    Kindly award points for all useful answers.
    If you post the BW related queries in the <b>BI general</b> forum, you will get more answers.
    Best regards,
    Thangesh

  • How to trigger Sequence of processes in BPM

    Hi!  I am trying to implement process sequencing with BPM.Its like i have to trigger a set of processes(say 1,2 &3 ) if certain flag in input msg is set.If the flag is not set then processes (1,2&4 ).
          the procecess should occur in a sequence like ..if 1 is completed then it should send ackgmnt and start the 2nd process.
    If any body has worked on similar scenario , please reply :).
    Srinivas
    Edited by: Srinivas Subramanyam Karnam on Jul 4, 2008 2:16 PM

    I tried using switch control to check the condition (particular element(say JV) in the input msg is 0or 1 ) .But donno how to get ack and based on ack how to start other process.
                 Let me take an example to make things clear.
    say  1st process is creation of batch No.
           2nd  -
    do -
    of sales order.
           3rd -
    do----
    of STO.
           4th -
    do----
    of SOD(SO dispatch).
    If JV element in input msg is 1 ...flow should be like(1->2->4) 
    create BatchNo-> get ack->
    if ack positive(:if ack Negative->end.)->create SO
    ->get ack->if ack positive(:if ack Negative->end.)->create SOD.End.
    If JV =0 say...then similarly 1->2->3 end.
    Not sure if i have to use  while loop .. new to bpm :).Request  to Reply with what controls to be used .
    with due thanks srinivas.:)

  • How to attach files in a Oracle BPM Studio process?

    Hi,
    I'm trying to design a process with some screenflows for entering information and I'm creating presentations for each screen. The thing is that I don't know if it's possible to have an attaching file option in the presentations or if I have to do it handcoding.
    Thanks everyone.

    You can use methods listed inside Fuego.IO, but they don't work if you run your process in a client, I mean not the server.
    You can use JSP or methods developed in java in order to upload your files and Fuego.IO methods to access them after you upload them.
    Another thing you should consider is that if you upload files using Fuego library, there's a size limit for files.
    Take a look on How to Use FileChooser on for Client files
    Hope this help.
    Pablo

  • How to kill a system process on terminal

    Be very careful when killing system process with this procedure, use it only if you really have no other choise:
    1- Open Terminal
    2- Type: top on the shell
    3- Find the number of the process you what to terminate Exp: If you what to kill NortonMiss it will be display like this:
    262 NortonMiss 0.0% 0:00.02 1 21 19 68K 540K 436K 27.5M
    4- You can't kill this process, is system protected, you need to logon as superuser, to do this, open an other window of the shell and type:
    sudo kill 262
    (the number of the process is different on each session, and depending on the application or process you what to terminate)
    5- You'll be ask for your password, type it and press enter, the app will be kill! (when typing the password, it will not be display on the screen). To cancel the kill press CTRL+Z
    NOTES:
    Some system process will reboot after they are killed, but this command is usefull if the process hang up, when is rebooted it will work again on most cases.
    A superuser have access to all the process and has no restriction on the use of commands on UNIX. Be sure not to reveal the password of your computer to anybody, because if they logon as superuser on your mac, they can deleted any folder.
    Use very caution on the use of the "sudo" command.
    iMac (Summer 2001) 600Mhz RAM=384MB Slot loading   Mac OS X (10.3.5)   CD-RW, 40 GB hard drive, Slot loading CD-RW

    Well, I only post this as one method, but I know that UNIX is a very flexible OS, so I'm sure there are more ways to kill a process, thanks for sharing them, and...
    NifflerX, Thanks! I didn’t know that one, but I also like the top command, 'cause I can see the process activity as I work, useful to know if the process still hang-up or all of the sudden goes back to life like a nosferatu... hehehe. By the way... all that people that just got their macs after a PC with.... agggghhh... Windows XP (sorry I say that)... you will find that the top command is the counterpart of the Process Viewer that shows up by pressing CTRLALTDEL on the ugly PC keyboard.
    Oh.,. And Daniel Macks, you can cancel the command with CTRL+Z when the prompt asks for your password, only at this point.
    Thanks for the extra tips everyone!
    iMac (Summer 2001) 600Mhz RAM=384MB Slot loading   Mac OS X (10.3.5)   CD-RW, 40 GB hard drive, Slot loading CD-RW

  • How to kill TP process at OS Level

    Dear ALL,
    How to kill the TP process at OS level
    Operating System : win 2003

    Q.1 Different Method for Kernel Upgradation
    So far till now, I have known only one method for Kernel upgradation which is very very simple. I dont think we need any other work-around for Kernel upgrade as this method is very very straight forward. The steps to be followed are ---
    Go to the SAP OSS Site :- 
    http://service.sap.com/SWCenter-Main
    From here Download the kernel programs in a temporary folder or use Download Basket toi download the Kernel.
    Now shutdown the R/3 database and all services including saposcol. 
    Create a folder and copy the original executables from  /exe/run/ directory then uncar the downloaded files and replace the original executables in /exe/run/ directory. 
    Then restart your system. 
    A couple of important points to remember are :-.
    a) Always make a copy of the files you're going to replace. For e.g. Create a directory (oldkern) and copy all the old files before replacing them (this helps when sometimes the new Kernel has problems, and you can revert it)
    b) You have to shutdown SAP and the Database using the OLD kernel file. Again it is good practice to shutdown everything first.
    Regards,
    Mandar

  • Instatiating BPM process through BPM 11g workspace

    Hi ,
    I am working on OPBM Sales Quote lab.
    I installed Oracle SOA 11g and set up the BPM SalesQuote demo. I followed the demo setup instructions to add the roles and match them to demo users. I was able to deploy the demo successfully using Jdeveloper. Since the start task for the demo is a none start, I am not sure how to initiate a new instance. I loged in to the workspace as jcopper who's role is the SalesRep (which is the swimlane for the non start task). However, I didn't see any application listed for jcopper. I also loged in as the process owner and didn't see any application listed for him either.
    I even referred to this thread
    How to initiate an instance of the BPM 11g SalesQuote demo?
    When I implemented the "Enter quote details" task, I even set its pattern as "Initiator"?
    Even then Under applications it is empty.
    Any Suggestions is appreciated.

    Hello All,
    Deployment of the "SalesQuoteDemo' demo is over. Logged in to BPM WorkSpace with user “jcooper” but I am not able to see application in the user's BPM Workspace. Verified all the users (and jcooper) and their role in Weblogic Default Realm and everything seems to be OK.
    I have deployed SalesQuoteDemo from this official link of Oracle and have followed all steps. Users/Groups have been created by running a demo seeding program given along with demo.
    http://www.oracle.com/technetwork/middleware/soasuite/samples-demos-084065.html
    I did these steps for verification.
    •     RAM/PermGenSpace seems to be OK and there is no error/exception related to memory.
    •     As per the demo, jcooper is part SalesRep role and it has been verified that both jcooper and SalesRep exists. Mapping also exists. Attaching few screenshots from Oracle Enterprise manager/BPM Workspace/Weblogic Console.
    •     As per the Baig, mentioned that this issue was resolved when new domain was created without webcenter. For me, new domain is somehow not working and deployment are getting failed/suspended/prepared status but I had taken out Webcenter related Managed Server from this Weblogic domain.
    •     Few have mentioned to login to Enterprise manager, select application, select security, role and map the user for every roles. I verified that this already exists.
    Any help/pointers in this regards would be highly appreciated.
    Thanks
    Sachin G

  • JSP Development in Oracle BPM Studio 10.3.1.0

    Does anyone have any instructions on how to install Eclipse WTP in Oracle BPM Studio 10.3.1.0? I'd like to figure out if its easier to develop forms using JSP files instead of using the forms builder.
    Is anyone else desiging forms using JSP files? How do you go about working with your jsp files?
    Thanks,
    Graham

    I use JSPs in my projects since it gives me alot more freedom.
    For example, I would like to use JSF tags, or use Javascript libraries to make AJAX calls, and always I want the JSP to have the look and feel of the brand of the company.
    There are challenges in using the JSPs however. The documentation for the JSP Tag Library doesn't have good examples, so you might have to figure stuff out on your own.
    I don't use WTP, although I've been meaning to install it. I've been using a text editor (notepad++) for the development of my JSPs.

Maybe you are looking for

  • How do I get my calendar info pushed to my iphone?

    I would like my calendar info or evenets pushed to my phone without using a sync cable. I had the option on the phone checked for icloud but the items never push over so I just turned the icloud calendar switch off and just sync it manually. Also any

  • Date and name stamp on the text

    Hi I am unable to get the name and date stamp after complete the text on a sales order and save it does any settings needs to be maintained to get this name and date stamp on the sales order text Thanks Mahesh

  • How to get account expiry date for Oracle Directory Server?

    I need to get the account expiry date for Oracle Directory server. Which attribute stores this value? Please let me also know the attribute type and how to fetch it. Thanks, Subrat

  • Embedded font - blurry quality

    I have embedded a font in flex3, with size of 8px, advanced antialiasing true, sharpness: 100. It is not rendered very clear. It seems to be a little bit blurry. Does anyone know if flex3 is rendering all of the fonts how they are? Or maybe the devel

  • 3D Dial Guage

    Hi Forum, Can anyone tell me how to change the limit of the arcs in the 3d Dial Gauge. I am able to change the color of the arc by changing "stroke" property. But i couldn't find any property to change the limit of the arcs. Also, i am able to put a