Infopackage execution with raise event

Hi experts,
We need to launch the execution of a infopakage with an event, but we followed next steps without success:
1- Define event in SM62
2- Set in the scheduling options of the infopackage the name of the event.
3- Trigger the event in SM62
The event is working because we tried it into a process chain, and the chain was raised.
We think, the problem is on the infopackege. The infopackages in the new BI 7 version only can charge PSA with background way.
Could be it a problem?
We suppose infopackets in new version can be raised with an even because you are able to indicate it in the schedule tag.
Do you have any solution?
Thanks
Edited by: David Santos on Sep 11, 2008 1:24 PM

David,
Have you scheduled/executed the infopackage?  If it is triggered by an event it won't actually execute when you click start on the schedule tab in the infopackage.  Instead it will be scheduled to run and will wait for the event.
To see if the InfoPackage is waiting to run use transaction SM37 and put the name of your event in the field "or after event" and put ticks in all the job statuses.  You should see a background job in status "released" which when you double click on it shows it is triggered by your event.
Also when you defined the triggered did you select periodic?  If not the infopackage will run once when the event is raised the first time but will not run again when you raise the event a second time.
Thanks,
Mark
if that answers the question then please mark the question as answered...
Edited by: Mark Roberts on Sep 11, 2008 2:03 PM

Similar Messages

  • Button executing CloseWindow Java Script and raising event on server

    Hi All.
    Somebody can help me with this:
    <b>What i'm needing:</b> an 'END' button on a BSP, when the user click on this button just show an aswer box asking if the user wants to close the windows, in case to click yes close the current window and execute a business logic in the controller.
    <b>What i have:</b> a button with the event onClientClick invoking a Java Script function which is showing the answer box and the event onClick which raise the event on the server side. The thing is if the user click on yes then i'm closing the current window and the server event never is triggered. This is not working !!!
    Any ideas ? some sample code ?
    Thanks in advance.
    Armando.

    Hi Armando,
    The 'Yes' on the <i>Confirm dialog box</i> (Client Side Scripting) has to tell the application (Server side scripting) to call your METHOD XXX. This is done by passing querystring <i>exit=X</i> to the URL.
    1. Comment onClick event of the button.
    2. Modify the code the JS function of your End button as follows
       func_end()
    //if no
      // your original code
    // if yes
    document.location.href = document.location.href + '?exit=X';
    3. Add following code to DO_REQUEST
      IF REQUEST->GET_FORM_FIELD( NAME = 'exit' )  ne space.
    *your method will be called only when there is an exit=x in the url
           call method XXX.
    *set a page attrib as follows
           l_exit = 'X'.
      ENDIF.
    4. Add following code to your layout
    <%if l_exit = 'X'.%>
    <script>
    window.close();
    </script>
    <%endif.%>      
    Regards,
    Alwyn

  • ALV: Problem with toolbar event

    Hi ALV-experts,
    I have a dynpro with a header area where I display an ALV table. Below this I have a subscreen with a tabstrip control and two tabs.
    In the ALV toolbar I defined an own button. This button gets deactivated after pressing this button. I achieved this by the option "disabled" in the structure stb_button within the event handler for the toolbar event.
    This works all fine so far. If I start the dynpro and click on the button in the ALV-toolbar the buttons gets deactivated afterwards. But I have I jump between the tabs before I press the ALV-toolbar button, the button does not get deactivated.
    The debugger does not go into the event handler of the toolbar event. I also did system debugging of the method SET_TOOLBAR of the CL_GUI_ALV_GRID-class. Here I pass in both cases the command
    raise event toolbar e_object = m_cl_toolbar e_interactive = i_interactive.
    but in the second case (when I change the tabs before I press the button) the event handler is not executed and I don't know why. I also tried to register the event handler for all instances of the ALV still with the same result.
    The ALV method set_toolbar_interactive( ) did also not solve the problem.
    I couldn't find any SAP note about an issue for this event.
    Does anybody have an idea or a solution for this problem?
    EDIT:
    Problem solved, it was typo!
    Thanks in advance and regards,
    Martin
    Edited by: Martin Fischer on Jul 7, 2010 4:53 PM

    The problem was a typo!

  • Taskflow Raise event foucs problem

    Hi,
    We are using Oracle ADF JDeveloper version 11.1.1.4 (released version) for our development.
    We have used several taskflows / reusable taskflows in our application. For most of the taskflows we have "raised events".
    However we are facing strange problem with the same.
    For example:
    Consider a screen where height of the screen is more than the WINDOWS height. For such a screen vertical scroll bar will be there.
    There is a taskflow which is at the bottom of the screen. To see that taskflow user will use the vertical scroll and will reach there.
    If USER performs any action on this taskflow then events get fired correctly but the focus atomically gets shifted to first element of the screen. Due to this behavior USER needs to scroll the screen every time which is irritating. If we disable the raise event focus doesn’t shift.
    Can somebody look into this?

    Hi,
    customer support would be a good point of contact for analyzing the problem if you have a test case. I can only assume you are talking about contextual events ?
    Frak

  • C# COM server events "lost" when raising events while Excel is in edit mode

    I posted this question on StackOverflow (http://stackoverflow.com/questions/23798443/c-sharp-com-server-events-lost-when-raising-events-while-excel-is-in-edit-mode) but did not receive a good answer, so I'm trying my luck here.
    I have an in-proc COM server written in C# (using .NET Framework 3.5) that raises COM events based on this example: http://msdn.microsoft.com/en-us/library/dd8bf0x3(v=vs.90).aspx
    Excel VBA is the most common client of my COM server.  I’ve found that when I raise COM events while Excel is in edit mode (e.g. a cell is being edited) the event is “lost”.  Meaning, the VBA event handler is never called (even after the Excel
    edit mode is finished) and the call to the C# event delegate passes through and fails silently with no exceptions being thrown.  Do you know how I can detect this situation on my COM server?  Or better still, make the event delegate call block until
    Excel is out of edit mode?
    I have tried:
    Inspecting the properties of the event delegate – could not find any property to indicate that the event failed to be raised on the client.
    Calling the event delegate directly from a worker thread and from the main thread – event not raised on the client, no exceptions thrown on the server.
    Pushing the event delegate onto a worker thread’s Dispatcher and invoking it synchronously – event not raised on the client, no exceptions thrown on the server.
    Pushing the event delegate onto the main thread’s Dispatcher and invoking it synchronously and asynchronously – event not raised on the client, no exceptions thrown on the server.
    Checking the status code of the Dispatcher.BeginInvoke call (using DispatcherOperation.Status) – the status is always ends with “Completed”, and is never in “Aborted” state.
    Creating an out-of-proc C# COM server exe and tested raising the events from there – same result, event handler never called, no exceptions.
    Since I get no indication that the event was not raised on the client, I cannot handle this situation in my code.
    I have tested this with Excel 2010 and Excel 2013.
    Here is a simple test case.  The C# COM server:
    namespace ComServerTest
    public delegate void EventOneDelegate();
    // Interface
    [Guid("2B2C1A74-248D-48B0-ACB0-3EE94223BDD3"), Description("ManagerClass interface")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    [ComVisible(true)]
    public interface IManagerClass
    [DispId(1), Description("Describes MethodAAA")]
    String MethodAAA(String strValue);
    [DispId(2), Description("Start thread work")]
    String StartThreadWork(String strIn);
    [DispId(3), Description("Stop thread work")]
    String StopThreadWork(String strIn);
    [Guid("596AEB63-33C1-4CFD-8C9F-5BEF17D4C7AC"), Description("Manager events interface")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [ComVisible(true)]
    public interface ManagerEvents
    [DispId(1), Description("Event one")]
    void EventOne();
    [Guid("4D0A42CB-A950-4422-A8F0-3A714EBA3EC7"), Description("ManagerClass implementation")]
    [ComVisible(true), ClassInterface(ClassInterfaceType.None)]
    [ComSourceInterfaces(typeof(ManagerEvents))]
    public class ManagerClass : IManagerClass
    private event EventOneDelegate EventOne;
    private System.Threading.Thread m_workerThread;
    private bool m_doWork;
    private System.Windows.Threading.Dispatcher MainThreadDispatcher = null;
    public ManagerClass()
    // Assumes this is created on the main thread
    MainThreadDispatcher = System.Windows.Threading.Dispatcher.CurrentDispatcher;
    m_doWork = false;
    m_workerThread = new System.Threading.Thread(DoThreadWork);
    // Simple thread that raises an event every few seconds
    private void DoThreadWork()
    DateTime dtStart = DateTime.Now;
    TimeSpan fiveSecs = new TimeSpan(0, 0, 5);
    while (m_doWork)
    if ((DateTime.Now - dtStart) > fiveSecs)
    System.Diagnostics.Debug.Print("Raising event...");
    try
    if (EventOne != null)
    // Tried calling the event delegate directly
    EventOne();
    // Tried synchronously invoking the event delegate from the main thread's dispatcher
    MainThreadDispatcher.Invoke(EventOne, new object[] { });
    // Tried asynchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.DispatcherOperation dispOp = MainThreadDispatcher.BeginInvoke(EventOne, new object[] { });
    // Tried synchronously invoking the event delegate from the worker thread's dispatcher.
    // Asynchronously invoking the event delegate from the worker thread's dispatcher did not work regardless of whether Excel is in edit mode or not.
    System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(EventOne, new object[] { });
    catch (System.Exception ex)
    // No exceptions were thrown when attempting to raise the event when Excel is in edit mode
    System.Diagnostics.Debug.Print(ex.ToString());
    dtStart = DateTime.Now;
    // Method should be called from the main thread
    [ComVisible(true), Description("Implements MethodAAA")]
    public String MethodAAA(String strValue)
    if (EventOne != null)
    try
    // Tried calling the event delegate directly
    EventOne();
    // Tried asynchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.DispatcherOperation dispOp = System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(EventOne, new object[] { });
    // Tried synchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(EventOne, new object[] { });
    catch (System.Exception ex)
    // No exceptions were thrown when attempting to raise the event when Excel is in edit mode
    System.Diagnostics.Debug.Print(ex.ToString());
    return "";
    return "";
    [ComVisible(true), Description("Start thread work")]
    public String StartThreadWork(String strIn)
    m_doWork = true;
    m_workerThread.Start();
    return "";
    [ComVisible(true), Description("Stop thread work")]
    public String StopThreadWork(String strIn)
    m_doWork = false;
    m_workerThread.Join();
    return "";
    I register it using regasm:
    %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm /codebase ComServerTest.dll /tlb:ComServerTest.tlb
    Excel VBA client code:
    Public WithEvents managerObj As ComServerTest.ManagerClass
    Public g_nCounter As Long
    Sub TestEventsFromWorkerThread()
    Set managerObj = New ComServerTest.ManagerClass
    Dim dtStart As Date
    dtStart = DateTime.Now
    g_nCounter = 0
    Debug.Print "Start"
    ' Starts the worker thread which will raise the EventOne event every few seconds
    managerObj.StartThreadWork ""
    Do While True
    DoEvents
    ' Loop for 20 secs
    If ((DateTime.Now - dtStart) * 24 * 60 * 60) > 20 Then
    ' Stops the worker thread
    managerObj.StopThreadWork ""
    Exit Do
    End If
    Loop
    Debug.Print "Done"
    End Sub
    Sub TestEventFromMainThread()
    Set managerObj = New ComServerTest.ManagerClass
    Debug.Print "Start"
    ' This call will raise the EventOne event
    managerObj.MethodAAA ""
    Debug.Print "Done"
    End Sub
    ' EventOne handler
    Private Sub managerObj_EventOne()
    Debug.Print "EventOne " & g_nCounter
    g_nCounter = g_nCounter + 1
    End Sub
    This problem also occurs for a C++ MFC Automation server that raises COM events.  If I raise the COM event from the main thread when Excel is in edit mode, the event handler is never called.  No errors or exceptions are thrown on the server,
    similar to my C# COM server.  However, if I use the Global Interface Table to marshal the event sink interface from the main thread
    back to the main thread, then invoking the event - it will block while Excel is in edit mode.  (I also used COleMessageFilter to disable the busy dialog and not responding dialogs, otherwise I'd receive the exception:
    RPC_E_CANTCALLOUT_INEXTERNALCALL It is illegal to call out while inside message filter.)
    Knowing that, I tried to do the same on my C# COM server.  I could instantiate the Global Interface Table (using the definition from pinvoke.net) and the message filter (using the IOleMessageFilter definition from MSDN).  However, the event still
    gets "lost" and does not block while Excel is in edit mode.
    Here's my additional C# code to try to make use of the Global Interface Table:
    namespace ComServerTest
    // Global Interface Table definition from pinvoke.net
    ComImport,
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
    Guid("00000146-0000-0000-C000-000000000046")
    interface IGlobalInterfaceTable
    uint RegisterInterfaceInGlobal(
    [MarshalAs(UnmanagedType.IUnknown)] object pUnk,
    [In] ref Guid riid);
    void RevokeInterfaceFromGlobal(uint dwCookie);
    [return: MarshalAs(UnmanagedType.IUnknown)]
    object GetInterfaceFromGlobal(uint dwCookie, [In] ref Guid riid);
    ComImport,
    Guid("00000323-0000-0000-C000-000000000046") // CLSID_StdGlobalInterfaceTable
    class StdGlobalInterfaceTable /* : IGlobalInterfaceTable */
    public class ManagerClass : IManagerClass
    //...skipped code already mentioned in earlier sample above...
    //...also skipped the message filter code for brevity...
    private Guid IID_IDispatch = new Guid("00020400-0000-0000-C000-000000000046");
    private IGlobalInterfaceTable m_GIT = null;
    public ManagerClass()
    //...skipped code already mentioned in earlier sample above...
    m_GIT = (IGlobalInterfaceTable)new StdGlobalInterfaceTable();
    public void FireEventOne()
    // Using the GIT to marshal the (event?) interface from the main thread back to the main thread (like the MFC Automation server).
    // Should we be marshalling the ManagerEvents interface pointer instead? How do we get at it?
    uint uCookie = m_GIT.RegisterInterfaceInGlobal(this, ref IID_IDispatch);
    ManagerClass mgr = (ManagerClass)m_GIT.GetInterfaceFromGlobal(uCookie, ref IID_IDispatch);
    mgr.EventOne(); // when Excel is in edit mode, event handler is never called and does not block, event is "lost"
    m_GIT.RevokeInterfaceFromGlobal(uCookie);
    I’d like my C# COM server to behave in a similar way to the MFC Automation server.  Is this possible?  I think I should be registering the ManagerEvents interface pointer in the GIT but I don't know how to get at it? I tried using Marshal.GetComInterfaceForObject(this,
    typeof(ManagerEvents)) but that just throws an exception: System.InvalidCastException: Specified cast is not valid.
    Thanks.

    Hi Jason-F,
    I’ve found that when I raise COM events while Excel is in edit mode (e.g. a cell is being edited) the event is “lost”.  Meaning,
    the VBA event handler is never called (even after the Excel edit mode is finished) and the call to the C# event delegate passes through and fails silently with no exceptions being thrown.
    Do you mean you didn't raise EventOne event? EventOne handler like following?
    ' EventOne handler
    Private Sub managerObj_EventOne()
    Debug.Print "EventOne " & g_nCounter
    g_nCounter = g_nCounter + 1
    End Sub
    After test your code, here is my screenshot
    And here is my execute log in C# ComServerTest.
    ManagerClass1/1/2015 5:48:11 PM
    DoThreadWork()1/1/2015 5:48:12 PM
    ManagerClass_EventOne()1/1/2015 5:48:17 PM
    ManagerClass_EventOne()1/1/2015 5:48:22 PM
    ManagerClass_EventOne()1/1/2015 5:48:27 PM
    ManagerClass_EventOne()1/1/2015 5:48:32 PM
    ManagerClass_EventOne()1/1/2015 5:48:37 PM
    ManagerClass_EventOne()1/1/2015 5:48:42 PM
    ManagerClass1/1/2015 5:49:56 PM
    DoThreadWork()1/1/2015 5:49:56 PM
    ManagerClass_EventOne()1/1/2015 5:50:01 PM
    ManagerClass1/1/2015 5:50:04 PM
    If i misunderstand you, please feel free to let me know.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to view what are all programs maped with the event....

    I am new to this events concept - could you please say
    in SM64 we can give Event....
    <b>How to view what are all programs maped with the event..</b>
    Thanks in advance.

    Hi Sam,
    See these links:
    How-to trigger a process chain using ABAP?
    Re: scheduling process chain 3 specific times a day
    NOTE: If you want to trigger the process chain from R/3, there are many examples in this forum. However, since the search function is not working now, I suggest you look at OSS Note 135637. This will show you how to do it also.
    Hope this helps.
    concerning to sm64 ..
    Triggering events manually ...
    Events let you start background jobs when particular changes in the R/3 System take place. When an event occurs, the background processing system starts all jobs that were scheduled to wait for that event.
    example : JOB_OPEN to create a background job..
    When scheduling a background job, you can specify it to start "after event".
    If you do so, you'll have to create an event in SM62.
    If a job is scheduled after event event and you trigger the event with SM64, the job will start.
    Events can be raised by external systems in SAP by sending a command to a SAP application server. You can also raise event in any program using function mosule BP_EVENT_RAISE.
    Reward if helpful.
    Regards,
    Harini.S

  • Invalid xml error for raising events thro EM console

    Hi,
    I am using soa-suite 11g and was trying chapter 17 (EDN) from the book "Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial".
    I created an event and trying to consume it through a mediator and writing it to a file. I read that there is a provision to raise event through EM console. I tried that option and gave a sample xml payload. But it always errors out saying incorrect xml format.
    I pasting below the xsd definition and the input payload. Can someone pls let me know if raising events thro em console works ?
    PO.XSD
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xmlns.oracle.com/ns/order"
    xmlns:po="http://xmlns.oracle.com/ns/order" elementFormDefault="qualified">
    <element name="PurchaseOrder" type="po:PurchaseOrderType"/>
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="CustID" type="string"/>
    <element name="ID" type="string"/>
    <element name="productName" type="string" minOccurs="0"/>
    <element name="itemType" type="string" minOccurs="0"/>
    <element name="price" type="decimal" minOccurs="0"/>
    <element name="quantity" type="decimal" minOccurs="0"/>
    <element name="status" type="string" minOccurs="0"/>
    <element name="ccType" type="string" minOccurs="0"/>
    <element name="ccNumber" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </schema>
    Input Payload
    <PurchaseOrder xmlns="http://xmlns.oracle.com/ns/order">
    <CustID>1111</CustID>
    <ID>33412</ID>
    <productName>Sony Bluray DVD Player</productName>
    <itemType>Electronics</itemType>
    <price>350</price>
    <quantity>5</quantity>
    <status>Initial</status>
    <ccType>Mastercard</ccType>
    <ccNumber>1234-1234-1234-1234</ccNumber>
    </PurchaseOrder>
    EDL
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <definitions xmlns="http://schemas.oracle.com/events/edl" targetNamespace="http://schemas.oracle.com/events/edl/POEvents">
    <schema-import namespace="http://xmlns.oracle.com/ns/order" location="xsd/po.xsd"/>
    <event-definition name="NewPO">
    <content xmlns:ns0="http://xmlns.oracle.com/ns/order" element="ns0:PurchaseOrder"/>
    </event-definition>
    </definitions>
    thanks in advance
    Balaji

    Error when raising on EM console
    "Failed to publish the event. A common cause is to input incorrect XML syntax. Please view the log files for details."
    Exception in the log
    oracle.fabric.common.FabricException: Error enqueing event
    at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.publishEvent(SAQBusinessEventBus.java:517)
    at oracle.integration.platform.blocks.event.EDNFacadeImpl.testEventPublish(EDNFacadeImpl.java:394)
    at oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.executeEDNMethod(FacadeFinderBeanImpl.java:1191)
    at sun.reflect.GeneratedMethodAccessor940.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:88)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.wls.JpsWeblogicEjbInterceptor.runJaasMode(JpsWeblogicEjbInterceptor.java:61)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:106)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    at sun.reflect.GeneratedMethodAccessor863.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy241.executeEDNMethod(Unknown Source)
    at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.executeEDNMethod(FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.java:1536)
    at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NullPointerException
    at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.inGlobalTrans(SAQBusinessEventBus.java:640)
    at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.getConnection(SAQBusinessEventBus.java:1357)
    at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.publishEvent(SAQBusinessEventBus.java:511)
    at oracle.integration.platform.blocks.event.EDNFacadeImpl.testEventPublish(EDNFacadeImpl.java:394)
    at oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.executeEDNMethod(FacadeFinderBeanImpl.java:1192)
    at sun.reflect.GeneratedMethodAccessor940.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.jee.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:104)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:88)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.wls.JpsWeblogicEjbInterceptor.runJaasMode(JpsWeblogicEjbInterceptor.java:61)
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:106)
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:105)
    at sun.reflect.GeneratedMethodAccessor863.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.jee.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:69)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy241.executeEDNMethod(Unknown Source)
    at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.executeEDNMethod(FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.java:1536)
    at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:590)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:478)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:119)
    ... 2 more

  • RAISE EVENT usage in real world

    Hi,
    I wonder what is the advantage of the statement RAISE EVENT in contrast to a normal call to a class method.
    Given the following example coding:
    METHOD pai_0100.
      CASE ok_code.
        WHEN 'START'.
          RAISE EVENT read_sflight_data_event EXPORTING i_carrid = i_carrid.
      ENDCASE.
    ENDMETHOD.
    This will raise the event read_sflight_data_event. This event calls the method read_sflight_data set as handler in the class constructor:
    METHOD constructor.
      SET HANDLER me->read_sflight_data FOR me.
    ENDMETHOD.
    Reading data from database...
    METHOD read_sflight_data.
      IF NOT i_carrid IS INITIAL.
        SELECT * FROM sflight INTO TABLE gt_sflight
          WHERE carrid = i_carrid.
      ELSE.
        SELECT * FROM sflight INTO TABLE gt_sflight.
      ENDIF.
    ENDMETHOD.
    Of course I could have written, too:
    METHOD pai_0100.
      CASE ok_code.
        WHEN 'START'.
          me->read_sflight_data( i_carrid = i_carrid ).
      ENDCASE.
    ENDMETHOD.
    Which results in exactly the same result of course, however what is the advantage of events in real world? When is it useful to raise an event instead of calling the event handler directly?
    Thanks for shedding some lights on this topic.

    You don't have to look far to get real world SAP examples for event handling:
    <ul style="list-style:circle!important">
    <li>Workflow (e.g. trigger an event upon creation/change of a document)</li>
    <li>ALV (e.g. react to user input like a double click)</li>
    <li>Job control (e.g. fire a job upon a specific event)</li>
    </ul>
    When you look at the examples it's obvious that the event producer doesn't necessarily know anything about any possible future event consumers: You can ignore events, have one or multiple listeners and the listeners are usually separate from the coding unit that raised the event. Note that it depends on the event handling framework how events are processed (e.g. asynchronous versus synchronous, sequential versus parallel). For class based events the event handler processing is synchronous and sequential; for multiple event handlers their execution sequence is based on their registration order (see [raise event|http://help.sap.com/abapdocu_70/en/ABAPRAISE_EVENT.htm]).
    In a simple example like the one you gave I'd say the event handling approach is possibly questionable (at least as long as all the event listeners are within the same class and there is clearly no need for other objects to listen to this event). Anyhow, the example is probably designed to show the gist of event handling, but sometimes examples from SAP look overly complicated because they seem to prefer the [SoC|http://en.wikipedia.org/wiki/Separation_of_concerns] design principle over [KISS|http://en.wikipedia.org/wiki/KISS_principle] (couldn't resist this little rant).
    Cheers, harald

  • Raise event doesn't work on postback?

    I have this code on a search portlet that has a DIV container. The code below works fine with the alert but without it the raise event is ignored.
    handleControlGridResponse = function(response) { // Get the container whose contents we want to refresh    var container = document.getElementById('ControlGridContainer'); // Redraw it with the text of the response   container.innerHTML = response.responseText;     if (response.responseText.indexOf("Only One Row") != -1) {   var startIndex = response.responseText.indexOf("*Only One Row*") + 14;  var endIndex = response.responseText.indexOf("*theEnd*");  var len = endIndex - startIndex;  var ID = response.responseText.substr(startIndex, len);
    document.PCC.PutSessionState("urn:Cognex.productportal.com:proditeminfo", "Picked_id", ID); document.PCC.RaiseEvent('urn:Cognex.productportal.com:RecordSelected', 'RecordSelected', 'fill portlets'); alert(ID) } }
    How do I get this to work?
    Thanks.

    I tore my hair out over the same issue. Based on SaitoLux's suggestion, I decided to try deleting and reinstalling the prefs panel for my Logitech mice (Logitech Control Center).
    Success!
    If you've got this problem and you have a non-Apple mouse driver installed, try deleting and reinstalling. Can't explain why it worked, but happy it did.

  • Query to clear raised events in CPS

    Hi,
    Is there a query to clear raised events in Redwood ?
    Our CPS did not restart properly this WE and all the Event File Definition wich was started are now going in a pending status. The problem is that the raised ones are not visible in the monitoring (I cannot clear them !) and auto-submit jobs are not running anymore as new event file are pending !
    How can I clear them (as they'aren't in the monitoring) ?
    I solved my problem by creating a new file Event Definition for one of the job and it ran but I cannot do that (itu2019s not a solution) for all the jobs which were running correctly before.
    We restart Redwood but event are still going in a pending status, I donu2019t see any operator message.
    So, this problem is not similar with the one I opened a few days ago.
    If someone can help, Iu2019ll really appreciate it.
    Clement.

    Hi Preethish,
    Yes, I'm able to submit the Job Chains manually and I already Clear all Pending events. But no way, still going in pending status.
    What I did to workaround my problem, I create new event definitions for those job chains but I don't want to correct the problem that way if this happens again; It's not a solution as I've too many jobs.
    Regards
    Clement.

  • Issue with Terminating Event - Reg

    hi Gurus,
    This might be a simple issue, but am not getting hold on a simple solution for my issue.
    I'm working on ECC 6.0.
    I have a custom workflow in which I have step1(A dialog task - Asynch) with a terminating event "COMPLETED" and then step 2 (A background task). once step1 is completed by user A, i am sending this WIACTUAL_AGENT to the step 2 in modifying some custom table data.
    My issue is if user A finished the task(step 1) manually, then also the Term. event COMPLETED is getting triggered and hence the work item in user A's Inbox is disappearing. And then it's picking up user A as WIACTUAL_AGENT and sending to step 2. But, i need to distinguish or some how find out if the Termin. event occurred thru' execution of the workitem or manually performing the job. I looked into the workflow log for both the cases, and i don't find any clue with which i can differentiate that the Termin. event occurred thru' executing witem Vs. performing manually.
    Anybody has any idea on how to find this out. Coz, depending on whether the action is done manually or thru' witem, i 'll be modifying the custom table data accordingly. Currently, for both the cases, when the Term. event occurs, the WIACTUAL_AGENT is same user A and hence it always is treating that the action is done thru' witem only, even though its done manually. This is because, when executed manually also, the step1 witem is ending with container element WIACTUAL_AGENT filled with user A and hence its proceeding with background task in step 2.
    Any thoughts on how to tackle this issue. Your suggestions / input is really appreciated.
    Thank you in advance. Pl let m

    Hi Venu,
    I have quickly created a sample workflow in my system.
    Here is what I did:
    1) Workflow will tigger to my inbox whenever Change master is created.
    2) Created a custom task with object type ECM and method 'EDIT' with termination event 'Deleted'.
    3) created fork step type with 2 branches and necessary branches 01.
    4) one branch will execute  the task created above
    5) another branch will wait for the event "Deleted" of ECM
    6) I have created a container element flag ( of type XFELD ).
    7) In the wait event binding I am passing X to worklfow container element flag.
    7) I have created change master from transaction CC01.
    8) Received the worklfow and deleted the document via worklfow.
    9) I checked the worklfow log and found that the flag container element is not populated
    10) I have created one more change master from transaction CC01.
    11) Received the worklfow but deleted the document outside the workflow.
    12) I checked the worklfow log and found that the flag container element is populated with 'X' this time.
    I think you can use that flag to differntiate whether the transaction was done outside worklfow or within the workflow.
    Hope this helps.
    Thanks.
    Krishna.

  • TCA Business Object Events: Raise Events Program

    Hi,
    We are integrating two ebiz instances using SOA and both the instances currently are on 11.5.10. We have back ported patches from ebiz 12i into these instances to use TCA Business Objects functionality(Business Object API's and events). I have a few questions realted to the concurrent program "TCA Business Object Events: Raise Events Program":
    1) Do I need to schedule this concurrent program to raise business object events?
    2) Is there an alternate way to raise these business object events(any profiles)?
    Appreciate if someone can answer these questions.
    Thanks,
    Sak

    Hi,
    We use AIA and TCA Business Object Events program to integrate from one Ebiz instance to another.
    To achieve what you want I would not do anything in SOA.
    In out integration TCA ends up putting messages into WF_BPEL_Q.
    I would use the following process: (Assuming offline time is a possibility)
    1. Retire the parts of AIA that dequeue from WF_BPEL_Q. (depending on how messages are picked up.)
    2. Create a PLSQL script that dequeues all messages from WF_BPEL_Q but dosn't process them. Using relevant select statements you can dequeue by message ID and select only relevant messages
    3. Run whatever process you need that puts fires the Raise Events Program
    4. Run the script to dequeue the messages that does nothing with them.
    5. Re-activate the parts of AIA that dequeue from WF_BPEL_Q
    This should give you the desired effect. Just be careful you don't screen out messages that do need to be transfered.
    Robert

  • What is custom raised event?

    Hi,
    What is custom raised event in OPA.
    I heard that at the time of OPA online training in last week.

    The built in Error and Warning events allow you to do things imperatively at run-time. E.g. validate that certain data pre-conditions are not violated with data being passed from an external system.
    For example:
    Error(“age must be a whole number of years”, age) if
      round(the person’s age, 0) <> the person’s age
    The custom event mechanism provides an extensible way of flagging other things imperatively if certain conditions are met.
    For example:
    raiseevent LogExternalAccess( "External access by user:", the user's id, CurrentDateTime() ) if
       the user's category is external
    Where "LogExternalAccess" in this case is the name of an event for which an inferencing listener has been created in Java or C# to look for, and perform some action, such as writing the information provided to the event to a log file.
    Davin.

  • Can not see the option Execution with Data Change in the infoprovider?

    Hi team,
    i am using query designer 3.x, when i go into my bex brodcaster settings and schedule my report
    i can not see the option "Execution with Data Change in the infoprovider",
    i can only see 2 options
    Direct scheduling in background process
    create new scheduling
    periodic,
    is there any setting which i would be able to see the option "Execution with Data Change in the infoprovider"?
    kindly assist

    Hi Blusky ,
    check the below given link.
    http://help.sap.com/saphelp_nw04/Helpdata/EN/ec/0d0e405c538f5ce10000000a155106/frameset.htm
    Regards,
    Rohit Garg

  • Floating boxes applet with drag events need click event

    I Have an applet cobbled from the net & modified. Is works but needs one major event added. It draws "Graphics.drawline" boxes with a text "String" inside each box ( the text string represents an URL location). These "boxes" are objects which are "draggable to other locations on canvas & therefore can be independently positioned by user. Each box redraws itself periodically to a slightly different screen location & becomes stationary after a 5 or 6 seconds. The point is, all of this "drag & mobility" behavior must remain intact & is not part of the "problem task".
    Task: Need to have an "event" behavior added in one of two ways ( or a 3rd way if there is another ) whichever is quickest/ easiest. "Clickable mouse events" must be added to each box. ( boxes are built in a loop so adding to one will add to other locations & create as many "buttons" as there are boxes) . At each box's location, clicking one box should be an event which fires & clicking a different box should be a separate event which fires. Separate , so that URL location can be "hotlinked" to each box. That URL is currently displayed in the boxes (visible when running applet).
    1st possible solution: Exchange these "boxes" which appear on canvas into clickable event "Graph panel.buttons" ( for example or some other clickable object) which maintains existing "drag" behavior of boxes. These buttons must each have "clickability" with mouse events to enable placing "getAppletContext. showDocument()" code with these events ( e.g., "hotlinked" to http locations).
    or
    2nd possible solution:. The drawstring boxes are currently dead string text with no event model other than the "drag" feature associated with each box. Must add an additional mouse event behavior to existing boxes so they are "clickable" ( or text inside is clickable) and can then execute "showDocument()" URL when clicked independently.
    Maybe there is a #3. I don't know what that would be. Open to try anything without losing the drag & placement mobility of existing boxes.
    These "boxes" could be images, or event buttons - doesnt matter.
    Not sure if #2 is possible & have not been able to accomplish #1. Must stay within existing AWT framework so IE browsers can run it natively ( which of course IE cannot run Swing graphics unless a Sun plugin loaded ).
    Applet is a single file ( creating 4 classes).
    html file (which invokes it) passes a string param which is broken into above noted URL strings in each box.
    Running this applet, you see a "button" event ( at base of canvas labeled "NewUrl" ) which pops up an url location when clicked ( using "showdocument"). This button is not attached to locations or text of each box object ( which is the "task" to accomplish) . The button does represent the kind of event behavior which each "box" should have when task is achieved. So the box can be exchanged with buttons or the boxes can be imbued with events to hyperlink like a button.
    In spirit of solution #1, here is the bonehead attempt I tried which did not work: copied entire "if" block of logic from the button event (sited in preceding paragraph) into region of code which builds boxes ( "for" loop of "drawstring" method).
    "g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());"
    I copied all the "if" block of logic for button creation into the area immediately after the above line ( for loop which builds the boxes). Hoping that I could create buttons with events, along with all the boxes (which are getting created using "drawstring" above in a "for" loop). These "buttons" must also have positioning info of each box to appear in different locations on the canvas. Positioning data is not in that "if" block of code but it would have been a start to get the multiple buttons created ( even if all drawn in one spot). The "if" code block I've provieded for an example begins with the line:
    " if ("NewUrl".equals(arg)) { "
    and ends with with lines:
    " return true; "
    " } " //< -- end of above if block
    This full "if" block can be seen in the listing below:
    This "if" block creates the "NewUrl" button. Of course, I got a bunch of errors when I tried to copy this block to the above location:
    variable: "arg" "not found in class GraphPanel".
    methods: "getcodebase, showstatus, getappletcontext()"
    "not found in class GraphPanel".
    ----------- The applet code in total follows next
    Here are both the java & htm complete source.
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    double f = (edges.len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    Node n1 = nodes;
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    paintNode( offgraphics, nodes, fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;
    -----------------------htm file to launch------------------------------
    <html>
    <head>
    <title>R
    </title>
    </head>
    <body>
    <h3>
    <center>
    R
    </center>
    </h3>
    I
    <b>
    </b>
    <table border = 1>
    <td>De<td>Test List<tr>
    <td>N <td><tr>
    <td>N <td><tr>
    </table>
    <b>view </b>
    <applet code="Box.class" CODEBASE=. width=1000 height=600
    ALT="Test ">
    <param name=edges value="http:xxabc.htm-http:xxnet.htm,http:xxthis.htm-http:xx.comet.htm,http:xxnewsighting.htm-http:xxstar.htm,http:xxmoon.htm-http:xxNeptune.htm">
    <hr>
    </applet>
    </b>
    <p>
    <table border = 1>
    <tr>
    <tr>
    </table>
    </html>
    </body>
    instructions to compile :
    0 : The discussion becomes easy to follow after 1st compiling
    & viewing the applet.
    1. : cut out applet code.
    2. : the post somehow deleted all references to "" <--- HERE
    see, the data has been deleted again as I preview this post.
    ( that "" should contain an "i" array increment argument:
    "open square bracket" "i" "close square bracket" ) array
    so "javac Box.java" will get 10 errors. These "[" "i" "]"
    array args must be replaced to compile the code.
    3. : All array variables inside the 10 "for" loops ( the bare words
    "edges" and "nodes" ) without array increment "i" should
    read "edges" "[" "i" "]" & "nodes" "[" "i" "]".
    The 10 location lines are approx:
    line #65, #129, #136, #149, #195, #283, #311, #331, #477, #522
    4. : These 10 edits reqresent a missing "i" to all 10 for loop arrays.
    for eddges & nodes. fix this & javac Box.java" will get
    4 class files.
    5. : cut "Box.htm" from post & do "appletviewer Box.htm"
    or put in an apache "htdoc" or tomcat "servlet" http delivered
    directory & call "http://localhost/Box.htm.
    6. : of course, selecting the event button "NewUrl" will not
    work in appletviewer but will work in an http web location.
    7. : post your questions to problem or fixes to problem as I'm
    monitoring closely. TIA.

    Thanks for code post tip to fix array deletion problem.
    Here is code reposted using delimiters with will
    compile straight out of cut/paste.import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    //if (nodes.lbl.equals(lbl)) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    //double f = (edges.len - len) / (len * 3) ;
    double f = (edges[i].len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n1 = nodes[i];
    Node n1 = nodes[i];
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    //paintNode( offgraphics, nodes, fm); //or
    paintNode( offgraphics, nodes[i], fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;

Maybe you are looking for

  • How to create a group with multiple data fields

    Post Author: RichS CA Forum: Formula Using CR XI.  Using CSV input from ODBC text driver.  No problems here. There are 3 fields that I want the same group by action.  Is this possible?)  If any one of these 3 fields change I want some header informat

  • Totals in Cross tab report

    Hi All, I have created a cross tab report and in this report there are 8 sub-totals. I need to total up the first 7 sub-totals and one more total summing up the first 8 sub-totals. Is there any in-built functions to do this. Thanks in advance Dhinesh

  • Trouble with "FI_items_display "

    hi everyone I have a problem with the following function. I want to make a grid alv. DATA: it_sort        TYPE slis_t_sortinfo_alv WITH HEADER LINE.    CLEAR it_sort.     it_sort-fieldname = 'KUNAG'.    APPEND it_sort.   CALL FUNCTION 'FI_ITEMS_DISPL

  • Can't find my album on photo

    I have edited and created a new album for my pictures in photo and when I try to access it in order to add it to Dropbox it is not accessible. It's as if it's not there, but I can find it in Photo when I look for it there.

  • How can I produce the sum of numbers entered in a row?

    I'm entering grades in a row. Can't seem to get them to add up like they did last semester. They are in percentages.  I'm not math savvy, I'm a music teacher Thanks