How to check the status of instance in my Process

Hi,
I have a requirement where I want to check for the status of an instance and if completes in error then send an email. I've been told that there are Bpel tables where I can check the status and there are also Bpel API's I can use.
Can you please let me know what is the best way to do this and if so, some guidelines on how do I design this...I'm fairly new to BPEL and would really appreciate your help
Thanks
-Prapoorna

Hi
First let me explain how I understand your requirement.
There is a bpel instance. This can either complete successfully or with error (basically some fault has occurred).
If the process completes with error a email should be sent.
Well this is how I would design this.
Put the code that might succeed or fault in a scope. Add catch or catchAll block in the faultHandler of the scope.
Write the email stuff in the faultHandler.
Just in case you are still interested you can find the instance state Bpel table details in the below link.
http://oraclebpelindepth.blogspot.com/2008/08/bpel-process-states.html
If you are willing to explore the Java API stuff you can find some useful stuff in here.
http://oraclebpelindepth.blogspot.com/search/label/Java%20API
This will tell you how to setup context, include which jars and a simple java thing to see some thing working.
Now regarding state, you can use locator.listInstances(WhereCondition wc) to get instances list in IInstanceHandle[].
In the IInstanceHandle use the method getState() to get the state of the instance.
Every Little Helps
Kalidass Mookkaiah
http://oraclebpelindepth.blogspot.com/

Similar Messages

  • How to check the status of Oracle DB?

    I just installed the Oracle Express 10 on LINUX machine. I check the status with
    /ect/init.d/oracle-xe status
    and get followings. How can I tell if the Oracle is running or not?
    [root@s003ap03n-test init.d]# ./oracle-xe status
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-JUL-2010 10:18:45
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 19-JUL-2010 09:58:46
    Uptime 0 days 0 hr. 19 min. 58 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
    Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=s003ap03n-test.proactiv.de)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=7070))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XE" has 1 instance(s).
    Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
    Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
    Instance "XE", status READY, has 1 handler(s) for this service...
    The command completed successfully

    Connect with SYS or SYSDBA.
    SELECT instance_name, status, host_name
    FROM v$instance;
    Regards
    Asif Kabir
    Total Questions: *6 (6 unresolved)*
    -- Mark your helpful post as correct/helpful and close all the answered threads.

  • How to check the status of file downloading?

    I have to download the selected file by using "file download" dialogue box.
    This "File Download" dialogue box provides options for "Open", "Save", "Cancel" or "More Info". It is similar to usual "File Downloading".
    And i am required to do further processing only if , file is "Open" or "Save".
    So how can i check the status of the option selected by the user?
    Following is the code snippet:
    res.setContentType("text/plain");
    res.addHeader("Content-Disposition", "attachment; filename=" +value);
    try
         uFile= new File(fPath);
         fSize=(int)uFile.length();
         fis = new FileInputStream(uFile);
         c=-1;
         while ((c = fis.read()) != -1)
              out.print((char)c);             
         fis.close();
         out.flush();
         out=null;
    catch(Exception e)
           out.println("Exception : " +e);
    } I tried to generate a flag and inside a while loop, and then checking the status of that flag outside of loop.
    But it doesn't work.
    It reflects the value of flag even if user selects "Cancel" Option.
    So, if there is any another way of checking the option selected by user from "Open","Save" or" Cancel", then please reply me.
    Thanks in advance.

    Is there any solution for this or any web link for this...?
    Thanks in advance,
    Waiting for reply

  • How to check the status of an IDoc in the Target system

    Hi Experts,
    we are using a self-made program to send Material and BOMs from Client A to Client B into the same ERP System.
    How can I check the status of an IDoc in the Target Client B (like BD87 - ALE Monitor) ?
    If you have some examples or Function, please give me the information.
    Rewards if helpful.
    Regards,
    David

    Hi David
    As mentioned in the earlier reply you can check your status with tcodes:-BD87,WE02,WE05.What i guess from your querry is the staus of your idoc whether posted or not in target client B.Check in the target client for the message type which you are using (since its an program that means you must be using an customised idoc type or standard) .You might have maintained Basic type tcode:-WE30.Give in your messagetype,Basictype,Created at and executed using tcode :- BD87.The prerequisites are you need to create an Partner Profile(WE20) .For this you need to create to provide in your message type and Process code(we41,we42,we57).If you have to create an process code for customised one(se37) .You need to actuivate the idoc inbound processing .If you are using a file in your file make it sure the port is being maintained for the same to chek for unicode format in tcode :-WE21 (check or uncheck).
                    For standard BOM i recon you are using message type :-BOMMAT  and Processing code as:-BOMM.Its always advisible that instead of using an whole abap program you need to have an ETL tool that would take care of the extraction of data provided your client do have existing Legacy system in its place since it would be much faster and easier.
    Regards
    Somnath

  • How to check the status of a job!!!

    Hi,
    i want to check the status of a job and also send a mail when a job is cancelled.
    Is there any function  module which does that , also i want check the jobs across various time periods and not of today....
    Its urgent,
    Answers will be rewarded,
    Regards,
    Rohan

    Hi Rohan,
    You can get job information by <b>calling function "BP_JOB_READ".</b> If you pass the value btc_read_jobhead_only defined in LBTCHDEF, it will only return the
    job header info into the export parameter JOB_READ_JOBHEAD. The job status
    is set in JOB_READ_JOBHEAD-STATUS.
    Alternatively, <b>you can just lookup table TBTCO</b>, the status is in
    TBTCO-STATUS.
    The values in STATUS are defined in LBTCHDEF as follows;
    DATA:
    BTC_RUNNING LIKE TBTCO-STATUS VALUE 'R',
    BTC_READY LIKE TBTCO-STATUS VALUE 'Y',
    BTC_SCHEDULED LIKE TBTCO-STATUS VALUE 'P',
    BTC_RELEASED LIKE TBTCO-STATUS VALUE 'S',
    BTC_ABORTED LIKE TBTCO-STATUS VALUE 'A',
    BTC_FINISHED LIKE TBTCO-STATUS VALUE 'F',
    BTC_PUT_ACTIVE LIKE TBTCO-STATUS VALUE 'Z',
    BTC_UNKNOWN_STATE LIKE TBTCO-STATUS VALUE 'X'.
    Thanks,
    Vinay

  • How to check the status on the server

    I have a jsp page which runs a tcl program in the background. This tcl program will generate a HTML file and the HTML
    file will be residing in the server. Is there a way in the jsp to check the status on the server so that the moment HTML file is on
    the server and capture the date/time and display in the JSP.
    Thanks

    If the JSP is on the same server, then you can just use the File class to check that the file exists and get the timestamp of the file.

  • How to check the status of published vi in webpage

    Is there any method, property or way to check the status of published vit in webpage.
    my problem is that i have a continous running vit which i have published in webpage. when user slects some option/button then the front panel of that vit loaded into webpage and can perform different funtion. when user close the page or navigates to another page (means the front panel in webpage is no longer available). i want to know the status of vit, that now user doesnot use this vit so i have to close it.
    regards

    Now i have fixed the issue by using invoke method to check the number of connections.

  • How to check the status of all of the current cache listeners

    Hi,
    Is there a way to programmatically show the status of all of the registered cache listeners?
    The background is that we found only one user (among around 20 users) always stops receiving the events from the cache. However the tcp connection to the proxy server is always alive. We are using .NET client.
    Please provide any suggestions on this issue.
    Thanks
    Mu

    Is there a way to programmatically show the status of all of the registered cache listeners?Not easily. The listeners are managed in a hierarchical manner, so each storage-enabled server keeps track (e.g. per partition) what listeners it has to notify of what events, and each proxy keeps track (e.g. per connection) of what clients it has to notify of what events, and on the client it keeps track of what listener objects it has to deliver what events to. At each level in the hierarchy, there is a data structure that keeps track of this information, and that data structure will typically be an instance of com.tangosol.util.MapListenerSupport. While it is theoretically possible to navigate these data structures at any level of the hierarchy, it's not straight-forward.
    The background is that we found only one user (among around 20 users) always stops receiving the events from the cache. However the tcp connection to the proxy server is always alive. We are using .NET client.It sounds like the client is getting disconnected at some point. To eliminate the obvious (e.g. an event listener getting stuck and never returning), take a thread dump of the .NET process, e.g.
    http://support.microsoft.com/kb/286350
    Next, add the listeners on the client side for the MemberLeft events. If the client does get disconnected, it should get that event.
    Also, turn up the logging level on the proxies (to at least D6) and check the logs when this happens.
    I'd also suggest that you file an SR with Oracle support to track this.
    Peace,
    Cameron Purdy | Oracle Coherence
    http://coherence.oracle.com/

  • How to reterive the status of instance of report

    iI am using java SDK i have to reetive the status of all the instances of report
    That is sucess , failure , pending..etc
    how can i do that.

    Hi Amita ,
    As per the APIs ,there is a method in ISchedulingInfo interface i.e. getStatus() which returns an int datatype.
    So you will get status of the instance as int value only.
    You can use the following code snippet
    IInfoObjects infoobjects=infostore.query("select * from ci)infoobjects where si_kind='Crystalreport'/''Webi' and si_instance=1");
    for(int i=1;i<infoobjects.size();i++)
    IInfoObject infoobject=(IInfoObject) infoobjects.get(i);
    ISchedulingInfo oSchedInfo=infoobject.getSchedulingInfo();
    int status=oSchedInfo.getStatus();
    out.println(status);
    Regards,
    Prithvi

  • How to check the status - Locked or Unlocked?

    I was using a iphone 5 unlocked version, and recently i got replaced with a new phone. But now when i check online for the status (http://iphoneimei.info/) if its locked or unlocked it shows me it is locked. Im currently not using any sim card

    If Apple replaced the iPhone and the donor was unlocked lawfully then the replacement should alo be unlocked
    Only Applecare in you couuntry can legitimately tell you of the iphones Carrier status

  • How to check the status of TLS cert?

    Hi all,
    Except export (or copy) the cert from the configuration file, and view using openssl, is there anyway / tools to allow me check the TLS / SSL cert is being used?
    As beside checking the cert is using by my IronPort, i would like to check the cert using by my partner as well (although i can configure IronPort to accept trust cert only, i still wanna verify it)
    Thanks for advise.

    You don't need to copy the cert out of your configuration. OpenSSL has an "s_client" subcommand which can open an SSL connection and verify the cert for you. It even knows how to do STARTTLS. Something like this ought to do it:
    openssl s_client -starttls smtp -CAfile /path/to/ca/file -connect your.ironport:25
    The /path/to/ca/file is necessary to provide openssl with a cache of root CA certs. You could use -CApath instead of -CAfile if you have a hashed directory of root CA certs instead of a single file containing them all.
    You can also point this at your partner's SMTP server as well.

  • How to check the status of infopackage ??

    hi,
    I have executed infoobject, and i can go to moniter and see the status. but over there it only shows time and no. of records.
    like this...
    Yellow tringle 15:23:23 ( 234 from 120 records )
    does it mean its loading 234 records from 120 records ? that doesnt sound right. for me the second no. is always smaller then the first no.
    also, is there any other way to check whats going on ?  other then Monior????

    Hi honar,
    Yellow tringle 15:23:23 ( 234 from 120 records )
    Yes it means the load is still processing. Once the load gets completed the request will change to Green and the record count will match like
    EX: Green o 15.30.00(234 from 234 records)
    As the load is running you can check the back  ground might be running goto SM37 tcode enter user name and select the active requests and click execute
    or
    From the monitor screen "environment" --> job overview --> in the "source system" it will take you to SM37 screen.
    Check the job log till it finishes.
    If the job finished and still the load is in yellow status - check for the idocs and if they are hung process them manually.
    Regards
    KP

  • How to check the status of my macbook battery

    How can i Check the kwality of my macbook battery??

    Hi and welcome to Apple discussions,
    Click on blue apple top left.
    Then About This Mac.
    Then More Info in the small window that opens up.
    Finally click on Power in the left hand column.
    If you are not sure what it all means copy and paste what it shows into a reply so we can see what is happening.
    Regards from England,
    Alan

  • How to check the status of other process chain from one process chain

    Hi All
    I have a requirement where I need to send an Email after successful completion of 3 process chains.
    all these 3 chains starts at same time.Out of these 3, one chain daily takes more time to complete.
    Is there any way so that in 3rd chain( the one that takes more time to complete) i can check whether the other two chains have completed successfully or not.So that when this chain gets complete I can send the success notification for all the three chains.
    If possible please tell me the step by step procedure for doing this.
    I have no question on sending Email through process chain.
    Regards
    Ashish

    Hi
    The OS Command is used for the following:
    You use this process type to stop a system command in the operating system of an application server.
    In the process maintenance for the operating system command, define:
    The logical name of the operating system command you want to stop.
    A command defined in transaction SM49 is used here. You can also change the command using the Change pushbutton.
    The operating system of the application server on which you want to execute the command.
    Additional parameters, as long as the defined command permits them.
    The application server on which the command is to be executed. If you always want to use the current host, set the corresponding indicator. If you want to use a host other than the current one, enter this in the Target Host field; the system automatically deselects the Current Host.
    After the run, you can find the standard text output by the command on the Process tab page of the log for this process.
    For processes you may have implemented yourself, you can access this log using the CL_RSPC_SYSTEMCOMMAND=>IF_RSPC_GET_LOG~GET_LOG method.
    I have never used the OS command myself, so I am not sure, whether it can be used in your case.
    Check the following link, it might help,
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096d5a543b11d1898e0000e8322d00/frameset.htm
    Regards
    Shilpa

  • How to set the status of an Workitem, while processing?

    Hi,
    My requirement is to set/ Change the workitem status after/ while procecssing if certain condition is not met for all the users. I have one workitem assigned to multiple users. If any one of the user's executes the workitem, it displays a zprogram, but the user has not taken any action (SAVE), he simply came out of the transaction using "BACK" button. Here the Workitem has been vanished/disappeared from the other two users Inbox, and the workitem is in "In Processu201D Status for the User who executed the workitem. But my requirement is to set the workitem to be in "READY" status for all the users to whom the workitem is assigned; until the user "SAVE" the transaction I need the workitems to be in "READY" status only.
    Please suggest me with your ideas to get the above results.
    Note: I have used the function modules u201CSAP_WAPI_SET_WORKITEM_STATUS (or) SWW_WI_ADMIN_READY ", to change the status of the workitem while processing, it's throwing an error u201CWork item & locked by user & (enqueue erroru201D.
    Thanks in advance,
    Ajay Kumar

    Thanks Florin,
    Your piece of code has worked alot, and it was very helpful in changing the Status of the Workitem to "READY" for all the Users fo the workitem.
    Points have been rewarded for your help.
    Process: We have acheived this using the "Work Item Exits", Usng "AFTER_EXECUTION" Method.
    Note: The Exit will be executed if "exit_cancelled"  statement is present/used in the work item method. if not it is not taking to the exit code. I'm unable to find the reason for it. Florin can u please explain this point.
    Please check the link for adding the code in Work Item Exits.
    http://wiki.sdn.sap.com/wiki/display/ABAP/ProgramExitsIn+Workflow
    Please find the Code:
    method IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED.
    Get the context of the workitem
      me->wi_context = im_workitem_context.
    After execution of the workitem call the method AFTER_EXECUTION
      if im_event_name eq swrco_event_after_execution.
        me->after_execution( ).
      endif.
    endmethod.
    METHOD AFTER_EXECUTION.
    This method acts as the Event Handler for SWRCO_EVENT_AFTER_EXECUTION
      DATA: LCL_L_WID TYPE SWW_WIID,
            L_STATUS TYPE SWR_WISTAT-STATUS,
            L_NEW_STATUS  TYPE SWR_WISTAT,
            L_SWR_MESSAG  TYPE STANDARD TABLE OF SWR_MESSAG,
            L_SWR_MSTRUC  TYPE STANDARD TABLE OF SWR_MSTRUC.
    Get work item
      CALL METHOD WI_CONTEXT->GET_WORKITEM_ID
        RECEIVING
          RE_WORKITEM = LCL_L_WID.
      L_STATUS = 'READY'.
      CALL FUNCTION 'SAP_WAPI_SET_WORKITEM_STATUS'
        EXPORTING
          WORKITEM_ID    = LCL_L_WID
          STATUS         = L_STATUS
          USER           = SY-UNAME
          LANGUAGE       = SY-LANGU
          DO_COMMIT      = 'X'
        IMPORTING
          NEW_STATUS     = L_NEW_STATUS
         RETURN_CODE    = SY-SUBRC
        TABLES
          MESSAGE_LINES  = L_SWR_MESSAG
          MESSAGE_STRUCT = L_SWR_MSTRUC.
      IF SY-SUBRC EQ 0.
      ENDIF.
    ENDMETHOD.
    Thank You Once Again,
    Ajay Kumar Chippa

Maybe you are looking for

  • Java Web Start- Cannot launch Application. Pls help

    HI Ia m beginner in java web start. I creaate a simple swing application and try to launch it through web start. But I failed. My application jar file (sample.jar)contains only class files. No menifest file. Then I sign my "sample.jar" file and place

  • How to get materials at vendor location created on APO

    Hi - I am working on a project to try to do some capacity planning/what if analysis on SNP for materials created at a vendor location ( contract manufacturer). We currently do not maintain master data for the capacity of these vendors but it is somet

  • Default output device not coming

    I made one PDF form and attached it in List LG01 in CB85 to print process order through COR2 output device is mentioned as LP01 in list Lg01, but while printing, output device is coming as which is mentioned in user profile. I want that output device

  • Unable to open pdf files from weblinks

    Hi, I am encountering a problem while opening .pdf files through weblinks. The problem occurs both in IE and chrome. I am using Adobe Reader 9.1.0 version. The snapshot the error message is attached. Does anybody have a solution for this issue regard

  • Limiting a Guest Account

    I am in the process of opening a B&B and wish to make an iMac available to guests. I'm OK about setting up a guest account and the ability to limit certain aspects of that account (non admin, parental controls etc) but can I limit the apps available