Getting task id in boundary event handler

Oracle BPM 11.1.1.6
I have a human task in my process and I want to send out some very customized notification ( very different to the original assignment notification) to the assignee if the task is not actioned within a certain duration. For this I am having a non interrupting boundary event handler attached to the task which connects to a notification activity. The notification content needs to include an URL , which has the task id as part of it. ( we are using a custom worklist app ). Question: is there a way to get the taskid of the task for including it in the content of notification activity ?
TIA,
Atheek

Hi
UBR and UER are amounts that system calculate for the entire draft invoice and the entire draft revenue.
Since usually invoice and revenue are generated at the project level, the task id is not a valid parameter for AA, since there could be multiple tasks on the same document.
If in your case you are sure the revenue and invoice document always contains a single task, you could try a workaround using AA rule based on SQL statement. The logic will be to select any bill item within the invoice or revenue (either EI RDL or an Event) and read the task id of that item.
Dina

Similar Messages

  • Get element UI property in Event Handler

    Hi,
    it's possible read inside an action, ONACTIONGO_TO_DETAIL, the property TEXT, of a LinkToAction?
    I want to read the property : TEXT of the LinkToAction and use this property like a parameter of the navigation :
    WD_THIS->FIRE_TO_DETAIL_PLG( LV_TEXT ).
    I have tried in some way, but i have obtained always error of Access Null. For example :
    data: lr_linkToaction type ref to IF_WD_VIEW_ELEMENT, "CL_WD_LINK_TO_ACTION,
            myView type ref to if_wd_view,
            LV_TEXT type WDY_MD_TRANSLATABLE_TEXT.
    CALL METHOD MYVIEW->GET_ELEMENT
        EXPORTING
          ID      = 'LTA_COMPCODE'
        RECEIVING
         ELEMENT = lr_linkToaction
    OR :
    lr_linkToAction ?= myView->get_element( 'LTA_COMPCODE' ).
      CALL METHOD LR_LINKTOACTION->GET_TEXT
       EXPORTING
         AS_EXTERNAL            =
         CONTEXT_ELEMENT        =
         CONTEXT_NODE_PATH_NAME =
         TEXT_LENGTH            = CO_UNKNOWN_TEXTLEN
        RECEIVING
           VALUE                   = LV_TEXT.

    Hi Antonello,
    You cannot get a refernce to if_wd_view simply by declaring a variable referencing it. You can get a reference to it only through the WDDOMODIFYVIEW method.
    What you can do is, bind the 'text' property of your button to an attribute in the context and then simply read that attribute (the caode can be generated using code wizard).
    Regards,
    Neha

  • BPM - replacing Boundary Event

    Hi there,
    I have a business process flow with human tasks, and one of these tasks has a boundary event with old name "Cancel". Because of changing the event trigger name (on side of Web Dynpro component controller), I have replaced the old name through "CancelDraft" - I have changed to the accordant task, then choosed the component controller etc... -.
    When I try to build my process DC, I got the following error message:
      [BpemTask] PF.DefaultDataArea:DCs/bayer.com/bcs/grip/prc/proposal/_comp/src/tasks/enhance champ proposal.task#E091AD019572D002C9C911E0CEB55480872F631E (MRI), CompilerType: EXCEPTIONCOMPILER
      [BpemTask]  "BPM.bp.000021" BC-BMT-BPM-SRV com.sap.tc.glx.BpemTask execute() -  Exception during event definition compilation, compilerType: EXCEPTIONCOMPILERcaused by com.sap.glx.paradigmInterface.buildapi.BpemBuildException: [BPM.rt_c_exc.000001] Cannot compile exception 'Cancel' without root type
      [BpemTask]      at com.sap.glx.paradigmInterface.bpmn.compiler.exception.ExceptionCompiler.compileException(ExceptionCompiler.java:101)
      [BpemTask]      at com.sap.glx.paradigmInterface.bpmn.compiler.exception.ExceptionCompiler.compile(ExceptionCompiler.java:52)
      [BpemTask]      at com.sap.tc.glx.BpemTask.processCompiler(BpemTask.java:372)
      [BpemTask]      at com.sap.tc.glx.BpemTask.callCompilers(BpemTask.java:327)
      [BpemTask]      at com.sap.tc.glx.BpemTask.execute(BpemTask.java:188)
      [BpemTask]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      [BpemTask]      at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)
      [BpemTask]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [BpemTask]      at java.lang.reflect.Method.invoke(Method.java:597)
      [BpemTask]      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      [BpemTask]      at org.apache.tools.ant.Task.perform(Task.java:348)
      [BpemTask]      at org.apache.tools.ant.Target.execute(Target.java:357)
      [BpemTask]      at org.apache.tools.ant.Target.performTasks(Target.java:385)
      [BpemTask]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
      [BpemTask]      at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
      [BpemTask]      at com.sap.tc.buildplugin.ant.util.AntRunner.run(AntRunner.java:115)
      [BpemTask]      at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:53)
      [BpemTask]      at com.sap.tc.buildplugin.DefaultPlugin.processSequence(DefaultPlugin.java:235)
      [BpemTask]      at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:174)
      [BpemTask]      at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:165)
      [BpemTask]      at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
      [BpemTask]      at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
      [BpemTask]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [BpemTask]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [BpemTask]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [BpemTask]      at java.lang.reflect.Method.invoke(Method.java:597)
      [BpemTask]      at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
      [BpemTask]      at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
      [BpemTask]      at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
      [BpemTask]      at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
      [BpemTask]      at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:276)
      [BpemTask]      at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1459)
      [BpemTask]      at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1441)
      [BpemTask]      at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3927)
      [BpemTask]      at com.sap.ide.dii08.internal.commandz.BuildDcsCommand.build(BuildDcsCommand.java:333)
      [BpemTask]      at com.sap.ide.dii08.internal.commandz.BuildDcsCommand.execute(BuildDcsCommand.java:176)
      [BpemTask]      at com.sap.ide.dii08.internal.service.CommandExecutor$2.run(CommandExecutor.java:77)
      [BpemTask]      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
      [BpemTask]      at com.sap.ide.dii05.util.internal.lock.DiiConsistencyServiceImpl.executeConsistentWorkspaceRunnable(DiiConsistencyServiceImpl.java:90)
      [BpemTask]      at com.sap.ide.dii05.util.internal.lock.DiiConsistencyServiceImpl.executeConsistentWorkspaceRunnable(DiiConsistencyServiceImpl.java:52)
      [BpemTask]      at com.sap.ide.dii08.internal.service.CommandExecutor.executeInWorkspaceAndDevConfLocks(CommandExecutor.java:90)
      [BpemTask]      at com.sap.ide.dii08.internal.service.InternalDiiCommandService.buildDcs(InternalDiiCommandService.java:179)
      [BpemTask]      at com.sap.ide.dii08.internal.service.InternalDiiCommandService.buildDcs(InternalDiiCommandService.java:986)
      [BpemTask]      at com.sap.ide.dii05.ui.internal.actions.dc.BuildAction$2.run(BuildAction.java:193)
      [BpemTask]      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Ant build finished with ERRORS
    com.sap.glx.paradigmInterface.buildapi.BpemBuildException: [BPM.rt_c_exc.000001] Cannot compile exception 'Cancel' without root type
    Build stopped due to an error: com.sap.glx.paradigmInterface.buildapi.BpemBuildException: [BPM.rt_c_exc.000001] Cannot compile exception 'Cancel' without root type
    MOIN forced shutdown initiated.
    Any help will be helpfull.
    Many thanks for assistance, regards,
    Cengiz

    Hello Cengiz,
    Thanks a lot for your quick answer. I did what you suggested without success. The error i get is a also a little bit different than yours (see below). Fact is: i can build in NWDS without any problem. Only when i try to active my source (NWDI) i get the error.
    Do you have any idée?
    Thank you!
    Rabia
    >>>>>>>>>>>>>>>>>>>>>
    PF.DefaultDataArea:DCs/esprit.com/locations/pc_close/_comp/src/triggers/et_startprocessclose.eventdef#E0140AEE25B2A2A02CA811E1B9B18CA982C3473F (MRI)
    BC-BMT-BPM-SRV com.sap.tc.glx.BpemTask processCompilerObj(obj , compDir) - Compiling [com.sap.tc.esmp.mm.xsd1.XsdElementDeclaration (Java Type)
    XSD1.XsdElementDeclaration (MOF Type)
    PF.DefaultDataArea:DCs/esprit.com/locations/pc_close/_comp/src/tasks/ta_close.task#E0019B62669EC564467211E1C4468CA982C3473F (MRI)], CompilerType: TYPECOMPILER
    Error:  "BPM.bp.000021" BC-BMT-BPM-SRV com.sap.tc.glx.BpemTask execute() -  Exception during event definition compilation, compilerType: TYPECOMPILERcaused by com.sap.glx.paradigmInterface.buildapi.BpemBuildException: The XSD schemas of the transitive hull of element '{esprit.com/locations/pc_close/StandaloneTask/TA_close}TA_closeErrorEvent' could not be rendered from the meta model.
         at com.sap.glx.paradigmInterface.bpmn.compiler.type.TypeCompiler.compile(TypeCompiler.java:157)
         at com.sap.tc.glx.BpemTask.processCompiler(BpemTask.java:363)
         at com.sap.tc.glx.BpemTask.processCompiler(BpemTask.java:353)
         at com.sap.tc.glx.BpemTask.callCompilers(BpemTask.java:318)
         at com.sap.tc.glx.BpemTask.execute(BpemTask.java:179)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)
         at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)
         at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:195)
         at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:167)
         at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
         at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
         at java.lang.reflect.Method.invoke(Method.java:611)
         at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
         at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
         at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
         at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
         at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:318)
         at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1432)
         at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1414)
         at com.sap.tc.buildcontroller.CBSBuildController.build(CBSBuildController.java:713)
         at com.sap.tc.buildcontroller.CBSBuildController.execCommand(CBSBuildController.java:478)
         at com.sap.tc.buildcontroller.CBSBuildController.evalCmdLine(CBSBuildController.java:401)
         at com.sap.tc.buildcontroller.CBSBuildController.run(CBSBuildController.java:278)
         at com.sap.tc.buildcontroller.CBSBuildController.mainLoop(CBSBuildController.java:187)
         at com.sap.tc.buildcontroller.CBSBuildController.main(CBSBuildController.java:143)
    Caused by: java.lang.IllegalStateException: The current state is not START_DOCUMENT.

  • Event handling from class to another

    i get toolbarDemo.java which make event handling to JTextArea in the same class
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#ToolBarDemo
    but i have another class and i make object of toolBar class and i move toolBar icons only how can i move the event handling as open ,save,copy,paste to my another class
    i want to ignore actionPerformed of toolBar class and listen to my another's class actionPerformed
    thanks

    Rather than trying to use the ToolBarDemo class as-is you can use/modify the methods in it for your own class, like this:
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import javax.swing.*;
    import javax.swing.text.TextAction;
    public class ToolBarIconTest implements ActionListener
        static final private String OPEN  = "open";
        static final private String SAVE  = "save";
        static final private String COPY  = "copy";
        static final private String PASTE = "paste";
        public void actionPerformed(ActionEvent e)
            String cmd = e.getActionCommand();
            if (OPEN.equals(cmd))
                System.out.println("show a JFileChooser open dialog");
            if (SAVE.equals(cmd))
                System.out.println("show a JFileChooser save dialog");
        private JToolBar getToolBar()
            JToolBar toolBar = new JToolBar();
            addButtons(toolBar);
            return toolBar;
        protected void addButtons(JToolBar toolBar) {
            JButton button = null;
            //first button
            button = makeGeneralButton("Open24", OPEN,
                                       "To open a document",
                                       "Open", this);
            toolBar.add(button);
            //second button
            button = makeGeneralButton("Save24", SAVE,
                                       "To save a document",
                                       "Save", this);
            toolBar.add(button);
            //third button
            button = makeGeneralButton("Copy24", COPY,
                                       "Copy from focused text component",
                                       "Copy", copy);
            toolBar.add(button);
            //fourth button
            button = makeGeneralButton("Paste24", PASTE,
                                       "Paste to the focused text component",
                                       "Paste", paste);
            toolBar.add(button);
        protected JButton makeGeneralButton(String imageName,
                                            String actionCommand,
                                            String toolTipText,
                                            String altText,
                                            ActionListener l) {
            //Look for the image.
            String imgLocation = "toolbarButtonGraphics/general/"
                                 + imageName
                                 + ".gif";
            URL imageURL = ToolBarIconTest.class.getResource(imgLocation);
            //Create and initialize the button.
            JButton button = new JButton();
            button.setActionCommand(actionCommand);
            button.setToolTipText(toolTipText);
            button.addActionListener(l);
            if (imageURL != null) {                      //image found
                button.setIcon(new ImageIcon(imageURL, altText));
            } else {                                     //no image found
                button.setText(altText);
                System.err.println("Resource not found: "
                                   + imgLocation);
            return button;
        private Action copy = new TextAction(COPY)
            public void actionPerformed(ActionEvent e)
                JTextComponent tc = getFocusedComponent();
                int start = tc.getSelectionStart();
                int end = tc.getSelectionEnd();
                if(start == end)
                    tc.selectAll();
                tc.copy();
        private Action paste = new TextAction(PASTE)
            public void actionPerformed(ActionEvent e)
                getFocusedComponent().paste();
        private JPanel getTextFields()
            JPanel panel = new JPanel(new BorderLayout());
            panel.add(new JTextField(12), "North");
            panel.add(new JTextField(12), "South");
            return panel;
        public static void main(String[] args)
            ToolBarIconTest test = new ToolBarIconTest();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test.getToolBar(), "North");
            f.getContentPane().add(test.getTextFields());
            f.setSize(360,240);
            f.setLocation(200,200);
            f.setVisible(true);
    }Use the -cp option as shown in the ToolBarDemo class comments
    C:\jexp>java -cp .;path_to_jar_file/jlfgr-1_0.jar ToolBarIconTest

  • Regarding Event Handler

    Hi,
    I have configured SAP event managment based on configuration guide. I am new to SAP EM.
    Can you let me know the followings-:
    1) Is Event handler needs to be activated. If so how?
    2) I am not getting any data when executing Event handler list in transaction /SAPTRX/EH_LIST.
    Regards
    Somnath

    Hi,
    What is the Business Process type you have used? You may use SLG1 to check for errors.
    Cheers
    Vinod

  • Unable to get automatic event handling for OK button.

    Hello,
    I have created a form using creatobject. This form contains an edit control and Search, Cancel buttons. I have set the Search buttons UID to "1" so it can handle the Enter key hit event. Instead its caption changes to Update when i start typing in the edit control and it does not respond to the Enter key hit. Cancel happens when Esc is hit.
    My code looks like this -
    Dim oCreationParams As SAPbouiCOM.FormCreationParams
            oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            oCreationParams.UniqueID = "MySearchForm"
            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
                    Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.AddEx(oCreationParams)
    oForm.Visible = True
    '// set the form properties
            oForm.Title = "Search Form"
            oForm.Left = 300
            oForm.ClientWidth = 500
            oForm.Top = 100
            oForm.ClientHeight = 240
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Search"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
    oItem = oForm.Items.Add("NUM", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oItem.Left = 105
            oItem.Width = 140
            oItem.Top = 20
            oItem.Height = 16
            Dim oEditText As SAPbouiCOM.EditText = oItem.Specific
    What changes do i have to make to get the enter key to work?
    Thanks for your help.
    Regards,
    Sheetal

    Hello Felipe,
    Thanks for pointing me to the correct direction.
    So on refering to the documentation i tried out a few things. But I am still missing something here.
    I made the following changes to my code -
    oForm.AutoManaged = True
    oForm.SupportedModes = 1 ' afm_Ok
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, 1, SAPbouiCOM.BoModeVisualBehavior.mvb_Default)
            oButton = oItem.Specific
            oButton.Caption = "OK"
    AND
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.AffectsFormMode = False
    I get the same behaviour OK button changes to update and enter key does not work.
    Could you please tell me find what is it that i am doing wrong?
    Regards,
    Sheetal

  • Input value given on web page is not getting pickedup in event handler

    Hi friends,
    I have created one simple page in SE80 with program with flow logic option, in which I would like to show business partner details from BUT000 table with the input of partner number. But the thing is the input value(partner no.)which I am giving on web page is not getting picked up in selection in event handler though I am giving input value it is becoming initial while selecting. What could be the reason?
    Below I am mentioning the code which I have written in even handler for OnInputProcessing event.
    CASE EVENT_ID.
    WHEN 'select'.
    NAVIGATION->SET_PARAMETER( 'partner' ).
    SELECT * FROM but000 INTO TABLE I_but000 WHERE partner BETWEEN partner AND partner1.
    WHEN OTHERS.
    ENDCASE.
    Thanks in advance,
    Steve

    Hi Abhinav,
    I tried with the one you posted. But it is giving run time error as shown below.
    Note
    The following error text was processed in the system CRD : Access via 'NULL' object reference not possible.
    The error occurred on the application server crmdev_CRD_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: ONINPUTPROCESSING of program CLO24DDFJW575HVAQVJ89KWHEHC9OCP
    Method: %_ONINPUTPROCESSING of program CL_O24DDFJW575HVAQVJ89KWHEHC9OCP
    Method: DO_REQUEST of program CL_BSP_PAGE===================CP
    Method: ON_REQUEST of program CL_BSP_RUNTIME================CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_HTTP_EXT_BSP===============CP
    Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    Regards,
    Steve

  • How do I create an Event Handler for an Execute SQL Task in SSIS if its result set is empty

    So the precedence on my entire package executing is based on my first SELECT of my Table and an updatable column. If that SELECT results in an empty result set, how do I create an Event Handler to handle an empty result set?
    A Newbie to SSIS.
    I appreciate your review and am hopeful for a reply.
    PSULionRP

    Depends upon what you want to do in the eventhandler. this is what you can do
    Store the result set from the Select to a user variable.
    Pass this user variable to a Script task.
    In the Script task do whatever you want to do including failing the package this can be done by failing the script task, which in turns fails the package. something like
    Dts.TaskResult = Dts.Results.Failure
    Abhinav http://bishtabhinav.wordpress.com/

  • Swing: when trying to get the values from a JTable inside an event handler

    Hi,
    I am trying to write a graphical interface to compute the Gauss Elimination procedure for solving linear systems. The class for computing the output of a linear system already works fine on console mode, but I am fighting a little bit to make it work with Swing.
    I put two buttons (plus labels) and a JTextField . The buttons have the following role:
    One of them gets the value from the JTextField and it will be used to the system dimension. The other should compute the solution. I also added a JTable so that the user can type the values in the screen.
    So whenever the user hits the button Dimensiona the program should retrieve the values from the table cells and pass them to a 2D Array. However, the program throws a NullPointerException when I try to
    do it. I have put the code for copying this Matrix inside a method and I call it from the inner class event handler.
    I would thank you very much for the help.
    Daniel V. Gomes
    here goes the code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import AdvanceMath.*;
    public class MathF2 extends JFrame {
    private JTextField ArrayOfFields[];
    private JTextField DimOfSis;
    private JButton Calcular;
    private JButton Ativar;
    private JLabel label1;
    private JLabel label2;
    private Container container;
    private int value;
    private JTable DataTable;
    private double[][] A;
    private double[] B;
    private boolean dimensionado = false;
    private boolean podecalc = false;
    public MathF2 (){
    super("Math Calcs");
    Container container = getContentPane();
    container.setLayout( new FlowLayout(FlowLayout.CENTER) );
    Calcular = new JButton("Resolver");
    Calcular.setEnabled(false);
    Ativar = new JButton("Dimensionar");
    label1 = new JLabel("Clique no bot�o para resolver o sistema.");
    label2 = new JLabel("Qual a ordem do sistema?");
    DimOfSis = new JTextField(4);
    DimOfSis.setText("0");
    JTable DataTable = new JTable(10,10);
    container.add(label2);
    container.add(DimOfSis);
    container.add(Ativar);
    container.add(label1);
    container.add(Calcular);
    container.add(DataTable);
    for ( int i = 0; i < 10 ; i ++ ){
    for ( int j = 0 ; j < 10 ; j++) {
    DataTable.setValueAt("0",i,j);
    myHandler handler = new myHandler();
    Calcular.addActionListener(handler);
    Ativar.addActionListener(handler);
    setSize( 500 , 500 );
    setVisible( true );
    public static void main ( String args[] ){
    MathF2 application = new MathF2();
    application.addWindowListener(
    new WindowAdapter(){
    public void windowClosing (WindowEvent event)
    System.exit( 0 );
    private class myHandler implements ActionListener {
    public void actionPerformed ( ActionEvent event ){
    if ( event.getSource()== Calcular ) {
    if ( event.getSource()== Ativar ) {
    //dimensiona a Matriz A
    if (dimensionado == false) {
    if (DimOfSis.getText()=="0") {
    value = 2;
    } else {
    value = Integer.parseInt(DimOfSis.getText());
    dimensionado = true;
    Ativar.setEnabled(false);
    System.out.println(value);
    } else {
    Ativar.setEnabled(false);
    Calcular.setEnabled(true);
    podecalc = true;
    try {
    InitValores( DataTable, value );
    } catch (Exception e) {
    System.out.println("Erro ao criar matriz" + e );
    private class myHandler2 implements ItemListener {
    public void itemStateChanged( ItemEvent event ){
    private void InitValores( JTable table, int n ) {
    A = new double[n][n];
    B = new double[n];
    javax.swing.table.TableModel model = table.getModel();
    for ( int i = 0 ; i < n ; i++ ){
    for (int j = 0 ; j < n ; j++ ){
    Object temp1 = model.getValueAt(i,j);
    String temp2 = String.valueOf(temp1);
    A[i][j] = Double.parseDouble(temp2);

    What I did is set up a :
    // This code will setup a listener for the table to handle a selection
    players.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    ListSelectionModel rowSM = players.getSelectionModel();
    rowSM.addListSelectionListener(new Delete_Player_row_Selection(this));
    //Class will take the event and call a method inside the Delete_Player object.
    class Delete_Player_row_Selection
    implements javax.swing.event.ListSelectionListener
    Delete_Player adaptee;
    Delete_Player_row_Selection (Delete_Player temp)
    adaptee = temp;
    public void valueChanged (ListSelectionEvent listSelectionEvent)
    adaptee.row_Selection(listSelectionEvent);
    in the row_Selection function
    if(ex.getValueIsAdjusting()) //To remove double selection
    return;
    ListSelectionModel lsm = (ListSelectionModel) ex.getSource();
    if(lsm.isSelectionEmpty())
    System.out.println("EMtpy");
    else
    int selected_row = lsm.getMinSelectionIndex();
    ResultSetTableModel model = (ResultSetTableModel) players.getModel();
    String name = (String) model.getValueAt(selected_row, 1);
    Integer id = (Integer) model.getValueAt(selected_row, 3);
    This is how I got info out of a table when the user selected it

  • How to get a form field valud in delete PL/SQL Button Event Handler

    Hi Friend,
    I have a form. when user clicks delete button. we want to remove system dodelete function
    and add a delete script
    Under delete-top category,
    how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
    DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
    But when I try to save this form and get message as
    1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
    Thanks for any help!
    newuser

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • WPF UI running in seperate runspace - able to set/get controls via synchronized hash table, but referencing the control via the hash table from within an event handler causes both runspaces to hang.

    I am trying to build a proof of concept where a WPF form is hosted in a seperate runspace and updates are handled from the primary shell/runspace. I have had some success thanks to a great article by Boe Prox, but I am having an issue I wanted to open up
    to see if anyone had a suggestion.
    My goals are as follows:
    1.) Set control properties from the primary runspace (Completed)
    2.) Get control properties from the primary runspace (Completed)
    3.) Respond to WPF form events in the UI runspace from the primary runspace (Kind of broken).
    I have the ability to read/write values to the form, but I am having difficulty with events. Specifically, I can fire and handle events, but the minute I try to reference the $SyncHash from within the event it appears to cause a blocking condition hanging both
    runspaces. As a result, I am unable to update the form based on an event being fired by a control.
    In the example below, the form is loaded and the following steps occur:
    1.) Update-Combobox is called and it populates the combobox with a list of service names and selects the first item.
    2.) update-textbox is called and sets the Text property of the textbox.
    3.) The Text value of the textbox is read by the function read-textbox and output using write-host.
    4.) An event handle is registered for the SelectionChanged event for the combobox to call the update-textbox function used earlier.
    5.) If you change the selection on the combobox, the shell and UI hangs as soon as $SyncHash is referenced. I suspect this is causing some sort of blocking condition from multiple threads trying to access the synchronized nature of the hash table, but I am
    unsure as to why / how to work around it. If you comment out the line "$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})" within update-textbox the event handler will execute/complete.
    $UI_JobScript =
    try{
    Function New-Form ([XML]$XAML_Form){
    $XML_Node_Reader=(New-Object System.Xml.XmlNodeReader $XAML_Form)
    [Windows.Markup.XamlReader]::Load($XML_Node_Reader)
    try{
    Add-Type –AssemblyName PresentationFramework
    Add-Type –AssemblyName PresentationCore
    Add-Type –AssemblyName WindowsBase
    catch{
    Throw "Unable to load the requisite Windows Presentation Foundation assemblies. Please verify that the .NET Framework 3.5 Service Pack 1 or later is installed on this system."
    $Form = New-Form -XAML_Form $SyncHash.XAML_Form
    $SyncHash.Form = $Form
    $SyncHash.CMB_Services = $SyncHash.Form.FindName("CMB_Services")
    $SyncHash.TXT_Output = $SyncHash.Form.FindName("TXT_Output")
    $SyncHash.Form.ShowDialog() | Out-Null
    $SyncHash.Error = $Error
    catch{
    write-host $_.Exception.Message
    #End UI_JobScript
    #Begin Main
    add-type -AssemblyName WindowsBase
    [XML]$XAML_Form = @"
    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Window.Resources>
    <DataTemplate x:Key="DTMPL_Name">
    <TextBlock Text="{Binding Path=Name}" />
    </DataTemplate>
    </Window.Resources>
    <DockPanel LastChildFill="True">
    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
    <Label Name="LBL_Services" Content="Services:" />
    <ComboBox Name="CMB_Services" ItemTemplate="{StaticResource DTMPL_Name}"/>
    </StackPanel>
    <TextBox Name="TXT_Output"/>
    </DockPanel>
    </Window>
    $SyncHash = [hashtable]::Synchronized(@{})
    $SyncHash.Add("XAML_Form",$XAML_Form)
    $SyncHash.Add("InitialScript", $InitialScript)
    $Normal = [System.Windows.Threading.DispatcherPriority]::Normal
    $UI_Runspace =[RunspaceFactory]::CreateRunspace()
    $UI_Runspace.ApartmentState = [System.Threading.ApartmentState]::STA
    $UI_Runspace.ThreadOptions = [System.Management.Automation.Runspaces.PSThreadOptions]::ReuseThread
    $UI_Runspace.Open()
    $UI_Runspace.SessionStateProxy.SetVariable("SyncHash",$SyncHash)
    $UI_Pipeline = [PowerShell]::Create()
    $UI_Pipeline.Runspace=$UI_Runspace
    $UI_Pipeline.AddScript($UI_JobScript) | out-Null
    $Job = $UI_Pipeline.BeginInvoke()
    $SyncHash.ServiceList = get-service | select name, status | Sort-Object -Property Name
    Function Update-Combobox{
    write-host "`nBegin Update-Combobox [$(get-date)]"
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.ItemsSource = $SyncHash.ServiceList})
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.SelectedIndex = 0})
    write-host "`End Update-Combobox [$(get-date)]"
    Function Update-Textbox([string]$Value){
    write-host "`nBegin Update-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})
    write-host "End Update-Textbox [$(get-date)]"
    Function Read-Textbox(){
    write-host "`nBegin Read-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke($Normal,[action]{$Global:Return = $SyncHash.TXT_Output.Text})
    $Global:Return
    remove-variable -Name Return -scope Global
    write-host "End Read-Textbox [$(get-date)]"
    #Give the form some time to load in the other runspace
    $MaxWaitCycles = 5
    while (($SyncHash.Form.IsInitialized -eq $Null)-and ($MaxWaitCycles -gt 0)){
    Start-Sleep -Milliseconds 200
    $MaxWaitCycles--
    Update-ComboBox
    Update-Textbox -Value $("Initial Load: $(get-date)")
    Write-Host "Value Read From Textbox: $(Read-TextBox)"
    Register-ObjectEvent -InputObject $SyncHash.CMB_Services -EventName SelectionChanged -SourceIdentifier "CMB_Services.SelectionChanged" -action {Update-Textbox -Value $("From Selection Changed Event: $(get-date)")}

    Thanks again for the responses. This may not be possible, but I thought I would throw it out there. I appreciate your help in looking into this.
    To clarify the "Respond to control events in the main runspace"... I'm would like to have an event generated by a form object in the UI runspace (ex: combo box selectionchanged event) trigger a delegate within the main runspace and have that delegate in
    the main runspace update the form in the UI runspace.
    ex:
    1.) User changes selection on combo box generating form event
    2.) Event calls delegate (which I have gotten to work)
    3.) Delegate does some basic processing (works)
    4.) Delegate attempts to update form in UI runspace (hangs)
    As to the delegates / which runspace they are running in. I see the $synchash variable if I run get-var within a delegate, but I do not see the $Form variable so I am assuming that they are in the main runspace. Do you agree with that assumption?

  • BPM 11g - Human task not removed when interrupting boundary event fired

    In BPM 11g (11.1.1.1.3), I am testing a message catch event on the boundary of a human task. It is set for interrupting, so it should, when the event fires, remove the human task from the work list and follow the flow out of the event. The event flow is being followed, but the human task is being left active in the user's work list. I would expect the human task to be removed when the interrupting boundary message event occurs.
    I think this is a bug, but would welcome any suggestions on how to solve it. Does anyone know if this works in the latest release (11.1.1.1.4)? We might upgrade pretty soon. Has anyone else tried boundary message events and gotten them to work properly in BPM 11g?
    Just FYI....in order to make the BPM message event occur and provide instance correlation, we had to add a mediator and BPEL correlation. We followed process documented in a previous post to do this (http://blog.andrade.inf.br/2011/01/implementing-correlation-in-bpm-11gr1.html). Thanks to whomever posted that...it got us a few steps further along!

    I do not think this is bug based on
    Oracle® Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management
    23.1.1 Understanding the Relationship Between SOA Composites and SOA Components
    "In a similar way, when an interrupting timer or message boundary event arrives to a user task, the BPMN process instance leaves the user task but the associated Human Task remains available. Because the interrupting timer or message boundary event arrived before the user completes the user task, the human task remains unfinished, and you can still access it thought the Worklist application. However running that human task does not have any effect on the BPMN process."
    This also gives us big trouble. I am looking for the solution.
    Helen

  • Getting error in event handler method onPlugFromStartView

    Hi,
           I am getting error in event handler method onPlugFromStartView java coding. The error message is u201CThe method wdGetwelcome componentcontroller() is undefined for the IPrivatevieew.
    Plese explain how to resolve this error to deploy the webdynpro application successfully.
    Thanks,
    Kundan.

    Hi
    1.It seems some thing corrupt or some problem .
    2. Do one exercise Create one new Dc --component -View ,In component write one method.
        a)  Open the view and then try to add that component.
    Let us know the result
    Best Regards
    Satish Kumar

  • Post Process Event Handler not getting user's CURRENT_STATE for a UDF field

    I have a post process event handler in OIM R2 BP04 , which runs on Trusted Reconciliation and it compares user's ("CURRENT_USER") state and ("NEW_USER_STATE") and based on that derives a business logic.
    The problem that i am  facing is that, it is not able to get the User's ("CURRENT_USER") state for a UDF(EMAIL_LIST) field and it is coming as null,and  hence is breaking the business logic.The same Event Handler is working on TEST and QA ( 4 node cluster)environments and is not working on PROD environment( 4 node cluster).
    The different thing that was done on was that during the initial recon the event Handler was not present  and after the initial load of the users i have manually executed the database sql query which have updated the "EMAIL_LIST field manually for all the users
    I think  that since during the initial recon as the  EMAIL_LIST was not populated and was  populated  through the SQL update for all the users, the orchestration inter event data does not contain email list, and so it is coming as null.
    But i am seeing the same behavior for new records as well, which are created and  then updated after event handler is registered.
    Please reply, if you have encountered something similar.
    Thnx
    Akshat

    Yes i need the old state, which is
                        Identity[] oldUserStatesIdntArr =
                            (Identity[])(Identity[])interEventData.get("CURRENT_USER");

  • Event handler getting fired on all list and libraries

    I have created an event handler and add it to a custom content type. Some how this event handler is getting fired on each every list which are there inside a site. Below is my content type declaration with fields and event handler. This content type
    is being activated using a featur scope at "Site".
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Document (0x0101) -->
    <ContentType ID="0x01010069131024FE3C485FAEF6C36926B5FD67" Name="CIB Document" Group="CIB Content Types" Description="CIB Content Types" Inherits="FALSE" Version="0">
    <FieldRefs>
    <RemoveFieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Hidden="TRUE" Name ="Title"></RemoveFieldRef>
    <FieldRef Name="Metier"
    ID="{F3ABF2F2-437B-4403-8A11-BEAE9F507009}"
    DisplayName="Metier"
    Sealed="TRUE"
    Required="FALSE" />
    <FieldRef Name="Department"
    ID="{0B11D33C-B8D1-485F-A483-755BFE55C2B9}"
    DisplayName="Department"
    Sealed="TRUE"
    Required="FALSE" />
    <FieldRef Name="Owner"
    ID="{FC6FE3D4-5EEE-4812-A77C-499AB9927D1A}"
    DisplayName="Owner"
    Sealed="TRUE"
    Required="FALSE" />
    <FieldRef Name="ExpiryDate"
    ID="{D68E037B-63A2-42FF-8150-412972CB062F}"
    DisplayName="Expiry Date"
    Sealed="TRUE"
    Required="FALSE" />
    <FieldRef Name="SecurityStatus"
    ID="{5954E9C2-921B-46FB-8A7B-2BC0F62BD011}"
    DisplayName="Security Status"
    Sealed="TRUE"
    Required="FALSE" />
    </FieldRefs>
    <XmlDocuments>
    <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
    <spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
    <Receiver>
    <Name>CIBDocumentHandlerItemAdding</Name>
    <Type>ItemAdding</Type>
    <Assembly>Common.SharePoint.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68d03adf96d84a47</Assembly>
    <Class>Common.SharePoint.Web.Handlers.CIBDocumentHandler</Class>
    <SequenceNumber>10500</SequenceNumber>
    </Receiver>
    </spe:Receivers>
    </XmlDocument>
    </XmlDocuments>
    </ContentType>
    </Elements>

    You need to add the ListTemplateId or ListUrl to the Receiver element,
    E.g. If you had a list definition with the template ID 10500, then your event receiver XML would look like this:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Receivers ListTemplateId="10500" >
    <Receiver>
    <Name>CIBDocumentHandlerItemAdding</Name>
    <Type>ItemAdding</Type>
    <Assembly>Common.SharePoint.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68d03adf96d84a47</Assembly>
            <Class>Common.SharePoint.Web.Handlers.CIBDocumentHandler</Class>
    <SequenceNumber>10500</SequenceNumber>
    </Receiver>
    </Receivers>
    </Elements>
    Regards, Matthew
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

Maybe you are looking for

  • Purchase Register Report

    Hi Friends,          I need to develop the Purchase Register Report with Vendor details, TIN number, Invoice details, E1 purchases with purchase base value and VAT and CST percentages. But Iam new to the Purchase module. I know the basic tables for p

  • Mail won't go online with IMAP but Exchange works

    Mac mail has beeen working fine for me for many years. Last day or so all my non Exhcange accounts won't go online. I read through the forum. I have checked the connection doctor. It is "unable to contact server". I tried network utility to port scan

  • Problem in importing XML Data In Acrobat - X

    Hello All, I have a LiveCycle form where I am embedding a sample XML into it. (No data connection and no binding). After filling the form when the user clicks the submit button before submitting the XML it removes all the nodes of the sample XML that

  • Updating values with in the same table for other records matching conditions

    Hi Experts, Sorry for not providing the table structure(this is simple structure) I have a requirement where i need to update the columns of a table based on values of the same table with some empid and date  match. If the date and empid match then i

  • HT201335 can i air play mirroring wit mac lap top to apple tv?

    can i air play mirroring wit mac lap top to apple tv?