Terminating Events PR Release

Hi,
I have used two terminating events 'Released' & 'Rejected' for Overall release of purchase requisition.
I have 5 levels of approvals, after each appoval buyer will be notified that Requisiion is released. So finally buyer have 5 messages in his inbox stating release effected by 5 levels.
These 5 messages are waiting in buyer's inbox, unless until buyer executes this workitems eventhough the pr release process is completed.
Is there any way to clear these 5 messages after i have compelted my PR release process.
Type linkage is active only for event 'Releasestepcreated'.
Any inputs on this.
Thanks,
Indira.

First thing is that, whenever a person initiates a PR, he can see in his outbox about the current status of the PR he created. Sending 5 times executable workitem is an unnecessary workload on the system.
Jus refine, what steps to appear in the workflow log ... so that the process flow in outbox becomes readable and understandable to the end user.
I have done the same thing with my client.
Another way to delete the workitems in inbox other than the standard transactions is to complete them or terminate them. A round about way for your scenario is as follows.
1. Create a custom event that triggers only when completely released.
2. Put this as terminating event in the workitems.
3. In the workflow, when the PR is completely released, raise this event thru event creation step type.
4. Your problem is solved.
regards,
Sandeep Josyula
*Mark helpful answers

Similar Messages

  • Terminating Event in PO Release Workflow. Workitem is not terminating

    Hi WF Experts,
                            I have done Purchase Order Release Workflow with 10 level release With 2 days dead line. Since standard release supports only 8 level release i have opted for Role Resolution Via User Exit 9 . and i am picking release codes from ztable.
    I was working fine till now.But suddenly end users are facing problem that workitem is not terminating even after they have released the PO.
    What could be the issue what is the terminating event for PO Release workitem.
    Please suggest me how to resolve this issue.
    Regards,
    Hari

    Hi Hari,
    Please check if the following links helps:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sap%252bworkflow%252bevents
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b590453d11d189430000e829fbbd/frameset.htm
    Hope this helps!
    Regards,
    Saumya

  • Purchase Order Workflow - dialog step not receiving terminating event

    Hi,
    We have a scenario wherein based on the release groups and release strategies, different peope need to release the PO's.
    I have been able to develop the workflow for this successfully, but here is where I am facing an issue.
    After the PO has been created, based on the release group and strategy, it gets routed to the appropriate 1st approver. On their approval, the PO gets routed to the 2nd approver. Once the 2nd approver approves, the dialog step doesnt get completed and is still waiting for the terminating event. Event trace shows that the event is getting published, but there is no workitem to receive the terminating event. I am not sure why this is occuring for only 2nd approver onwards whereas for the 1st approver, the terminating event is received by the workitem.
    I am using start conditions for my workflow to ensure only 1 instance of the workflow is triggered for a rel groups and rel strategy and release code, else I am multiple instances each time an approver approves the PO. I am not sure if the start conditions are causing this issue with the terminating events not being received with the workitems.
    Any assistance is welcome.
    Thank you,
    Satish

    From the information provoided it seems you are using PO that is subjected to Release of PO for multiple Release Code and each Release Code Release is being done by one approver. If that is the case then I think the Terminating event should get caught. Please check whether the Terminating event that is getting triggered is specific to the Release Code or not.
    Thanks
    Arghadip

  • Terminating event and abap oo class

    Hi, gurus,
    I 'd like to know how the terminating event works.
    for example,  i define a custom abap oo class (which has been implemented the interface of IF_WORKFLOW), and i want to use it as the terminating event of a standard task.
    could you please tell me how does it works?
    1. there must be an instance defined in the container of the task?
       which must be instanciated in the run time?
    2. then in another abap report, i simply raise the event defined as the terminating event, using the same key, then the pending task will be terminated?
    could you pls provide more information on this ?
    thanks and best regards.
    Jun

    Hi Jun Zhang,
    An event that is used to stop a workflow or task, or change the behavior of an already started workflow is called Terminating Event.
    If the event linkage is active and the linkage rules are satisfied, the status of the work item is set to COMPLETED.
    Defining Event Linkage  Terminating event linkage consists of 2 parts.
    Type linkage which specifies business object type, event name, generic name for event receiver (WORKITEM for terminating events of tasks or EVENTITEM for wait for event steps)
    Instance linkage which identifies the particular receivers (I.e. work item Ids) per object instance.
    Terminating event linkages can be seen in SWE3.
    For terminating events, along with Business object and Event a Container Element should be specified that holds the Object Instance.
    Terminating Event for Workflow is available from Release 6.10 only. This is defined in Basic Data of Workflow Builder.
    Binding Definition is optional for Terminating Events. Binding can be defined b/n event container and workflow container to pass event information to the workflow if required. That is the only way of passing information from an asynchronous method to the task that started it.
    Thanks and Regards,
    Prabhakar Dharmala

  • Read workitem Container Value in Terminating event Check Function Module

    Hi
    I have some problems reading work item data / values of a work item container element in a check function module on a terminating event – Do any of you know if this is possible, and if so, how it’s done ?
    In My scenario I have created a multiline approval step for my business document, one task pr Line Owner.  The Event Approved is defined as a terminating event for this task, and the line owner is passed to the task container.
    Now, when I raise the event, with the line owner as an event parameter, I would like to check if the line owner on the raised event, matches the line owner in the task container in question in a check fm. But here I faced the problem, that only event data, and not work item data, are passed to the Check Function module.
    Regards,
    Morten Nielsen

    Hello Morten, hello Arghadip,
    in the instance linkage's check function module (entered via transaction SWEINST) you'll have the workitem-id in the system event parameter EVTRECEIVER_ID
    With this number you can use the frame work in order to read the work item container.
    This is a sample coding, how you access the correct work item container using SAP Enterprise and it's new OO frame work, which checks on the terminating event of BUS2105.Released the correct release code for a work item.
    INCLUDE <cntn01>.
    INCLUDE <SWFCNTN01>.
    INCLUDE RSWEINCL.
    *** Read workitem instance and container from event
           DATA: wi_id            TYPE swwwihead-wi_id.
           swc_get_element EVENT_CONTAINER evt_receiver_id wi_id.
           IF sy-subrc <> 0.
              MESSAGE E015(ZPREL) WITH evt_receiver_id
                                           RAISING wrong_call.
           ENDIF.
           DATA: lv_wi_handle    TYPE REF TO if_swf_run_wim_internal.
           DATA: ls_context      TYPE sww_wimctx.
           DATA: lv_wi_container TYPE REF TO if_swf_cnt_container.
    *    - set context
           ls_context-do_commit  = ' '.
           ls_context-called_btc = 'X'.
           ls_context-exec_user  = sy-uname.
           ls_context-fbname     = 'Z_CHECK_RELEASE_CODE'.
           CLEAR lv_wi_handle.
           CALL METHOD cl_swf_run_wim_factory=>initialize( ).
           CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
                   EXPORTING
                      im_wiid             = wi_id
                      im_read_for_update  = ' '
    *                 im_enqueue_owner    = fb_name
    *                 im_wait_for_enqueue = 'X'
                      im_context          = ls_context
                   RECEIVING
                      re_instance         = lv_wi_handle.
    *** This check is only done for workitem linkage TS90100081
           IF lv_wi_handle->m_sww_wihead-wi_rh_task <> 'TS90100081'. "#EC_SYNTEXT
              EXIT. "Let event pass, as this is an instance linkage to another workitem
           ENDIF.
           DATA: releaseCode_wi        TYPE t16fc-frgco.
    *    - read releaseCode from workitem container
           lv_wi_container = lv_wi_handle->get_wi_container( ).
    *    - perform binding event container -> workitem container
           swf_get_element lv_wi_container 'RELEASECODE' releaseCode_wi.
          DATA: e             TYPE REF TO cx_swf_run_wim.
          CATCH cx_swf_run_wim INTO e.
             RAISE WORKFLOW_RUNTIME_ERROR.
       ENDTRY.
    *** From here on, the variable releaseCode_WI hold the
    *** container element RelaseCode of the work item, that
    *** is going to be terminated...
    *** Further coding from here as appropriate...
    Best regards,
    Florin

  • Terminating Event with Decision Step

    Hi,
    In our purchase requisition approval workflow, I need to have a decision step in which to prompt approver to either approve the req. or reject the requisition.  In this decision step, I need for it to have terminating events for "SIGNIFICANTLYCHANGED", "RELEASE", "REJECT" and "RESET".
    First, I copy the generic decision task 8267 to my my own custom decision task.  Then I added a BUS2009 in the container, releasecode and other needed elements.  In this custom decision task, I was able to add these terminating events that has been defined in the BUS2009.  I was able to setup binding, except the one binding
    Terminating Event  ->   Task
    &_EVT_OBJECT&      ->   &_WI_OBJECT_ID&
    Since the &_EVT_OBJECT& for the terminating event is BUS2009.  And the custom decision task &_WI_OBJECT_ID& is DECISION business object. They're incompatable business object.  So I replaced that binding with
    Terminating Event     ->  Task
    &_EVT_OBJECT&    ->   &PURCHASE_REQ&
    After all the configuration has been setup.  I created a new purchase requisition.  Upon the RELEASESTEPCREATED event, it create a custom decision workitem in my agent's inbox.  When I triggered the "RELEASE" event, it is however not terminating my custom decision workitem.  The workitem still sits in the agent's inbox waiting to be execute.
    Is it possible to setup terminating events for decision step?  Any kind of suggestions or inputs would be greatly appreciated.
    Thank you.
    Jennifer Tran
    System Analyst

    I will suggest you to create a fork with 2 parallel branch and 1 necessary branch. Put the approval step in 1 branch and the wait for Release step event in another branch in this way you can suffice your requirment.
    Thanks
    Arghadip

  • Terminating Event for BUS2017 Custom Method

    Dear Experts,
    I have an issue with the Terminating Event of the Workflow for BO : BUS2017. The event is getting triggered but receiver is not being picked.
    I have created two events GR_103 and POST_105 in the Custom BO ZBUS2017 by delegating it to BUS2017. GR_103 is the triggering event for my workflow which I have triggered in the POST_DOCUMENT Method of the Implmentation for BADI : MB_MIGO_BADI.
    GR_103 is triggered while doing MIGO (Goods Receipt) for Movement Type 103. My Workflow is triggered perfectly and then I have used a Dialog Asynchronous Task in which I have called the MIGO Transaction for Releasing the GR Blokced Stock using the Movement Type 105. I have created a Custom Method POST in the BO ZBUS2017 and I have used the FM: MIGO_DIALOG to call the MIGO. I am trying to raise the POST_105 event in the Method MB_DOCUMENT_BEFORE_UPDATE of the Interface IF_EX_MB_DOCUMENT_BADI.  I have defined the Terminating Event for the asynchronous Task as POST_105.
    Now the event POST_105 is triggered, but SWEL says 'No receiver entered'. Even the SWEINST shows the object data as the current Work Item along with Object Key, but still receiver not picked. When I try to trigger the same event in a test report by using call transaction, then the event triggers and work item gets completed without any issues.
    Please advise.
    Below is my terminating event code.
      READ TABLE xmseg INTO wa_mseg INDEX 1.
      CONCATENATE wa_mseg-mblnr wa_mseg-mjahr INTO l_objkey.
      IF wa_mseg-bwart = '105' .
        CALL FUNCTION 'SWE_EVENT_CREATE'
          EXPORTING
            objtype           = 'BUS2017'
            objkey            = l_objkey
            event             = 'POST_105'
          EXCEPTIONS
            objtype_not_found = 1
            OTHERS            = 2.
      ENDIF.
    Regards,
    Raju.

    Have a COMMIT WORK after the function call. (At least test it - I am not sure if it will have some effects in your BADI - at least you will know whether the issue is about missing commit).
    And please use SAP_WAPI_CREATE_EVENT instead of the old function you are using.
    Also, make sure that the events will look exactly the same in event monitor SWEL when triggered from your code and when using test tool. Maybe there is some minor difference/mistake (object key, etc.) that you haven't noticed.
    Regards,
    Karri
    Edited by: Karri Kemppi on Feb 7, 2012 8:14 AM

  • Terminating Event to Event Queue due to Work Item Lock

    I have a dialog workflow task based on an asynchronous method defined with a terminating event.  When the user executes the work item, the method generates the terminating event (via a V2 change document) but the work item is enqueued (locked) by the same user (locked when they execute the work item from SBWP) and therefore the terminating event goes into error and is placed in the event queue.  The background job which processes the event queue does not redeliver the event so it stays in the event queue and the work item fails to complete.  Other than dequeing the work item lock myself with a function call how do I get around this catch 22?

    Hello Martin,
    Actually, the locking happens whether I have the task as asynchronous or synchronous.  The problem is the timing. If the user does not release the lock (by backing out of the dialog which is executed) prior to the terminating event attempting to enqueue and complete the work item then the event goes into error and is inserted into the event queue (and lingers there indefinitely, almost). Another issue with the asynchronous approach is that even if the user backs out of the dialog before the event actually attempts to complete the work item they will still see the work item in the inbox unless they click the refresh button when they get back to the inbox. 
    I have changed the task to synchronous but here is my scenario and another question.
    The process being workflowed is the approval of service entrysheets (similar to an invoice if you are not familiar with External Services).  In our process, there are a large number of documents being created and requiring approval by particular approvers.  It is a normal scenario for an approver to have, lets say 25 documents in his inbox awaiting approval. It was not practical for him to have to navigate back and forth between his inbox and the approval task screen.  Therefore, I give the users the option of (when executing a work item) having all the documents in his in-box (for this particular task) be presented in an approval list screen.  They can then do a mass approval of the 25 documents with 1 click and 1 navigation.  This list screen is also available to be executed outside workflow via a tcode.  So, when the user executes the mass approval (either from the inbox or outside workflow) the work items are terminated via the terminating event assigned to the approval task.
    A couple of issues remaining:
    1) Given my example of 25 work items (user executes 1 work item from in-box
    and I displayed all 25) being approved, when the user returns to the in-box, the 24
    items remain in his inbox until he clicks the refresh button since these were not actually "executed" from the workflow engines point of view.  However, these were terminated successfully because they were not "locked".
    <b>Question:</b> Is there a way (user exit?) to trigger the inbox refresh automatically.
    2) Now, the issue with the actual work item which the user executes from the inbox.  As I mentioned, the work item is locked as soon as the user executes it and is not released until they back out of the dialog or logoff.  So, here is what happens:  If the terminating event is sent before the lock is released the event is sent to the event queue.  If they then back out back to the in-box, its OK since I put some code in the SWO1 object type program (rememeber, its now synchronous) which will determine if they did the approval/rejection and the work item will complete and the event in the event queue will be deleted the next time the Event Queue Background job runs (it deletes any events for work items already in COMPLETED status). However, lets say they simply log off rather than backing up to the in-box or they don't do anything and are eventually logged off by timeout. In this case the code in the object type program to determine if the approval/rejection was done does not get executed (control does not return to the object type program) and the work item remains in "STARTED" status and remains in the users inbox and the event is in the event queue. So, now we have a work item that should be completed still sitting in the users in-box and the terminating event in the event queue. So the next time the user goes to their inbox the work item is still there.  The interesting thing is that though this may be confusing to the user, if they then attempt to execute the work item, they will get a message: "Work item currently being completed by event" (Message SWF_RUN 644) and the event sitting in the event queue gets redelivered and completes the work item.  To alleviate this problem I was thinking of adding a call to SAP_WAPI_WORKITEM_COMPLETE in the approval list screen after they do the approval but I'm guessing it wont work since it probably will try to enqueue the work item and it will still be locked. 
    Hopefully you haven't nodded off reading this rambling note...
    Thank you,
    Bob

  • Workflow runtime error because of terminating event

    Hi all,
    In one of the workflow template, in one step, the Standard Task is having Terminating Event.
    At the runtime, at the particular step, when it was in process, the terminating event is triggered. The step got completed,
    But the workflow is not proceeding.
    When I viewed the workflow log, In the perticular step after receiving the terminating event, the follwoing error is shown
    " Workitem XXXXXX is locked by the user YYY(Enqueue error)".
    The workitem number mentioned in the error is parent workitem number, not one of the particular step.
    I know that there is a setting in SWU3 to schedule a job for errored out workitems. That job is already scheduled and it has tried two times and it stopped.
    Now do I have to restart the workflow again or the issue can be resolved in the workitem in progress.
    Thanks,
    Sarayoodharan.K

    the terminating event is triggered. The step got completed,
    But the workflow is not proceeding.
    When I viewed the workflow log, In the perticular step after receiving the terminating event, the follwoing error is shown
    " Workitem XXXXXX is locked by the user YYY(Enqueue error)".
    Can you please let us know how you are trying to trigger the terminating event,I mean are you trying to trigger the terminating Programatically, then you might be using a FM to rasie the terminating event, by looking at the error it is clear that the event is triggered and the workitem got completed but the lock on the workitem is not released , you can release it by using the COMMIT WORK statement
    You have to write the commit work statement after raising the even or make sure that someor the other way the commit work is executed, this is beacuse once the commit work statement is executed all Locks are released..

  • Set Decision Step in WF via Terminating Event

    Hi All,
    I have a custom Work flow in which I am trying to terminate a Decision Step via a terminating event.
    Following Pre- requisites have been set:
    1) In the Control task for the decision step I have assigned the terminating event.
    2) Required linkages have been maintained via SWE3 transaction.
    ISSUE: When the terminating event is raised then the Workitem for this steps gsts completed but workflow ends with an ERROR --> "No Successor for the terminating event defined".
    Please let me know if any of you is familiar with the issue or have any inputs.
    Thanks in advance..

    Hi Sourabh,
    There would be some binding problem going with Decision step while using Terminating event maintained at
    the Task of the Decision step.
    Rather go with FORK step with two parallel branch and 1 necessary branch. Specify the approval step in one
    branch and wait for the release step event in another branch.
    Hope this way would solve your issue.
    Good luck
    Narin

  • Terminating event of a task is not working

    Hi,
    I implemented WS20000075 for purchase order release.
    The dialog workitem of approval has terminating event 'released'
    all thru the developement in dev and Q system., this was working
    but in production , it happened that other user release PO from me29n
    the approval workitem is still in process
    i cant check events because trace is off
    cud please suggest wat cud be the reason that inspite of release of PO, the workitem did not complete ?
    thanks
    r

    Two questions first:
    #1) In Dev and Q, did you test (or experience) the scenario you are facing in Prod, that being someone else is Releasing the PO?
    #2) In Prod, when the Approver performs the release step, does the WF advance?
    I'm going to presume that the answer to #1 is NO, and the answer to #2 is YES.  If that is the case, here's what I believe to be the dilemma you face.
    A "Terminating Event" is not the same as a "Wait for Event".  The purpose of a Terminating Event is to essentially call back to an activity that is "In Progress" that the work is done and that its time for the activity to end and to move on.
    Your PO Release for example; The user clicks the Release icon and then clicks Save.  At that point, processing is handed off to the Update Process (Asynchronous) and the screen is exited.  Even though you've left the screen, there's no telling if or when the Update Process for the save has even started or when it has been completed.  But it's only when the Update Process has completed that the true Logical Unit of Work (LUW) has completed, and hence when it's appropriate to move on to the next step in the WF.
    The way this gets accomplished is to trigger a Terminating Event at the very end of the Update Process, which in turn gets picked up by the PO Release activity that is still sitting and waiting with status "Executing".  And that's the key.
    I'm almost 100% certain that the Activity has to be in the state of "Executing" before it will react to a Terminating Event.  In your scenario, where the Release gets performed outside of the WF, the Release Activity is still in "Ready" status.
    I think the solution here is to put a "Wait for Released" in parallel with the Release Activity as a means of capturing the Release that occurs outside of the WF.
    Hope this is relevant....Apologies if not.
    Tom Carruth

  • BSP Terminating event not triggering

    Hello Friends,
    We have a scenario, where a BSP application is triggered from a Workflow, for a certain approval, and after the user clicks on Approve button on the BSP Page, the BSP would write to the workflow container using SAP_WAPI_WRITE_CONTAINER and then we call SWF_WSC_CALLBACK_LAUNCH.
    This used to work, but after an almost Fatal incident with our system, we are not able to get this to work.
    We can see in the workflow log that the container is written, but the terminating event is not triggered, and the workflow doesn't move forward
    Is there a setting that we're missing..??
    Thanks,
    Tat.

    Have you tried:
    call function 'SAP_WAPI_DECISION_COMPLETE'

  • Terminating Event Not Triggering

    HI Guys,
                   I have added a custom task to call MRBR screen and set a Terminating Event for this task. It is a Asynch Method.
    Through SAP_WAPI_CREATE_EVENT i am calling the terminating event but my task is not getting terminated.
    I checked in SWEL i could see evnt log for my terminating event without Receiver type.
    Kindly help me to sort out this issue.
    Regards,
    Dheepak

    Hi
    Where have you written the code for triggering the termination event?
    Also in your task have you created an entry:
    WIOBJECT_ID   FIPP  TerminatingEvent Name.
    When everything is done properly in SWEL you would see the receiver as workitem.
    Thanks and Regards
    Aman

  • Copy of task TS50000075 and  EXTSRV - termination event not working

    Hi,
    We have done copy of TS50000075 and extended business object EXTSRV to ZEXTSRV
    this was done to call function module ISR_CALL_FOR_CHANGE to open up adobe form in edit mode
    it works well but the task is not terminated
    if termination event is put just like TS50000075 like WIOBJECT, ZEXTSRV COMPLETED then workitem never ends and always stays in inbox
    ZEXTSRV COMPLETED event is not triggered when the workitem is completed in the UWL
    even if we trigger this event programatically , it does not find receiver and the task stays in-process
    if termination event is put as _WORKITEM PROCESSED then it bahves like synchronous task ie even if the workitem is clicked and form is not completed, the workitem ends. so the user can click it only once
    also i've tried following
    1 - used the function module to complete the workitem in QISR BADI. but the workitem ID is not available inthe BADI. If I try to export it from business object method and import in BADI, it doesnt work
    2 - find active workflows and derive workitem id and complete workitem using FM SAP_WAPI_WORKITEM_COMPLETE
         this FM doesnt work , step becomes logically deleted which is not desirable
    3 - find active workflows and derive workitem id and complete workitem using other FM SAP_WAPI_SET_WORKITEM_COMPLETD
         work item is complete but there is workflow error - cannot determine succesor node
    4 - find active workflows and derive workitem id and change a particular container element
        check this container element in complete workitem condition in activity step of dialog step of workflow of this task-
         workitem stays inprocess
        check this container element in parellel wait step to complete the workitem-
         parellel step executes but fork is not complete, workflow doesnt proceed
    kindly help in this matter. the workitem does not get completed at all even if we force complete, workflow goes in error of - cannot determine succesor node.
    is there anything specific to the EXTSRV-PROCESS method which makes the TS50000075 task to trigger EXTSRV-COMPLETED and end the workitem ?
    help is much needed in this case
    thank you,
    b

    Hi,
    You need to see the event in SWEL, otherwise it will never work with workflow. Make sure that the event monitor is on (in transaction SWELS).
    I cant see the event in SWEL. The vent monitor is on because if I create event in SWUE, it shows up.
    How you actually create the event now?
    There is BADI QISR which is always called to handle user action of PDF form. I have written the function modue to create event in the user action
    >If i trigger it using funciton module -- then it doesnt find any receivere so it doesnt terminate the task. it is seen in SWEL with no receiver found. do i still need to do commit work ?
    You need the COMMIT WORK always if you trigger the event in any program&function or whatever.
    ok ill try doing commit work after the create event function module
    Test your event with transaction SWUE. Make a test case first in a way that the task is waiting in the inbox/UWL. Then create the event in SWUE. Now, if the task gets completed, you will know that that event itself is working and your terminating event configuration is done properly. If this works, your only problem is in the event creation itself. And for that you need to tell exactly how you create the event. If you do it with your own custom code, use SAP_WAPI_CREATE_EVENT and don't forget to have COMMIT WORK after the function call.
    I am doing exactly like you said. but it doesnt work ie even if I create the event in SWUE, the workitem doesnt get completed.
    This event is seen in SWEL with no receivere found
    I am able to infact set the workitem to complete using WAPI funciton module to complete teh task in the BADI.
    but the workflow goes in to error saying , next node cannot be determined
    Regards,
    Karri

  • Terminating event 'Created' in ABAP OO context

    Hi,
    I need a little help here. A lot of times I have used terminating event ‘Created’ for different BOR types – and asynchronous tasks where users are asked to create an object using call transaction from a work item.
    Now I am struggling with the same in ABAP OO and have an issue:
    The goal is to have a terminating event raised on a custom class  - and received by a work item if a customer is fully created, that is the general part, the company code part and the sales area part.
    Raising the event is working great. I have put in a class in trx. SWEC together with a function module which set the class as object type if the condition is fulfilled.
    Then in trx. SWED I have entered another function module to set the key for class together with object_por-catid = ‘CL’.
    Then when a customer master record is created I can see in the event trace that the event is raised with the correct key.
    No I want to receive the new object into my asynchronous dialog task. I define the event as terminating event – and in the code call transaction XD01.
    When the work item is created I find a waiting event linkage in trx. SWE3 – of cause without key; this is unknown until after creating.
    But after executing the workitem and raising the event the workitem does not receive the event and is therefore not completed.
    Is this approach not possible in ABAP OO – or do I miss something in the class definition / coding?
    The event is defined as public instance – I have not coded any event handler method.
    Thanks,
    Claus.

    Hello Claus,
    Interesting question, unfortunately not with a simple answer.
    The issue is that you are waiting for an instance event without a key. Your object raises an event with a key => No match.
    If you raise the created event without a key, you won't be able to match up two near-simultaneous creations with their corresponding work items. Same thing if you wait for a static event.
    So how does SAP do it with BOR events? By breaking the rules of course!
    They do some hidden trickery to bypass this problem by doing an 'Export to Memory' of the work item ID, and the CREATED event raising code bypasses the usual event linking mechanisms and looks for it's creator by retrieving the memory variable. I don't have the exact spots of code in my head, but a bit of debugging should find it.
    So what can you do? Given that you have full control of the class you could do something similar and maybe also create some kind of temporary key consisting of the Work Item ID and raise an event with that, or you could maybe skip the transaction concept completely and run the create GUI entirely within your WF step - maybe a custom screen gathering the initial data and then create the object via BAPI. Time to get creative!
    Hope that helps,
    Mike
    Edit: Or you could do the quick and dirty solution and just use the BOR events for the step and instantiate the class during the binding back to WF...

Maybe you are looking for

  • How can i get rid of this problem ?

    Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example,  ERROR: DW050 ... WARNING: DF012 ...   -------------------------------------- Summary --------------------------------------  - 0 fatal error(s), 20 error(s)

  • Creating a photo gallery with upload feature.

    I am making a photo gallery for my website. I think it would be cool to allow the upload of images to the server. I will make the gallery search for images in the folder on the server and display them, but that is not my problem. My problem is how to

  • Need help in the transfer/upload iWeb photos back to iPhoto

    I have created an iWeb page with numerous family and other photos taken from iPhoto. Since that point, I have lost those files in iPhoto due to some operator error. ( no i didnt back up first, but thats set up now ) Anyway, I am wondering if I can up

  • Placing Excel Spreadsheet resizing

    We are using INDCS3 and have created an Excel spreadsheet exactly to size (inches). We created a new IND document (preference set to inches) and when we do a PLACE it places the file, but shrinks it down to the columns are smaller and the fonts are t

  • Which codec?

    Hi, I have an .avi file that has no audio in QT 7.1.5. No audio in DivX Player, DOES have audio in VLC. These are the audio specs: DivX 6.0, 564 x 308, Unknown ATSC A/52 and AC-3 Decoder, Stereo, 44.100 kHz I have these codecs in /Library/QuickTime: