Cannot trigger exception in an asynchronous task

I am trying to get an asynchonous task to follow a control path that it should go down when an exception is raised, but it isn't working.
Brief description of task: it is  a method that creates a sales order in the background. It is asynchronous because I need the sales order to exist in the database before the next step in the workflow, which uses the order as a reference.
The exception that I want to raise should happen if I cannot get a sales order number returned from the code (the number is assigned before the order exists in the database); in that case, I want the exception to be raised.
In the exception path, I want to use a process flow step that marks the current workflow task obsolete, and executes the obsolete path to create a sales order in the foreground.
Problem is, whenever I try to raise the exception, the asynchronous task just stays in state STARTED. I wonder if this is because the event for completing the task has not been triggered.
So is it possible to raise exceptions in asynchronous tasks, and make the task obsolete before the terminating event has been received?

Thanks for the clarification; I must admit that sounds like a bad architectural design flaw to me.
This case is exactly why; the task uses a method that calls VA01 in background mode. It will not return a value of sales order number if it cannot create the sales order. However, since the task is asynchronous, and the terminating event is to receive the order created event from the BUS2032 sales order business object, it will wait forever to finish this step.
That's why I want to raise an exception if the sales order could not be created, but as you say, in an asynchronous task, that is not possible.
So what could be a better alternative? One possibility that I can think of is for the sales order creation task to be synchronous, and then have a follow-up task that checks that the sales order exists in the database before going forward. Does that sound reasonable?

Similar Messages

  • Cannot trigger exceptions at all

    If I put an exception in a method, asynchronous or synchronous using EXIT_RETURN, I can test the method and watch it raise the exception.
    If I put the method into a task, and make the exception one of the available paths, the workflow NEVER follows that task, even if I explicitly code the method to guarantee to raise the exception (i.e. not in any conditional code).
    I have tried all different levels of exception type, and have now tried to do this by creating three different tasks so that there were no buffering issues; I cannot get exceptions raised.
    Help!

    Hi Anthony,
    What release? What type of SAP system? (R/3, SRM, ?)
    Are you using BOR objects or ABAP OO?
    Also how have you activated the exception as an outcome in your workflow - this is a critical step as otherwise the workflow will ignore the outcome and pass it to the usual error handling mechanism. 
    Critical pieces are this:
    1. Exception defined in the "Exceptions" section of the method with an equivalent message id/number. You really want it to be an application error in this case.
    2. Exception coded in the method.
    3. Task linked to method.
    4. Workflow step linked to task - exception will appear as an outcome.  By default that outcome is de-activated - you have to activate that outcome to make it available.
    5. Add something in the path following the outcome - a send mail or even a container op will do - something which will make it clear to see in the workflow log that the follow on step has started.
    And make sure you expand the task line and scroll to the right when looking at the workflow log - you should see an outcome received text in the log.
    If you still don't see anything, check to see if an email notification of the exception was sent to the administrator via the error handling job.
    Regards,
    Jocelyn
    Message was edited by: Jocelyn Dart

  • Error Message: There was an error opening this document. Acrobat cannot open this file because a task is still active in Acrobat.

    I've tried Command Q to close;  Tried Adobe Reader Tool Bar but closing is grayed out;  I'ved held the power button for hard close, but everytime I try to open a .pdf I get this message: 
    There was an error opening this document. Acrobat cannot open this file because a task is still active in Acrobat.
    I'm not extremely technical, but I can follow directions if someone can help!
    Thanks

    Looks like it got stuck.
    You can switch to another program or the Finder (click on desktop) and Apple menu > Force Quit > Adobe
    You can press and hold the power button, it's a emergency force shutdown which you can boot normally and it should be fine.

  • Cannot get exception-type to work

              WLS 60 SP1 (#101616)
              Cannot get <exception-type> to work. WLS shows standard &#8220;Internal error
              500&#8221; page instead of a custom error page. The custom error page is shown
              if <error-code> is used instead of <exception-type>.
              Any ideas? Thanks
              

    Hi @utopian,
    Welcome to the HP Forums!
    I understand that you cannot scan with your HP Officejet Pro 8500 on Windows 7 using a wireless network. I am happy to look into this issue for you!
    Please take a look through this scanning guide, A 'Connection Error' or 'No Computer Detected' Error Message Displays during Scanning for HP Officej....
    Hope this guide helps!  
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Using a Counter as a start trigger to one or more tasks

    I am using the NI USB-6251. I want to configure a counter (e.g. Dev1/ctr0) at a user-specified frequency and the rising edge on this counter should act as a start trigger for an analog input task and a digital output task. 
    I've tried to do this by creating a task for the counter:
    integStartTriggerTask.COChannels.CreatePulseChanne​lFrequency(
    "Dev1/ctr0",
    "Integration Start Trigger",
    COPulseFrequencyUnits.Hertz,
    COPulseIdleState.Low,
    0,
    integFreqHz,
    0.5);
    and then connecting this to the StartTrigger for the analog input task:
    analogReadTask.Triggers.StartTrigger.ConfigureDigi​talEdgeTrigger("Dev1/ctr0", DigitalEdgeStartTriggerEdge.Rising);
    However running this gives the error: 
    Source terminal to be routed could not be found on the device.
    Make sure the terminal name is valid for the specified device. Refer to Measurement & Automation Explorer for valid terminal names.
    Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.​Source
    Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.​Edge
    Source Device: Dev1
    Source Terminal: Dev1/ctr0
    Task Name: analogReadTask
    I have also tried "Dev1/ctr0/StartTrigger" instead of "Dev1/ctr0". What am I doing incorrectly? Thanks.

    Hi zkhan.cimtec,
    To use a digital trigger for your start task you need to use a PFI line to read a signal that is coming in. You are setting up a task that outputs a start trigger on your counter line, but you can't read off that same line to start the task since that line is already configured for output. An example of how to setup a start trigger coming into a PFI line can be found in the examples here:
    <National Instruments Public>\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Cont Acq-Ext Clk-Dig Start
    Hope this helps,
    Kevin

  • Cannot create a region from a task flow containing facelets fragments in a

    hi
    Please consider ADF applications migrated from JDeveloper 11g R1 to 11g R2 [1].
    When using JDeveloper 11g R2 to create a task-flow containing facelets fragments and dropping it on an existing/migrated page (created using JDeveloper 11g R1) results in a message :
    "Cannot create a region from a task flow containing facelets fragments in a jspx page.".
    What would be "good guidelines" (do's and don't's) of using facelets aspects in an ADF application migrated from JDeveloper 11g R1 to 11g R2?
    - [1] e.g. specifically JDeveloper 11.1.1.6.0 to JDeveloper 11.1.2.4.0, see also forum thread "migration support from 11.1.1.6.0 to 11.1.2.4.0"
    at migration support from 11.1.1.6.0 to 11.1.2.4.0
    many thanks
    Jan Vervecken

    Thanks for your reply Timo.
    Timo Hahn wrote:
    ... just a wild guess: Oracle is lazy here. They did not expect too many people migrating from a running 11.1.1.6.0 or 11.1.1.7.0 to 11.1.2.4.0. ...Hmm ... maybe.
    ... We had this discussion before: is 11.1.2.4.0 a good migration target? ...Can you refer to that discussion exactly.
    It is not the same as in forum thread "choosing JDeveloper 11g R1 or JDeveloper 11g R2 "
    at choosing JDeveloper 11g R1 or JDeveloper 11g R2
    which does not talk about migration to 11g R2.
    ... My answer was and still is: No. ... I don't see a reason why to do a migration to 11.1.2.x. ...We are considering if a migration to 11g R2 will allow us to make our application "facelets ready", which could potentially allow easier migration to 12c .
    Altough Brian Fry (Oracle) wrote "Re: choosing JDeveloper 11g R1 or JDeveloper 11g R2", the "facelets considerations" in this current forum thread could suggest something different.
    ... I know that we have to migrate to 12c once it'll be available so why the extra step? ...There could be layout requirements that can be perceived to be more easily/flexibly implemented using facelets.
    A team could have resources available now, and maybe not in a couple of months (related to wanting/needing to use facelets, and related to the "perceived/expected complexity" of an 11g R1 to 12c migration compared to an 11g R2 to 12c migration).
    ... (you know how complex this can be) ...Maybe less knowing, and more trying to find out.
    ... in a couple of month when 12c is available. ...How do you know it will be only "a couple of month" before 12c is available. Do you have specific references that confirm this?
    many thanks
    Jan

  • MS ACCESS EXCEPTION TOO MANY CLIENT TASKS

    hi all
    i am developing an application in jsp for calll center users.
    there are 4 types of users who can interact with the appl
    in that 100 users of one type are interacting with it.
    i am using MS ACCESS for the database connection.
    it is working well when 10 users simultaneously logs in
    but when users increases its capacity degrades and it throws an exception TOO MANY CLIENT TASKS
    i have surfed through net and diffrent forums in that the soln is to switch to Mysql or SQL SERVER
    i had talked to the PM
    he needs in MS ACCESS itself
    i am using tomcat version 5 jdk 1.5

    LOVECODING wrote:
    hi all
    i am developing an application in jsp for calll center users.
    there are 4 types of users who can interact with the appl
    in that 100 users of one type are interacting with it.
    i am using MS ACCESS for the database connection.
    it is working well when 10 users simultaneously logs in
    but when users increases its capacity degrades and it throws an exception TOO MANY CLIENT TASKS
    i have surfed through net and diffrent forums in that the soln is to switch to Mysql or SQL SERVER
    i had talked to the PM
    he needs in MS ACCESS itselfSounds like your PM is screwed.
    i am using tomcat version 5 jdk 1.5Irrelevant.
    %

  • Cannot run Register Test on communications task through Hardware Diagnostics Tool

    Cannot run Register Test on communications task through Hardware Diagnostics Tool. Please help. Thanks.

    Hi,
    Insert the created CD into your optical drive and power off your PC. Power on the PC and boot up the CD containing the standalone diagnostics.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • Asynchronous Tasks using JavaFX 2.1???

    Can somebody help me with sample code for creating asynchronous Tasks using JavaFX 2.1.
    In this request, I need to make a call to server and get certain required information.

    Look at the Task and Service classes. There are examples in the javadoc.

  • Workflow is not moving to next incase of asynchronous task

    Hi Gurus,
    I have a requirement to use asynchronous method and tasks in my workflow. For completing the asynchronous tasks, I am calling SWE_EVENT_CREATE with an event to complete the task from Web Dynpro Application. However, Event Linkage has benn deactivated automatically and the task remains in InProcess status.
    Please provide your suggestions ASAP.
    Thanks in Advance
    Gopal.

    For completing the asynchronous tasks, I am calling SWE_EVENT_CREATE
    with an event to complete the task from Web Dynpro Application
    Make sure that after calling the above Funciton module you have defined a COMMIT WORK statement. But before this as you were saying that the event linkage got deactivated, so please make sure that the event linkage is active......

  • Asynchronous task workitem

    Hi ,
    I have defined a terminating event " PROCESSED" for element "_WORKITEM " in "Terminating events" tab of task definition.
    when ever my Asynchronous task workitem is opened and closed without procesing, the workitem disappears from
    SAP Inbox .
    but the wokitem should be in inbox until the workitem is processed ( that means invoice gets posted from workitem ).
    please let me know the solution to resolve this issue.
    Note : only the folllowing terminating events availble . a) Processed b) created c) Deleted for element "_WORKITEM "
    Thanks ,
    Sarath.

    Hi Sarath,
    I have used follwing setting for terminating event used in a task
    Element : WIOBJECT_ID     
    Object Category :ABAP Class     
    Object Type :ZITEM     
    Event : APPROVED
    This works for me.
    Please check "Synchronous Object Mehod " must not be checked in Basic data tab of tha task.
    Thanks and regards,
    SNJY

  • NI DAQmx Digital Output Trigger To Start Analog Input Task

    Hi everyone.  I am using the NI DAQmx VIs to set a digital output line low (boolean '0').  I want to begin reading an Analog Input voltage (Start Analog Input Voltage reading task) right after the digital output line is set low.  I am using the DAQmx Start Trigger (Digital Edge).vi to try and do this.  I have the digital edge to trigger off a falling edge since the digital output line is being set low.  I am using "do/SampleClock" as the source into the DAQmx Start Trigger (Digital Edge).vi.  
    I don't have the DAQ card (PXI 6229) since someone else is using it but I wanted to write up the SW so that when it becomes available I can have SW to try out.
    I have attached the VI.  Am I setting up this VI correctly?
    Thanks!
    Attachments:
    Trigger AI Task Off DO Edge.vi ‏32 KB

    I think you are going to have to wire that Digital Output to a PFI line on the card with the Analog Input(s).  You then trigger on that PFI line.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Human Task worklist cannot auto save when submitting a Task Action

    Hi
    We are using SOA 10.1.3.1. In BPM worklist, if user doesn’t click the “save” button to save all the modified changes, all the modified records in the custom task form cannot store back to BPEL variables.
    1.Is there any ways to auto save all the modified info during the Task Action Submission (e.g. on choosing the APPROVAL outcome -> help user to auto save the records)?
    2.Or any ways to force user to click "Save" before clicking the "Approval" on Task Action?
    Any suggestion is highly appreciated.
    Thanks.

    Resolved by disabling pop-up blocking in IE8.

  • Naming Exception error in initiate task

    Hi guys, I'm really in need of help. I'm getting naming exception error in my initiate task. There is no error code from bpel. I had copied my workflow from my development server (using oracle 10g) to my production server (using oracle 9i). I did not get this error when I'm in my development server.
    The difference between these two servers are:
    1) IP address
    2) Oracle database version as stated above
    3) domain name
    The initiate task is just after setsystemdefineattribute and before my next task of sending email. The error did not halt the workflow but continue to the task of sending email.
    Can someone help me? I can't seems to find the error which cause this problem.

    I've found out the reason why I'm getting the naming exception error. It is due to wrong configuration in is_config.xml. I'm using Active Directory instead of JAZN and somehow I configure it wrongly to get the error.
    I've switch back to JAZN XML base provider and it is working fine now but I would want to use the active directory as my identity service provider.
    Currently my active directory in my production server is win2000. I'm using the is_config_for_activedirectory template but I still don't understand what values is needed to provide for the is_config.
    Below are some of the items I don't understand.
    1) Can I still use this if my AD is on win2k? If not, what should i use as I'm using AD as my id service provider now.
    2) The default xmlns after the tag <BPMIdentityServiceConfig> do we need to change it? If so, to what values?
    3) What is this property name and values after the providerType?
    4) What is needed for binddn? I only know what to put for ou and dc but I'm not sure about cn.
    5) What is this password for and whose password?
    6) The whole lot under userControls and roleControl, I'm totally lost.
    I've read through the Identity Service Provider (16.7.1) but I still can't understand how to config the active directory part.
    I really hope someone could help enlighten me on this. Thanks
    Hi guys, I'm really in need of help. I'm getting
    naming exception error in my initiate task. There is
    no error code from bpel. I had copied my workflow
    from my development server (using oracle 10g) to my
    production server (using oracle 9i). I did not get
    this error when I'm in my development server.
    The difference between these two servers are:
    1) IP address
    2) Oracle database version as stated above
    3) domain name
    The initiate task is just after
    setsystemdefineattribute and before my next task of
    sending email. The error did not halt the workflow
    but continue to the task of sending email.
    Can someone help me? I can't seems to find the error
    which cause this problem.

  • AFTER SERVERERROR trigger exceptions

    AFTER SERVERERROR triggers fire after an Oracle error is raised, unless the error is one of the following:
    ORA-00600 Oracle internal error (understandable)
    ORA-01034 Oracle not available (understandable)
    ORA-01403 No data found
    ORA-01422 Exact fetch returns more than requested number of rows (too many rows)
    ORA-01423 Error encountered while checking for extra rows in an exact fetch
    ORA-04030 Out-of-process memory when trying to allocate N bytes
    Anyone know why these errors are excluded?
    Gus

    My guess would be that 1403 and 1422 are not really errors, but exception conditions that may or may nor be expected. Any select that returns no rows raise 1403, and it is up to the client to determine whether or not that is an error. I would assume similar reasoning for 1422.
    For the 4030 error, I would assume that if there is no process memory, then the trigger could not fire because it would require more process memory to fire the trigger.
    The oerr utility reports this for 1423:
    01423, 00000, "error encountered while checking for extra rows in exact fetch"
    // *Cause:
    // *Action: See the following error and take appropriate action.I would strongly suspect that the following error would likely be one of 600, 1034, 3113, or one of the similar something bad happend but I don't know what errors.
    HTH
    John

Maybe you are looking for

  • How to catch a switching of radiobutton in "AT SELECTION-SCREEN"

    Hi, I have a selection screen with 2 radiobuttons in group 001. I need to perform some code when I change a status of particular radiobutton (checked - unchecked). I have a code in AT SELECTION SCREEN ON RADIOBUTTON GROUP 001 but this code is not exe

  • Pivot view Problem

    hello, I have two rows in pivot view, also totals have shown as percentage , but now i want to show the % for first row in view ( how can i hide the second row)? if i hide second row with rownumber , first row percentage is showing 100% which is inco

  • Sys.XMLType.createxml  unable to insert in 9i through sqlplus

    I am trying to insert xmltype (sys.XMLType.createxml()) data through sqlplus in oracle. i am getting error as literal string too long. setting long as 1000000 i am able to read and display the contents. But still NOT able to INSERT. The data is aroun

  • How to covert .rdf(windows version) to .rep (Solaris) version

    Hi I have developed a report (.rdf) in windows. I want to deploy it in solaris machine. Application server is installed in the solaris machine only. I did the following and I received the following error bash-2.05$ /u02/oradata/data/APPS/bin/rwconver

  • How to change to lower case letters on my iPad

    When signing in to a website I am unable to make the first letter lower case.the iPad wants to make it upper case how do I change it?