Killing a sub process from it's parent process

does any one know if ther's a way of killing a sub process from it's parent process?

There are a few ways to do this depending on how the subprocess was invoked and if you are inside the parent work item instance or if you are using PAPI.
If you are not using PAPI, here's how you could abort the child work item instances spawned by a parent process's work item instance.
Asynchronously Spawned Children
If a child process was invoked using an asynchronous Process Creation activity, the work item instance in the parent has a predefined hash table variable called "children". Downstream of the parent's Process Creation activity (called "SpawnChildren" in the PBL logic below), you can get the child's instance id using the children hash table and use this to send a notification to a Message Wait activty in the spawned child process instance using logic like this:
send Notification
        using instanceId = children["SpawnChildren"],
              activityName = "TerminateChild",
              parameters = nullThe Message Wait activity needs to have its "Allows Interrupt" property checked in the child process. As you add this Message Wait activity (called "terminateChild" in the example above) make it an orphan with no transitions in or out initially. Once notified by the parent process, it still needs to be aborted so add a new Automatic activity in the child with this logic:
action = ABORTFinally, add a transition from the Message Wait activity in the child subprocess to the Automatic activity.
Synchronously Spawned Children
If all you know is the parent work item instance's id and the child subprocess was invoked using a synchronous SubFlow activity, you could send a notification to a Message Wait activity that has it's "Allows Interrupt" property checked in the parent. If the Message Wait activity flows to an Automatic activity, you could use logic like this to kill the child subprocess work item instances synchrously spawned by the parent:
for each ch in ProcessInstance.children do
    send Notification
        using instanceId = ch,
              activityName = "TerminateChild",
              parameters = null
end
action = SKIPSince the parent's instance was stuck in the Subflow activity, you'd need to send a notification to the parent's Message Wait activity in the parent process.

Similar Messages

  • How to invoke Bpel process  from java using 'bpel process WSDL'

    I want to call bpel process from java using bpel wsdl.
    could any one point me to any url/sample.
    Thanks
    Nagajyothy

    Hi Seshagiri,
    Thanks for providing links and initial steps to create web service proxy(using Jdeveloper 11g).
    I created a web service proxy.
    provided the needed inputs.
    when I ran the client app, bpel process(has a human task) got invoked but faulted with exception as below
    Operation 'initiateTask' failed with exception 'EJB Exception: : java.lang.ExceptionInInitializerError[[
         at oracle.tip.pc.services.common.ServiceFactory.getAuthorizationServiceInstance(ServiceFactory.java:147)
         at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:1159)
         at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:502)
         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:597)
    please help me in solving the above problem.
    Thanks
    Nagajyothy

  • Import a PDF from servlet into a process

    hi,
    I am invoking a Live Cycle Process from a servlet. I would like to send a prefilled PDF document as input to this process from the servlet(this process is used for verification of digital signature- right now the process takes the input PDF doc from livecycle repository). How do i implement this. can someone help me?
    Thanks
    kripa

    You should need the info you need on the LiveDoc web site.
    See http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000263.html.
    If you still have questions, then post them.
    Jasmin

  • Issue: Archiving and Deleting completed Processes  from GP Administration

    Hi
      IWe want to delete the completed processes from every users "Completed Processes' List.  For this ,
    In GP administration-> Archiving and Deleting-> Maintain Process templates->Global Settings,
        We set 1 day for completed tasks.
        So , after one day,will it remove all the completed processes  or only the processes which were completed after setting the Archiving in Global settings?
    How can I delete all the completed Processes?
    Thanks
    Smitha

    Hi Smitha,
    Basically, there are two ways in which you can delete processes in <b>GP administration-> Archiving and Deleting</b>:
    1. automatically, through the <b>Maintain Process Templates</b> option
    2. manually, through the <b>Begin Archiving</b> option - there you have to ignore the predefined settings and set a date before which you want to delete processes.
    You should delete manually all processes up to now that were not deleted by the automatic scheduling. After that, all newly completed processes should be deleted promptly as you have specified in the global settings.
    Make sure that you also perform the appropriate settings for the archive store and the home path.
    You can check the documentation at: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/be/67a53d874f46c4b9a25e6e7d16a243/frameset.htm">Process Archive Management</a>.
    Regards, Petja

  • How to get status of a sub process from the parent process.

    Hi,
    I want to get the status of a subprocess from the parent process (i.e. success or failure).
    How can I get this.
    Thanks in advance.
    Bye

    have a look at the workflow built-in vars:
    WF_ACTION_ERROR and WF_ACTION_RESULT or WF_CASE_RESULT
    WilfredS

  • Calling BPM Sub Process from another BPM Process - Stuck at Sub Process

    Hi
    JDeveloper 11.1.1.6, BPM 11.1.1.6, WLS 10.3.6
    I am trying to Call a BPM Process from another BPM Process. Both the processes are defined in the same BPM Project.
    Both the Processes have 'None' Start and End activities.
    The 'Parent Process' has a 'Call Activity' which calls the 'Sub Process'.
    The Sub process takes a parameter of payload object as input and returns output (also same payload object)
    I have passed the payload object from parent to sub process in the 'Data Associations'.
    The Start and End activities in the sub process also have the data associations set where I am passing the payload object from parent process to child process.
    When I run the process and see the Enterprise Manager console - Audit Trail / Flow tabs,
    Flow Tab - The progress of the process is showing only till the Calling of the sub process in the Parent Process. It does not show the Sub Process.
    Audit Trail Tab - Shows that the Sub Process is called but has not reached to the End of the Sub process.
    The audit trail does not have links to the sub process activities.
    I cannot see any exceptions as well in the audit trail.
    How can I find out why the process is stuck? Or what is going on in the process?
    Please let me know if my explanation is not clear?
    Thanks for any help
    Regards
    Sameer

    Thanks for replying.
    I have another Sub Process with Start and End events as Message Events and used Send Task and Receive Task (Implementation : Process Call) in the Main process to invoke the sub process asynchronously.
    Then, the Sub Process is shown in the 'Flow Trace' as child of the main process.
    In this particular one, I used 'Call Activity' to call the sub process.
    So the Audit trail is showing the sub process as a child.
    But what I was trying to say is that the audit trail did not have links to the entries in the 'Event' column (in Enterprice manager - instance window). (like Instance entered activity, Instance left activity etc).
    I was intending to use these links to see the payload information and try to debug if there is any problem with the code.
    The actual problem I was trying to say in the post is that, even after the user responds to the activity (User Task - Approval) in the Sub process,
    the audit trail is not proceeding further.
    In the Sub process definition, after the user task, there is End with none implementation.
    Hope it is clear now.
    Thanks and Regards
    Sameer

  • PAPI: Get processId of subflow process from Activity list of parent process

    Using PAPI or PAPI-WS how can I get the processId of the related process of a subflow activity?
    Specifically, I want to get the processId of all the subflow processes of a parent process provided I only have the parent process ID.
    For example, lets say my project has three processes with the following ID's:
    MainID1
    SubflowID1
    SubflowID2
    Assume my main process is MainID1 and that is only made up of two activities:
    1) a subflow activity that has SubflowID1 as the related process.
    2) a subflow activity that has SubflowID2 as the related process
    So in my case I need to get back "SubflowID1" and "SubflowID2" provided that initially I only know the ID of the main process MainID1.
    With PAPI/PAPI-WS I can get the list of activities of a process. So I can get back a list of two activities of type "SUBFLOW" for MainID1. However the activity object only gives me the ID of the activity itself and of the activity's parent process. It doesn't contain the ID of the subflow related process. Is there a way to do this?
    Please let me know if this needs further explanation. I know it's somewhat convoluted. Thanks!

    So you need a way to traverse through a process hierarchy even though instances may not be in the process? Sounds like you've created some type of recursive process topology and want to find related activities in the sub-process structure even though instances are not in the structure. If so, I've never seen a use case for this and so I wouldn't know how to do it. FindInstanceByFilter is your closest thing you have. But not having instances in the sub-processes to get information about the process hierarchy prohibits this. Perhaps you can plant tracer instances that you can normally filter out from normal work-flow. When you need to obtain a process hierarchy then you just look for these tracers.
    Interesting problem. Sorry I don't have a good answer.
    Edited by: Mark Peterson on Feb 18, 2010 6:08 AM

  • Ttrigger Event Sub-Process from Java code.

    Hi All,
    Is there any way to trigger Event Sub-Process from Java code.
    My requirement is to trigger an Event SubProcess when a Approver clicks on REJECT button in HUMAN TASK.
    One way of achieving this is by placing a gateway after the human task and by validating the human task outcome and there by triggering a call to Event SubProcess.
    But we dont want to put a gateway after the human task. But instead we would like to trigger the Event SubProcess from the ADF task forms itself. ie, by calling a JavaCode.
    Please give me some pointers on achieving this task.
    Thanks
    Parker.

    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 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();

  • Killing an exec'ed process from another thread

    Hi all,
    I written an application that executes some external OS - processes. There is a dispatcher thread, that starts the execution threads for some jobs. Every execution thread creates a Processes by calling runtime.exec(), adds this object to a TreeMap ( member of the dispatcher ), creates two threads for reading the output of the process ( sdtout & stderr ) and calls p.waitFor(). From this moment this thread is blocked. After the process is done, the results will be processed by this thread etc. Now I want to go ahead and let the application user kill the process. For them I let the dispatcher - thread, that has also a reference to the executed process to call destroy of it if necessary during the execution thread is blocked by waitFor() and two output threads are reading stdout & stderr. The problem is however that destroy() - call from another thread doesn't kill the subprocess. The subprocess is running until it's done or terminated from out of jvm. Have you an idea or example?
    Thanks a lot & regards
    Alex

    >
    I know you have been discussing your problem is that
    you can't kill a "sleep" process. But just to be
    sure, I tested your description by one thread exec-ing
    a "not-sleep" program, and then another thread had no
    trouble killing it.
    I took your code and wrote a program around it such
    that
    Thread1 :
    - creates a Job (but not a "sleep" job); creates a
    JobMap ; puts Job in JobMap
    - starts Thread2 (passing it JobMap)
    - sleeps 15 seconds
    - calls Job.kill() (your method)
    Thread2 :
    - gets Job from JobMap
    - calls Job.execute() (your method)
    It's quick and dirty and sloppy, but it works. The
    result is when the kill takes place, the execute
    method (Thread2) wakes from its waitFor, and gets
    exitValue() = 1 for the Process.
    so,
    In order to kill the sleep process, which (according
    to BIJ) is not the Process that you have from exec
    call, maybe the only way to kill it is to get its PID
    an exec a "kill -9" on it, same as you said you had to
    do from the commandline. I don't know if you can get
    the PID, maybe you can get the exec-ed process to spit
    it onto stdout or stderr?
    (I am on win, not *nix, right now, so I am just
    throwing out a suggestion before bowing out of this
    discussion.)
    /MelHi Mel,
    yes, it should work right on windows because you created probably the shell by cmd /c or something like this. If you kill the cmd - process, everithing executed by the interpretter will be killed too. My application is running on Windows and unix. On unix I have to execute the process from a shell ( in my case it is the born shell ). The problem is however, that the born shell has another behaviour as cmd and doesn't die. Do you have an idea how to get the pid of the process started by sh without command line? To kill the processes from the command line is exactly what my customers do now. But they want to get "a better service" ...:-)
    Regards
    Alex

  • Completely KILL the process from the OS - problem.

    Does anyone know how to completely kill/eliminate/dispose/ the main process from the OS.
    Here is the prob: my application runs smoothly. when I close it - it's being eliminated from the OS, however I found out that when I open a new window [from the main application] and updating something and then closing this particular window (with setvisable(false) / dispose() ) and QUITING the main application - the process still runs in the background.
    Is there a way to make sure that regardless of the open frames/dialog the process [main application] will completely 'die'?
    Thanks

    so simple and so elegant
    thanks, I feel like going back to CS101

  • Error message by periodic weekly: No output from the 1 file processed

    Hi there,
    since four weeks, I got a problem with the maintenance script periodic weekly. Up to December 22nd, the script did, what it should do: rebuilding the database of locate and whatis, rotating log-files. Since one week later, I got the error message: No output from the 1 file processed.
    Normally, I use Anacron to do the job. When I noticed the problem, I tried to start the script with Tinker Tool System getting the same result. Another try using the Terminal (sudo periodic weekly) also failed. The commands locate and whatis are working, locate.updatedb and makewhatis also. I'm running 10.4.8; in the past, I did not have such problems. Anyone with an idea or solution?
    Thanks
    Klaus
    MacBook Pro   Mac OS X (10.4.8)  

    Hi Gary,
    here is the output you were asking for:
    Last login: Thu Jan 25 20:03:55 on console
    Welcome to Darwin!
    DeepThought:~ dirk$ sudo /private/etc/periodic/weekly/500.weekly; echo $?
    Password:
    Sorry, try again.
    Password:
    Rebuilding locate database:
    Rebuilding whatis database:
    find: /usr/local/man: No such file or directory
    makewhatis: /usr/share/man/man1/fetchmailconf.1.gz: No such file or directory
    Rotating log files: ftp.log lpr.log mail.log netinfo.log ipfw.log ppp.log secure.log
    access_log error_log
    Running weekly.local:
    Rotating psync log files:/etc/weekly.local: line 17: syntax error near unexpected token `)'
    /etc/weekly.local: line 17: `if [ -f /var/run/syslog.pid ]; then kill -HUP 0 80 79 81 0cat /var/run/syslog.pid | head -1); fi'
    2
    DeepThought:~ dirk$ ls -loe /private/etc/periodic/weekly/500.weekly
    -r-xr-xr-x 1 root wheel - 2532 Jan 13 2006 /private/etc/periodic/weekly/500.weekly
    DeepThought:~ dirk$
    It seems, Rogers idea, PsynX respectively the deficient uninstalling by me is responsible for my problems, is correct. Should I remove the whole file weekly.local or should I only remove the content? I prefer removing the whole file, because it was created while installing PsyncX. The date of creation is the same as the date of installing the app (December 25).
    Klaus
    By the way: it seems to me, the solution of my problem is in sight. So I want to thank you all for the amazing aid I got from you!

  • Calling a bpel process from other Bpel process

    hi,
    my req is
    i have created BPEL process where getting the list of customers by giving the partial name using DBAdapter...... getting the output from the Invoker and the output is assinged to a assing activity(thru copy operations) from assign to replyoutput.
    for example from partial output (eg: input---name=Wor%)
    output:
    World of Business
    World of Concrete
    Worldwide Communications
    Worldwide Communications-Vision Corporation-2090
    here if i click the 'Worldwide Communications-Vision Corporation-2090' it should show the sub-details of the name sucha as name,address..............
    how to call subdetail process to show the subdetails by cliicking on the name
    the above process done on the front-end

    Hi
    API's are available to call a BPEL process from the front-end.
    you can invoke a BPEL with the required SOAP msg.
    Thanks

  • WD Java Remote Debug problem: Release Process from debugging

    Hi Community,
    when I used to debug Web Dynpro Java from the SAP Developer Studio (eclipse) to a remote host (Portal AS NW Java), it works fine for the first run. After disconnecting the remote debug session (server0), I changed the coding and try to debug again with the effect that the old coding is still used from the server process (server0) even though the parameter "Create and Deploy archive" is set (enabled) in the debug configuration. Furthermore the funktionality of "Relase process from debugging" option in the J2EE Engine dosn't react / work.
    I think that the debug session is still running and the Developer Studio is not able to send any "Kill" statement to the server process for ending this session.
    I tried following:
    A. Rebuild Project and Deploy the archive on the "normal" way
    B. Reopen the Developer Studio itself
    C. Start the Project in debugmode again and chose the option "Terminate All"
    ...all without any success.
    The only way is to restart the whole server process server0 again with the same trouble after the first debug.
    Did any of you have a clue or experience to clear or kill the debugsession from the process so that next debugsessions can be started, please reply.
    Thanks
    Used Basic Manuell
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/849170e3-0601-0010-d59e-ddfce735fac5

    So, I'm having the same issue, but it's like I'm chasing down a port. The first time I got these error messages
    Connecting to the database DEV.
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '555.12.18.288', '5950' )
    ORA-30683: failure establishing connection to debugger
    ORA-12535: TNS:operation timed out
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    Process exited.
    Disconnecting from the database DEV.Our network staff found a bunch of other denials in the firewall logs
    /5185
    /5200
    /5236
    /5815
    /5950 Now that they've those allowed, I tried to start debug again, and this time I got
    Connecting to the database DEV.
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP('555.12.18.288', '6266' )
    ORA-30683: failure establishing connection to debugger
    ORA-12535: TNS:operation timed out
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    Process exited.
    Disconnecting from the database DEV.What gives? Do I just keep trying until I get all of the ports allowed?
    Thanks,
    ---=Chuck

  • How to determine the Parent process information in Oracle BPMS 10g

    Hi ,
    I am trying to retrieve the parent process information given the instanceId and Process Id of an instance of a process from a different process.
    I am getting the instanceId of the instance in workspace using the Fuego.Papi.ProcessService and by creating the Filter.
    I tried using the ProcessInstance.parent but it needs to be instantiated using the instance details of my referred instance, which i am not able to do.
    Can some one shed some light on how to get the parent process details from the referred instance.
    Thanks,
    shravan.

    Hi,
    If you mean to increase the request timeout i.e the time when a request is submitted to the server and the response is sent by the server it can be done in httpd.conf file located in $OracleHome/Apache/Apache/conf directory.
    The attribute to be used for setting timeout is "Timeout". By default teh value is 600 seconds i.e 5 minutes.
    After making these changes , run command dcmctl updateConfig -ct OHS and restart the HTTP Server. Please note these commands need to be run only if the httpd.conf changes are done through text editor.
    Hope this helps.
    Smita

Maybe you are looking for

  • Snapshot Backups on HP EVA SAN

    Hi everyone, We are implementing a new HP EVA SAN for our SAP MaxDB Wintel environment.  As part of the SAN setup we will be utilising the EVAs snapshot technology to perform a nightly backup. Currently HP Data Protector does not support MaxDB for it

  • Outlook2013 email message goes behind main Outlook window when opening PDF attachment with Reader 11

    Problem statement: Outlook 2013 email message goes behind main Outlook window when opening PDF attachment with Adobe Reader 11.0.3 Environment: Windows 8 x64; Office 2013; Adobe Reader 11.0.3 Steps to reproduce bug: 1. Open Outlook 2013 2. Open email

  • WSDL Versions

    Hello, How can I put a version on a WSDL?  Next, how do I verify which version the sending system is using? For example: I create a PurchaseOrder_Out WSDL.  Then I add a new field to the WSDL that is optional.  If the sender does not use the optional

  • Dedicated XBMC + Gaming... Help me build my dream box!

    Currently, I have a tower setup with 64 bit arch which I am running as a dedicated XMBC media box. However, I'm looking to expand the functionality of my media box to also become a gaming box (althought getting my xbox gamepads to work with it has be

  • Configure ACCONF idoc in XI

    Hi, We are using ACCONF idoc as an acknowledgement idoc for the inbound INVOIC idoc. But, the ACCONF idoc doesn't reached to the receving system eventhough it is created and the status is 12. Please suggest me how to send the ACCONF idoc to receiving