How to notify a Notification Wait activity using PAPI

I am trying to use Papi code to release an instance waiting in the notification wait activity of a process deployed in the enterprise server .... for this I am running the papi code from main method of a java class running in eclipse using the notify.send(........) method ........but when the code hits the notify.send(.......) method it is giving the following error :
Exception in thread "main" java.lang.IllegalStateException: The component must be invoked on a server-side method.
     at fuego.components.ProcessInstance.getCurrent(ProcessInstance.java:590)
     at fuego.components.Notification.send(Notification.java:229)
     at PapiCode.main(PapiCode.java:61
Can someone point out the error and how to resolve it ??

Hi,
I am a little confused with the package name of the classes and components you are invoking. If you are using the Client API PAPI, then the package name should be fuego.papi.*.
I think you are using the internal components that should be used within a process implementation that assume running in the context of the Engine instead of a pure client application.
Unless I am interpreting this incorrectly, you should use a client Java Application using PAPI to connect to a deployed process into an OBPM Engine.
I would recommend you take a look at the very good introduction document that talks about PAPI, explains how to compile a program and also talks about how to write your first PAPI program client. It will also outline all the needed jar files need to include from a client application perspective. The link is: http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/papi/index.html.
You may alternatively like to check the main Oracle BPM 10gR3 Documentation page through this link: http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/index.html
HTH,
eduardoc.

Similar Messages

  • Access Message Wait Activity from PAPI-WS

    Hi,
    I am trying to access BPM Studio Message Wait activity using PAPI-WS. Am sending object as an argument but the argument values are not available in BPM.
    MessageWait1 - Activity Name
    In - Argument Set Name
    Arguments - Contains object values.
    InstanceInfo instance = session.processGetInstances(processId).get(j);
    session.processSendNotification(instance.getId(), "MessageWait1", "In", arguments);
    Let me know If i am missing anything.
    Thanks,
    Sanjay
    Edited by: Sanjay_21 on Sep 14, 2009 5:32 PM

    Hi Daniel,
    Yes session.processGetInstances(processId) will return array and that's the reason accessing single instance using get(index).
    InstanceInfo instance = session.processGetInstances(processId).get(j);
    I remember, I was able to pass complex argument in ProcessCreateInstance method but unable to pass similar object in Notification method. Can't we pass complex object as did in ProcessCreateInstance.
    Is it possible to provide sample on how to pass complex object
    Thanks,
    Sanjay

  • Message Wait Activity Or Notification Wait Activity for Web Service Wait

    Hi,
    I have a Message Wait Activity Or Notification Wait Activity which waits for a message from my Web-Service. But this Activity keeps on waitinf for the message even if the web-service is down. How do I make it invoke a System Exception if the web-service is down or the web-service cannot be connected?

    Hi,
    I suspect you've put a lot of thought into this and decided to take this approach, but could you describe why you're thinking your web service might be down frequently enough to do this?
    Here's one approach to having the Message Wait activity discover when something outside its control occurs. Put the Message Wait activity inside of one of two transitions going through a Split/Join. For the other transition going through the Split/Join, add a Timer activity (if you are using Oracle BPM 10g). Set the Timer activity to some period that you want to use to periodically hit the web service to ensure it is up (e.g. '5m' to test to see if the web service is up every 5 minutes). Don't have this occur every few seconds or your Engine's performance will be degraded.
    From the Timer activity there would be one transition. This transition leaving the Timer activity would be an unconditional transition going to an Automatic activity. This Automatic activity would have an unconditional transition going back to the Timer activity, and a conditional transition going to the Join activity. The logic in the conditional transition leaving the Automatic activity could be just a single boolean instance variable (e.g. "wsDown"). When the Automatic activity discovers that the web service is down, this copy of the work item instance will flow to the Join activity.
    The logic in the Automatic activity will invoke a dummy web service running on the same machine you're worried about. If an exception is thrown and caught inside the Automatic activity indicating the web service is down, you'd set a boolean flag "wsDown = true".
    The Join activity would have the logic:
    this = copy
    action = RELEASE If the "wsDown" instance variable is set to true when it leaves the Join activity, then the web service was down and the Message Wait activity was never notified from the outside web service.
    Hope this helps,
    Dan

  • Process Notification and Notification Wait activity - External Relationship

    Hi,
    I have a query relating to the Process Notification and Notification Wait activity.
    In my Process Creation after finishing 2 interactive avtivities I need to send notification or inform the instance
    waiting in a Notification Wait activity.
    For this Im using ALBPM Predefined Process Notification activity to send Notification.
    Im defining instance variable and mapping it as argument to Notification Wait activity.
    I have set the type of event to wait for as External relationship.And defined a correlarion
    at Notification Wait activity by setting initiate property as Yes and defined association with
    argument mapping.And selected the same correlation from the Process Notification activity.
    When im trying to execute the same always im getting the exceeption as Instance was not found for notification.
    Please help me to resolve this issue.
    Thank You,
    ~Kavitha

    Hi Matthias,
    What you have experienced is exactly how it works, the notification is processed after the screenflow is finished.
    I tested a lot some time ago and also really happy that worked well.
    Regards

  • Can I get the participants of the role of some activity using PAPI?

    Hi all,
    Can I get all participants who have the role of one activity using PAPI? how?
    thanks and regards.

    Hello,
    I have the same problem, how to get the participants of specific role using PAPI ?
    Thanks

  • How to create event/notification in SAP using PI.

    Hi there,
    How to create the event/notification in SAP that triggered by the PI system. Any suggestion appreciated.
    Thanks

    Hi Mistry
    You call a bapi to add the event message to SAP EM.
    Below an example:
    SAP EM ABAP - Calling a BAPI to create an Event Message in SAP Event Management - Code Gallery - SCN Wiki
    Best regards
    Eduardo Chagas

  • How to exclude weekends/holidays from BPEL Wait activity?

    I can configure the duration of a Wait activity using duration expressions, or specifying some time in the future. However, I have a use case where the Wait should only consider weekdays which are not holidays. Something akin to tying the Wait activity to a business calendar. Don't really need the sophistication of a business calendar, but at least would like to be able to only include weekdays and not weekends. I read somewhere that BPEL uses Quartz to implement the Wait activity.
    http://enterpriseglue.com/index.php?option=com_content&task=view&id=37&Itemid=44
    However, I can't find a way to configure the Wait for anything other than standard durations. Seems like Quartz does support the notion of business calendars. Here is a sample.
    http://www.quartz-scheduler.org/docs/cookbook/FifthWorkingDayTrigger.html
    If anybody has found a way to exclude weekends from the Wait activity in BPEL, or has some idea how it might be done, please share.

    Hi Harrie:
    Not sure I understand what you did. Suppose, for example, that I am setting the Wait duration to P5D. But I want to wait 5 business days instead of 5 calendar days. Do you first calculate what the end-time would be and then set the Wait expiration instead of the duration? In other words, waiting UNTIL a particular time, instead of waiting FOR a specified duration? Is this how you are doing it?
    Tks.

  • Notification Wait with Interruption

    Hi All,
    I have two process one is Process A and another is Process B. In Process A I have an interactive activity and after that I have unconditional transition to an automatic activity. Again From Interactive activity I have one conditional transition to the Notification Wait activity which will be false always. Again from Notification Wait activity I have an unconditional transition to Interactive activity.
    Now In process B I want to notify the Process A, I need to mention here I do not have any instance pending in Notification Wait activity of process A.
    In simple language I want to shift my control from process B's automatic activity to Process A Notification wait taciturnity. If I can notify the activity I can traverse to Interactive activity in Process A as I have unconditional transition to Interactive activity.
    Can this be possible if so how and Can I make use of Notification Wait activity with Allow Interruption property.
    Any help will be appreciated.
    Bibhu
    Edited by: Bibhuti Bhusan on Oct 14, 2010 11:56 PM

    Sorry - probably just me but I'm completely lost.
    Sometimes it's helpful to describe your use case before drilling into your solution. A lot of times we can recommend a better way to do things if we understand the underlying need you have.
    Here's where I'm lost. I think you're trying to send a notification to an instance in another process. I have undoubtedly misunderstood you but I think that there are two things missing in your process that is being notified:
    1. the work item instance in the process being notified is not and will never be in a Message Wait activity and
    2. the process being notified does not have a Message Wait activity that has its "Interupt" property set.
    If I understand you correctly and if both of these two things are true, it will be impossible for you to send a notification into this process.
    Dan

  • Process Diagram of an instance using PAPI

    Hi,
    I`m trying to get que Process Diagram of an instance with PAPI using processGetDiagram but it doesn`t work, any ideas or examples?
    Thanks a lot

    I dont think there is any way to update the value of any instance variable directly by PAPI.
    What you can do is have a Global Activity with instance access from where you can access all the instance/ external variables.
    You can call this activity using PAPI and can send arguments telling it what to do.
    Let me know if this helps.

  • How to notify the waiting queue with first-in-first-out?

    Could anyone know
    how to notify the waiting queue with first-in-first-out?
    I dont want to notify the waiting queue randomly!
    thanks~

    i assume you are referring to wait "queue" of threads waiting to be notified. while you can do this with some effort on your own part (it's not trivial), depending on what type of guarantees you want, you could use a ReentrantLock with the "fair" policy. it tries to be FIFO but doesn't guarantee it. if you need stronger guarantees, then you will have to code it yourself.
    note, that many of the reasons for using wait/notify explicitly are now handled with some of the concurrent utilities like BlockingQueue, so you may not need to code your own wait/notify logic.

  • How to implement wait activity in OWB process flows?

    Hi,
    I am using OWB 10G R1.
    There is no wait activity in process flows.
    My scenario is, whenver a trigger file is created, I want to proceed with the process flow. If the trigger file doesnot exist, then I want to put the process flow in a wait state, until the trigger file is created.
    Here I used File_Exists activity. But it is checking for the file only once. And it returns warning.
    After that, I want to add an wait activity for certain period of time. How can I do this? Is there is any package,procedure or function to do that?
    Any help is appreciated.
    Thank you,
    Regards,
    Gowtham Sen.

    Gowtham,
    Well the following hint is provided by oracle warehouse builder help.........
    The time-out setting for the workflow engine determines how long the File Exist activity waits for a file. If the file does not arrive before the time-out setting expires, the File Exists activity terminates with errors.
    well someone with deep workflow knowledge can answer this one...
    If you get the answer please share with us.....
    Regards,
    Suraj.

  • How to save HR data in Active Directory using ABAP i.e thru LDAP Connector

    Hi All,
           Can any one please help me out how
           to save HR data in Active directory
           using LDAP Connector ?             
           Please help ASAP as it is very urgent .
    Thanks
    Jitendra

    There are 100 of such scripts are there online.
    here are few tips and codes. you will get more.  
    https://gallery.technet.microsoft.com/scriptcenter/Feeding-data-to-Active-0227d15c
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/31/use-powershell-to-modify-existing-user-accounts-in-active-directory.aspx
    http://powershell.org/wp/forums/topic/ad-import-csv-update-attributes-script/
    Please mark this as answer if it helps

  • How to save hr data in Active directory  using abap

    Hi all
    can any one please help me out how to save hr data in Active directory using LDAP connector
    please help as this is very urgent requirement
    thanks in advance
    Thanks
    Chanti

    What form do you have the user's name in ?
    ANTIPODES\alberteString searchFilter = "(&(objectClass=user)(samAccountName=alberte))";[email protected] searchFilter = "(&(objectClass=user)(userPrincipalName=[email protected]))";Albert EinsteinString searchFilter = (&(objectClass=user)(givenName=Albert)(sn=Einstein))";or using Ambiguous Name Resolution (anr)String searchFilter = "(&(objectClass=user)(anr=Albert Einstein))";or it's even clever enough to useString searchFilter = "(&(objectClass=user)(anr=Einstein Albert))";

  • HT3406 how can i pass "could not active iphone" when I want to use an old iphone 4 as ipod?

    I have old iphone 4 like to use as ipod.  How can i pass "could not active iphone", I just want to use it as ipod.
    thnak you.
    Vivo

    Using an iPhone without a wireless service plan

  • How to confirm an activity using BAPI ?

    Hi,
    Does anyone know how to create a confirmation to an activity using a BAPI ?
    ( instead of CN25 )
    We have such a requirement and I tried to use FM BAPI_NETWORK_CONF_ADD.
    I get a message like "confirmation is saved"  but when I don't see the confirmation anywhere (in CN28) .
    Thanks,
    Ofer

    Hi,
    Hope you are either:
    1. Passing X in FIN_CONF
    (In case of complete confirmation ie 100%)
    OR
    2. Entering % of completion in PROCSS_DEG
    (In case of partial confirmation ie <100%)
    Regards

Maybe you are looking for

  • How do I connect my iMac to my Samsung LCD TV?

    I want to connect my 2009 iMac, Mac os x version 10.5.8 to my 2008 Samsung LCD TV, model LN32A450C1D.  Does anyone know what cords I will need so I can watch videos from my computer on my TV? Thanks.

  • How can I update my account to show purchase of upgrade to CS?

    Today I downloaded an upgrade to CS5 on my new computer. The software is registered to my old ID, which is an email address that doesn't exist anymore. At the end of installation, there was a notice that I would receive confirmation of registration b

  • Return Process in IS-Retail

    Hi, I have a doubt on Return Processes in Allocation. Process: - Allocation Table created - WA08 (Follow on doc created) PO & STO - WF10 Collective PO - PGR in DC --> Distributes to store The above is the Procurement Process. Now the question is - Wh

  • HT1918 Can I transfer purchased items to a new iTunes account?

    I have had to create a new account as my original email address was disabled so I couldnt get into my iTunes account. I dont want to have to re-download all of my apps and start again. Is there a way I can transfer all of my applications etc to my ne

  • TV formats

    Sorry for repeat post, my heading was misleading. Choosing export settings for TV is doing my head in. I have a substantial home movie library which consists of .dv files which I had also encoded as AVC in a .mov format using QT Pro. Just before the