Terminating event -- No active receiver found

Hi -- on an Integration project I just need a workitem that stays active until explicitly closed via an event..
It's easy enough to create a triggering event which starts a process.
I've followed all the rules (as far as I can see) to create a terminating event but it doesn't work.
I've created a test Bus Obj ZZJIMBO which simply has a key of the SAP user ID.
I've defined 3 events
STARTSYN  ====> Synchronous
STARTASY  =====> Asynchronous
FINISHED ======>  terminating
Using SAP_WAPI_CREATE_EVENT the STARTSYN and STARTASY  are triggered and the relevant processes start - both for the synchronous and asynchronous tasks.
However on raising the FINISHED event the system just errors with NO Active receiver found.
All the binding etc is fine and SWU0 doesn't find any problems.
Looking at the instance table (transaction SWE3)
I see that the eventid is the same as the current workitem but the object key is empty
object key  <empty> 
eventid    000000250100
The only possibility I can see is that my Business object doesn't really have "instances" like say a sales order as it only exists at run time.
Would I have to say trigger the event finished using something like the Work item itself which does have a valid individual instance -- I can extend the WORKITEM bus obj and add an event FINISHED to it instead.
I can get the workitem id via the container so that shouldn't in theory be a problem to "instantiate"  the Workitem (or ZWORKITEM) business object.
I really hoped to have all the events in the SAME business object however.
Any ideas
Cheers
jimbo

Hi James.
1. Yes, I think the workitem in runtime would expect the triggering event should be from the instance of the object either from
        a. standard workitem relevant obejct instances like _WORKITEM, ATTACHOBJECTS, RULERESULT
       b. or the associated BO in the task i.e WIOBJECT_ID
2. However as you say >>I really hoped to have all the events in the SAME business object however>>. I can suggest the following
       a. create a parallel fork to the step which is creating your workitem
       b. In this parallel branch create step 'Wait for Event; and refer it to your ZZJIMBO.FINISHED.
      c. define necessary branches required to complete the fork as 1. meaning, if any one of the branch ends flow will continue to next step in main workflow.
So, when the event ZZJIMBO.FINISHED is raised with the correct instance which was used in workflow. 'Wait for event' will receive it and this branch will end and eventually other branch will get logically deleted. You can put some flag in the 'Wait for event' branch using which u can understand whether the workitem is completed in normal way or through exeption.
Hope this helps !!
Regards
Krishna Mohan

Similar Messages

  • 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

  • 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

  • Event finds no receiver even though object key is OK

    Hello,
    can’t see what goes wrong here. I have a work item waiting for an event. I trigger the event for with the matching object key, but the event finds no receiver, and nothing happens.
    To elaborate,
    the asynchronous ‘Document review’ task has terminating events REJECT etc. from my ABAP (business) class ZCL_PROL. On the terminating events tab:
    _WI_OBJECT_ID  CL ABAP Class  ZCL_PROL   REJECTED
    I trigger the event using cl_swf_evt_event=>raise and from SWEL I see that the event has been created correctly, for the right object type and object key.
    On the other hand, from SWEINST I see that the ‘Document review’ work item is registered for the event. Table entry
    CL ABAP Class ZCL_PROL   REJECTED   WORKITEM  10000000000392    000000045550
    The class ZCL_PROL and the object key 10000000000392 in SWEINST are identical to what I see in SWEL.
    The method FIND_BY_LPOR must be fine, as the wf has proceeded to this point. And no issues to be seen in SWEQADM.
    Now, what goes wrong? Why doesn’t my work item react to the event?
    Message was edited by: Arto Pihlaja

    Anjan, Prakash, thanks for your lightning fast replies!
    I actually found the issue myself.
    I had
    cl_swf_evt_event=>raise(
         im_objcateg        = cl_swf_evt_event=>MC_OBJCATEG_BC
         im_objtype         = mv_objtype
         im_event           = gc_rejected
         im_objkey          = mv_instid
         im_event_container = mr_event_container
    Once I changed the object category to MC_OBJCATEG_CL, it started working. Clearly I had misunderstood the meaning of 'Business Class'. I changed back to regular CL, and it's fine.
    Once again, thanks for your activity!

  • Updated to Mavericks. Now theres tons of activity in my terminal and my activity monitor doesn't seem normal. I want to think someone's hacking me, but i need experienced help please!

    I spent all night trying to fix this. It seems to me that someone has been trying to hack into my system with all of the random codes/lines in my terminal and i have all of his foreign IP addresses. And now i get this strange message that popped up in my terminal. Idk what it entirely means? I would very appreciate if someone could just walk me through this. Thank you very much.
    First time poster. I have Macbook Pro. OSX. Just downloaded the new mavericks. I'm i have my firewall on. I stay secure. I run Netbarrier, Virusbarrier, IdentityScrubber.
    I know something is a little odd or just doesn't make since about my activity monitor. Then my WiFi was hacked last night and this person was writing tons lines of commands/codes that i found in my terminal and my activity monitor doesn't look normal,  and I've only been a mac owner for about a year now and i'm learning more and more but while trying to figure out what was going on this message popped up which concerned me the most. Any help would be most appreciated, thanks guys. I have my terminal full of his foreign ip addresses i noticed, and a lot of other commands and lines he wrote out that i definitely did not type myself. Can anyone give me a hand on this? Thanks
    --- 192.168.1.103 ping statistics ---
    10 packets transmitted, 0 packets received, 100.0% packet loss
    Extol:~ FBI$ who
    FBI      console  Nov  7 02:14
    FBI      ttys000  Nov  7 04:33
    Extol:~ FBI$ whois
    usage: whois [-aAbdgiIlmQrR6] [-c country-code | -h hostname] [-p port] name ...
    Extol:~ FBI$ whois 192.168.1.103
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at: https://www.arin.net/whois_tou.html
    # Query terms are ambiguous.  The query is assumed to be:
    #     "n 192.168.1.103"
    # Use "?" to get help.
    # The following results may also be obtained via:
    # http://whois.arin.net/rest/nets;q=192.168.1.103?showDetails=true&showARIN=false& ext=netref2
    NetRange:       192.168.0.0 - 192.168.255.255
    CIDR:           192.168.0.0/16
    OriginAS:
    NetName:        PRIVATE-ADDRESS-CBLK-RFC1918-IANA-RESERVED
    NetHandle:      NET-192-168-0-0-1
    Parent:         NET-192-0-0-0-0
    NetType:        IANA Special Use
    Comment:        These addresses are in use by many millions of independently operated networks, which might be as small as a single computer connected to a home gateway, and are automatically configured in hundreds of millions of devices.  They are only intended for use within a private context  and traffic that needs to cross the Internet will need to use a different, unique address.
    Comment:
    Comment:        These addresses can be used by anyone without any need to coordinate with IANA or an Internet registry.  The traffic from these addresses does not come from ICANN or IANA.  We are not the source of activity you may see on logs or in e-mail records.  Please refer to http://www.iana.org/abuse/answers
    Comment:
    Comment:        These addresses were assigned by the IETF, the organization that develops Internet protocols, in the Best Current Practice document, RFC 1918 which can be found at:
    Comment:        http://datatracker.ietf.org/doc/rfc1918
    RegDate:        1994-03-15
    Updated:        2013-08-30
    Ref:            http://whois.arin.net/rest/net/NET-192-168-0-0-1
    OrgName:        Internet Assigned Numbers Authority
    RegDate:
    Updated:        2012-08-31
    Ref:            http://whois.arin.net/rest/org/IANA
    OrgTechHandle: IANA-IP-ARIN
    OrgTechName:   Internet Corporation for Assigned Names and Number
    OrgTechPhone: 
    OrgTechEmail:
    OrgTechRef:    http://whois.arin.net/rest/poc/IANA-IP-ARIN
    OrgAbuseHandle: IANA-IP-ARIN
    OrgAbuseName:   Internet Corporation for Assigned Names and Number
    OrgAbusePhone
    OrgAbuseEmail: 
    OrgAbuseRef:    http://whois.arin.net/rest/poc/IANA-IP-ARIN
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at: https://www.arin.net/whois_tou.html
    Extol:~ FBI$
    Extol:~ FBI$ hosts
    -bash: hosts: command not found
    Extol:~ FBI$ who
    FBI      console  Nov  7 02:14
    FBI      ttys000  Nov  7 04:33
    Extol:~ FBI$ whois
    usage: whois [-aAbdgiIlmQrR6] [-c country-code | -h hostname] [-p port] name ...
    Extol:~ FBI$ whois  192.168.0.0 - 192.168.255.255
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at: https://www.arin.net/whois_tou.html
    # Query terms are ambiguous.  The query is assumed to be:
    #     "n 192.168.0.0"
    # Use "?" to get help.
    # The following results may also be obtained via:
    # http://whois.arin.net/rest/nets;q=192.168.0.0?showDetails=true&showARIN=false&ex t=netref2
    NetRange:       192.168.0.0 - 192.168.255.255
    CIDR:           192.168.0.0/16
    OriginAS:
    NetName:        PRIVATE-ADDRESS-CBLK-RFC1918-IANA-RESERVED
    NetHandle:      NET-192-168-0-0-1
    Parent:         NET-192-0-0-0-0
    NetType:        IANA Special Use
    Comment:        These addresses are in use by many millions of independently operated networks, which might be as small as a single computer connected to a home gateway, and are automatically configured in hundreds of millions of devices.  They are only intended for use within a private context  and traffic that needs to cross the Internet will need to use a different, unique address.
    Comment:
    Comment:        These addresses can be used by anyone without any need to coordinate with IANA or an Internet registry.  The traffic from these addresses does not come from ICANN or IANA.  We are not the source of activity you may see on logs or in e-mail records.  Please refer to http://www.iana.org/abuse/answers
    Comment:
    Comment:        These addresses were assigned by the IETF, the organization that develops Internet protocols, in the Best Current Practice document, RFC 1918 which can be found at:
    Comment:        http://datatracker.ietf.org/doc/rfc1918
    RegDate:        1994-03-15
    Updated:        2013-08-30
    Ref:            http://whois.arin.net/rest/net/NET-192-168-0-0-1
    OrgName:        Internet Assigned Numbers Authority
    OrgId:          IANA
    Updated:        2012-08-31
    Ref:            http://whois.arin.net/rest/org/IANA
    OrgTechHandle: IANA-IP-ARIN
    OrgTechName:   Internet Corporation for Assigned Names and Number
    OrgTechPhone: 
    OrgTechEmail
    OrgTechRef:    http://whois.arin.net/rest/poc/IANA-IP-ARIN
    OrgAbuseHandle: IANA-IP-ARIN
    OrgAbuseName:   Internet Corporation for Assigned Names and Number
    OrgAbusePhone: 
    OrgAbuseEmail:
    OrgAbuseRef:    http://whois.arin.net/rest/poc/IANA-IP-ARIN
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at: https://www.arin.net/whois_tou.html
    Whois Server Version 2.0
    Domain names in the .com and .net domains can now be registered
    with many different competing registrars. Go to http://www.internic.net
    for detailed information.
    No match for "-".
    >>> Last update of whois database: Thu, 07 Nov 2013 13:19:14 UTC <<<
    NOTICE: The expiration date displayed in this record is the date the
    registrar's sponsorship of the domain name registration in the registry is
    currently set to expire. This date does not necessarily reflect the expiration
    date of the domain name registrant's agreement with the sponsoring
    registrar.  Users may consult the sponsoring registrar's Whois database to
    view the registrar's reported date of expiration for this registration.
    TERMS OF USE: You are not authorized to access or query our Whois
    database through the use of electronic processes that are high-volume and
    automated except as reasonably necessary to register domain names or
    modify existing registrations; the Data in VeriSign Global Registry
    Services' ("VeriSign") Whois database is provided by VeriSign for
    information purposes only, and to assist persons in obtaining information
    about or related to a domain name registration record. VeriSign does not
    guarantee its accuracy. By submitting a Whois query, you agree to abide
    by the following terms of use: You agree that you may use this Data only
    for lawful purposes and that under no circumstances will you use this Data
    to: (1) allow, enable, or otherwise support the transmission of mass
    unsolicited, commercial advertising or solicitations via e-mail, telephone,
    or facsimile; or (2) enable high volume, automated, electronic processes
    that apply to VeriSign (or its computer systems). The compilation,
    repackaging, dissemination or other use of this Data is expressly
    prohibited without the prior written consent of VeriSign. You agree not to
    use electronic processes that are automated and high-volume to access or
    query the Whois database except as reasonably necessary to register
    domain names or modify existing registrations. VeriSign reserves the right
    to restrict your access to the Whois database in its sole discretion to ensure
    operational stability.  VeriSign may restrict or terminate your access to the
    Whois database for failure to abide by these terms of use. VeriSign
    reserves the right to modify these terms at any time.
    The Registry database contains ONLY .COM, .NET, .EDU domains and
    Registrars.
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at: https://www.arin.net/whois_tou.html
    # Query terms are ambiguous.  The query is assumed to be:
    #     "n 192.168.255.255"
    # Use "?" to get help.
    # The following results may also be obtained via:
    # http://whois.arin.net/rest/nets;q=192.168.255.255?showDetails=true&showARIN=fals e&ext=netref2
    NetRange:       192.168.0.0 - 192.168.255.255
    CIDR:           192.168.0.0/16
    OriginAS:
    NetName:        PRIVATE-ADDRESS-CBLK-RFC1918-IANA-RESERVED
    NetHandle:      NET-192-168-0-0-1
    Parent:         NET-192-0-0-0-0
    NetType:        IANA Special Use
    Comment:        These addresses are in use by many millions of independently operated networks, which might be as small as a single computer connected to a home gateway, and are automatically configured in hundreds of millions of devices.  They are only intended for use within a private context  and traffic that needs to cross the Internet will need to use a different, unique address.
    Comment:
    Comment:        These addresses can be used by anyone without any need to coordinate with IANA or an Internet registry.  The traffic from these addresses does not come from ICANN or IANA.  We are not the source of activity you may see on logs or in e-mail records.  Please refer to http://www.iana.org/abuse/answers
    Comment:
    Comment:        These addresses were assigned by the IETF, the organization that develops Internet protocols, in the Best Current Practice document, RFC 1918 which can be found at:
    Comment:        http://datatracker.ietf.org/doc/rfc1918
    RegDate:        1994-03-15
    Updated:        2013-08-30
    Ref:            http://whois.arin.net/rest/net/NET-192-168-0-0-1
    OrgName:        Internet Assigned Numbers Authority
    OrgId:          IANA
    RegDate:
    Updated:        2012-08-31
    Ref:            http://whois.arin.net/rest/org/IANA
    OrgTechHandle: IANA-IP-ARIN
    OrgTechName:   Internet Corporation for Assigned Names and Number
    OrgTechPhone:
    OrgTechEmail
    OrgTechRef:    http://whois.arin.net/rest/poc/IANA-IP-ARIN
    OrgAbuseHandle: IANA-IP-ARIN
    OrgAbuseName:   Internet Corporation for Assigned Names and Number
    OrgAbusePhone: 
    OrgAbuseEmail: 
    OrgAbuseRef:    http://whois.arin.net/rest/poc/IANA-IP-ARIN
    # ARIN WHOIS data and services are subject to the Terms of Use
    # available at: https://www.arin.net/whois_tou.html
    <Personal Information Edited by Host>

    haha, so now i'm thinking. I'm learning the terminal as fast as i can but there are several lines of codes and commands in there that throws up red flags to me that i don't fully understand. It just looks fishy too me. It would be highly appreciated if someone could just check this out just to tell me that i don't need to worry about it. Or point me in the right direction. I just feel un easy about this. ha.

  • 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

  • Terminating Event Generate an Error

    Hi All.
    My custom workflow has asynchronous task where the terminating events trigger from ABAP program and passed some data.
    This task will completed upon custom event "ACCEPTED" raised in the system based on certain keyfield and continue next steps.
    Terminating events tab contains element WIOBJECT_ID and my custom event "ACCEPTED".
    Binding is use standard element Binding details as per standards, &_EVT_CREATOR& --> &INITIATOR and &_EVT_OBJECT& --> &_WI_OBJECT_ID&
    I though this is the only step that I need to do and of course wait step.
    However when I test this terminating event via SWUE with proper object key, event trace transaction reported event "ACCEPTED" for task TS95000052 not defined as start/end event.
    I check in instance linkage transaction, linkage is activated for my object type, "ACCEPTED" and receiver type "WORK ITEM".
    Event type linkages between event and my asynchronous task also active.
    Will someone give me a clue, what should I do to resolve this issue?
    Many Thanks

    You cannot exit from a for loop until it is done. Use a while loop instead. Also, using the event structure in this case causes all kinds of exit problems. Try it and you will see what I mean. Instead, use the abort button itself. Put a case statement at the end to give the error output if the abort button was pressed. See attached vi.
    - tbob
    Inventor of the WORM Global
    Attachments:
    abortTesting.vi ‏45 KB

  • Issue with Terminating Event - Reg

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

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

  • Multiple terminating events

    Hi All,
    Is it possible to have multiple terminating events, what i mean is:
    I created WF template with multiple steps. All steps are using the same task (Approve/Reject) and in the task itself I also define a terminating event.
    - At the first step, I trigger an event to terminate the step1 and it can complete the first step
    - but at the 2nd step, looks like the second workitem doesn't create a new instance linkage for the terminating event. So when I call another event to terminate it, it says no receiver found.
    Pls advise, thanks

    I don't understand why you are causing an event within the same loop.  None of that code makes sense.  In general, a dynamic event should be created and registered before the loop with the event structure and the event should be destroyed after the loop is complete.
    As far as your other VIs, you should use a feedback node or unregistered shift registers to hold your value for C instead of using a local variable.  Look up a Functional Global Variable.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • 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

  • 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...

  • 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 Terminating all work items

    System : Solution Manager
    Business object : BUS2000116
    1. I have multiline container element for Agent.Agents are Dynamic not static.Approval from all agents is required.
    2. Work flow desing
    a.Defination of Agent : ABAP Dictionary type SWP_AGENT with Multiline
    b. FORK with two steps , One step Required
    c. One part of FORK has WAIT FOR EVENT "REJECTED" Event and other has Activity with Agent "_underline []Agent()Index of: Agent _underline"
    d. Under the Miscellaneous tab Multiline line element Agent.
    e. Terminating event for this activitiy is APPROVED Event, which I have defined in business object.
    Let say in Program [Custom tab for standard transaction CRMD_ORDER] I have three agents I am getting Three work item in the workflow log with different Agent.
    PROBLEM:
    When any user open the workitem from SAP Inbox and APPROVE it[ Custom button on standard screen CRMD_ORDER], Program raises Event APPROVED by using Function Module "SWE_EVENT_CREATE". But it set other two work items also in Completed status.
    concatenate 'US' sy-uname into v_creator.
            call function 'SWE_EVENT_CREATE'
              exporting
                objtype                       = c_objtype    "BUS2000116
                objkey                        = objectkey    "Key field Which is GUID from CRMD_ORDERADM_H  table
                event                         = gs_event      "APPROVE"
               creator                       = v_creator
                take_workitem_requester       = 'X'
              START_WITH_DELAY              = ' '
              START_RECFB_SYNCHRON          = ' '
              NO_COMMIT_FOR_QUEUE           = ' '
              DEBUG_FLAG                    = ' '
              NO_LOGGING                    = ' '
              IDENT                         =
             importing
               event_id                      = v_eventid
               receiver_count                = v_count
            TABLES
              EVENT_CONTAINER               =
             exceptions
               objtype_not_found             = 1
               others                        = 2
            if sy-subrc <> 0.
              message id sy-msgid type sy-msgty number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            endif.
    Please let me know what could be the reason?
    Thanks in Advance.

    I think instead of using a event you can use a container element. You want to make sure that the users performs the approving action properly. If the user does that inside your code you set this container element as X. You pu the approval step inside a loop that checks whether the container element is X. Also another important thing you need to put the parallel approval step along with the loop inside a subworkflow.
    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

  • SXMB_MONI: no interface action for sender or receiver found

    Hi Experts,
    I try to integrate PI and BI 7.0 using XI adapter (feel doubts about type).
    I used 2 giudes: "How to Push Data into BW from XI" and "How to Send XML Data to BW".
    SLD check is ok. Proxy is active at BW side. Quality of Service - Exactly Once.
    RWB and SXMB_MONI at PI side show that test message was successfully sent. But I cant see it in DQ (RSA7).
    xml from SXMB_MONI at PI and reciever part:
      <Trace level="1" type="T">--start determination of sender interface action</Trace>
      <Trace level="1" type="T">select interface</Trace>
      <Trace level="1" type="T">select interface namespace</Trace>
      <Trace level="1" type="T">--start determination of receiver interface action</Trace>
      <Trace level="1" type="T">Loop 0000000001</Trace>
      <Trace level="1" type="T">select interface data_tobw</Trace>
      <Trace level="1" type="T">select interface namespace http://integrate/xi/bw</Trace>
      <Trace level="1" type="T"><b>--no interface action for sender or receiver found</b></Trace>
      <Trace level="1" type="T">Hence set action to DEL</Trace>
    Help me to send xml to BW please.
    Thanx in advance,
    Alex

    >
    Alexander Rychkov wrote:
    > Hi Experts,
    > I try to integrate PI and BI 7.0 using XI adapter (feel doubts about type).
    > I used 2 giudes: "How to Push Data into BW from XI" and "How to Send XML Data to BW".
    > SLD check is ok. Proxy is active at BW side. Quality of Service - Exactly Once.
    >
    > RWB and SXMB_MONI at PI side show that test message was successfully sent. But I cant see it in DQ (RSA7).
    >
    > xml from SXMB_MONI at PI and reciever part:
    >   <Trace level="1" type="T">--start determination of sender interface action</Trace>
    >   <Trace level="1" type="T">select interface</Trace>
    >   <Trace level="1" type="T">select interface namespace</Trace>
    >   <Trace level="1" type="T">--start determination of receiver interface action</Trace>
    >   <Trace level="1" type="T">Loop 0000000001</Trace>
    >   <Trace level="1" type="T">select interface data_tobw</Trace>
    >   <Trace level="1" type="T">select interface namespace http://integrate/xi/bw</Trace>
    >   <Trace level="1" type="T"><b>--no interface action for sender or receiver found</b></Trace>
    >   <Trace level="1" type="T">Hence set action to DEL</Trace>
    >
    > Help me to send xml to BW please.
    >
    > Thanx in advance,
    > Alex
    confirm if interface data_tobw with namespace http://integrate/xi/bw is present in IR and also if it is activated.
    Also do a cache refresh from sxi_cache

Maybe you are looking for