Abap-Class-Event in Wait Step

Hi guys,
in my workflow i have an activity with an abap method. This method works like a dialog. This means, i get a workitem in the business-workplace which shows a webdynpro where a pdf is displayed and where i can choose whether i click on button1 or button2.
When i click on one button, an abap-class event will be created. This event has a container. My target is, to bring the user desicion back to the workflow via event.
When i start a new workflow with this event then it works fine. But i dont want 2 workflows. I need a solution with one workflow. So i use a fork in my workflow. In branch 1 i have the activity which displays the pdf and create the event. In the other branch i have a waiting step, which waits for the event and bring the user-desision from the event-container to my workflow-container.
That was my plan, but it dont works this way. I checked the event-trace and theres no receaiver entered for my event. So my workflow stoped at the wait-step (wait step is ready).
I read, the the workflow system is automatikly doing the type-linkage and the instance-linkage, but i found only the instance-linkage filled. Can it be, that the wait step is only working with BOR-Events?
Any ideas?

Hi swangir,
i tryed this FW SAP_WAPI_WRITE_CONTAINER some days ago. I can use SAP_WAPI_READ_CONTAINER easylie but when i try to modify the container then i get an enqeue exception in the SAP_WAPI_WRITE_CONTAINER FM. I guess this came up, because i call the webdynpro from an activie-step in the workflow and not a dialog-step. So i guess the container is locked and i cant write. I also tried to unlock it with dequee_e_ .. FM i forgot the name. But it also didnt work.
Thats why i tryed to bring the user desision via event back to the workflow. And it works, as long i use 2 workflows, like i explained in my first post.
What do u mean with...
"Alternatively, you can bind back the class event container to workflow container by binding back from the dialogue step."
Andre

Similar Messages

  • ABAP OO class-based workflow, wait step

    Hello,
    I'm hoping someone is able to help me.  I've implemented a class which triggers a custom workflow through a custom event of the class.  At one point during the workflow I want to use a wait step that waits for another custom event to occur.  I've created my second event which I want to trigger from an ABAP ALV Grid report for users, that will allow them to select the specific workflows to trigger this event for.  My problem is, I am having trouble figuring out how to find the correct object instance of my class from within the ABAP program and trigger the event specifically for that instance, so that the workflow can continue and eventually complete.  I have implemented the IF_WORKFLOW interface and up to this point the workflow is functioning correctly.
    Thanks,
    Leslie

    Hello,
    Sorry, not sure where my brain was. Actually I do know: at two clients with projects going live this month, so apologies for a rushed and inaccurate response. It's CL_SWF_EVT_EVENT.
    Jocelyn's blog I referred to includes a code sample using the same class on how to raise an event with an object key.
    Regarding your second question: No you don't need to do any binding. Just use an instance of your object and it will wait for an event with the same key. The WF part is very straightforward and works exactly like BOR, it's just raising event that can't be done with the WAPI.
    Cheers,
    Mike

  • Use abap class event as terminating event

    Hi,
       The class is say ZCL_WF_CLASS and the event  END_WF.
    What needs to be done to have this event used correctly as a terminating event of a workflow? Does this event require a parameter to hold the workitem id (or workflow id), as currently this event has no parameters?
    Previous developer has developed the class and event and installed as a terminating event but the workflow is going into error not terminating correctly. I believe the incorrect development of the event and/or its use in the workflow is the issue. Note that nowhere is this event currently raised in any code of the workflow.
    Cheers,
    Ross

    Hello,
    Unless I'm mistaken, a terminating event for a workflow is just like any wait-for event in a workflow.
    It can be based on any object or class and it can be used in various ways - to terminate a branch or terminate the workflow, for example.
    The workflow listens out for the event and checks if there is a matching key. You could base it on the key of a workflow object but it makes more sense to base it on an object or class that's used in the workflow - e.g. the POSTED event of an object would be used to terminate a workflow seeking approval for the posting of an object.
    It definitely won't work if the event has no parameters. I guess if you do base it on the workflow object then you would use the top-level workitem id. Try it with a test workflow and SWUE to generate the event.
    regards
    Rick Bakker
    hanabi technology

  • Wait step event

    Hi,
    i am new to the workflows.i worked in support project and i am looking for development.
    could any one can explain:
    what is wait step event,
    when it should be used and
    while creating the wait step event do we use any tcodes to assign the events(swetypv,sweinst etc)
    generally when we use starting events we will write start conditions based up on that event will be triggered so in the same way how waitstep event will be triggered?
    Regards,
    Mudhiraj

    Use
    A wait step can wait for:
    u2022  An event
    u2022A condition
    u2022A local event
    u2022An event that is initially received by the workflow.
    At runtime, a wait step is represented by a wait step work item. Wait step work items are not displayed in the Business Workplace. You can, however, locate these using work item selection.
    Correlations
    You can use a correlation when waiting for an event and when waiting for an event by using workflow.
    A correlation enables you to identify objects that belong together, for example, a quotation and the relevant sales order.
    Features
    Wait for Event
    When waiting for an event, the wait step is terminated when the event specifies occurs. This event
    terminates all wait steps waiting for this event.
    You can use this type of wait step for the following purposes:
    u2022To suspend the workflow until a defined event has occurred.
               A workflow is to wait until documents requested have been provided for an applicant activity. Once the
    requested documents are received, the transaction used for inbound processing and archiving creates an
    event which the wait step waits as a receiver.
    u2022To wait for an event in a parallel processing branch, which renders processing in the other
    branches unnecessary.
    The event for which the wait step waits should not be created in the other branches of the fork.
    u2022Wait for the result or a message from another workflow that was started in another system by the
    WebFlow function.
    u2022Wait for a message of the process that the workflow started using a Wf-XML message.
    Wait for Condition
    When waiting for an event, the wait step is terminated when the corresponding condition returns the
    value true.
    Wait for Local Event
    When waiting for a local event, the wait step is terminated when this event occurs.
    Wait for Event Via Workflow
    When waiting for an event via the workflow, the event is initially received and temporarily saved by
    the workflow. Once the wait step has been activated, the event is forwarded to the wait step. During
    waiting via the workflow, the event can terminate a maximum of one wait step. If several wait steps are
    active, the event terminates the oldest wait step.

  • Event triggerred before Wait step

    What can we do when the event is triggerred before the wait step? Does anyone know about the concept of parked events?
    Iam using f.m swe_event_create, can we use the start_with_delay option or some other option..
    I would like to have some delay before the second event is raised. but at the same time as this would be a online program, the user should not feel the delay..
    or the Wait step should be modified to pick up already created events..(i think this is called parked events).
    CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
    *objtype =
    *objkey =
    *event =
    CREATOR = ' '
    TAKE_WORKITEM_REQUESTER = ' '
    START_WITH_DELAY = ' '
    START_RECFB_SYNCHRON = ' '
    NO_COMMIT_FOR_QUEUE = ' '
    DEBUG_FLAG = ' '
    NO_LOGGING = ' '
    IDENT =
    IMPORTING

    Hi Karri, thanks for the reply ..There is a presentation on parked events if you search the wiki and blogs on this site, you will find it but thats the only thing i have seen about it and its not really helpful.
    the problem is.. 2 Inbound idocs are created both at the same time one raises a event for workflow.. one raises a event for Wait step in the same workflow ..
    The 2 inbound F.Ms which raise the events, can error sometimes or the workflow can create a workitem before the Wait step and hang in there till its processed..(its unpredictable which one will trigger first)
    If the second event(for Wait step) is raised first and the workflow processing has not yet reached the Wait step, the workflow waits for the event to be raised(although the event is already there)
    Do you know of some way we can keep reprocessing until the Event receiver is found? (may be in a Raise event workflow step or in a Function Module)
    Edited by: sk123456 on Jun 5, 2010 11:47 AM

  • Calling Portal event from ABAP class

    Hi Experts,
    I need a following clarificatrion, Please help,
    1. Is it possible to call a webdynpro method from a normal ABAP class?
    2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    3. Is there any ways with which we can call portal event from ABAP class?
    Thanks,
    Shabir

    >1. Is it possible to call a webdynpro method from a normal ABAP class?
    I wouldn't necessarily recommend this approach. You shouldn't try to trigger events or any of the standard WDDO* methods from outside the WD Component itself.  That said, you can pass the object reference (like the WD_COMP_CONTROLLER object reference or the View Object Reference) into methods of normal classes.  Be careful if you are finding yourself calling a lot of your added methods from outside WD.  This is probably a sign that these methods should be in the Assistance Class or some other Class functioning as a Model Object.
    >2. If no, we need a functionality of a class 'CL_WDR_HTTP_EXT_MIME_HANDLER' having method 'DO_DOMAIN_RELAX_HTML'.
    Is there any alternative method which can be used in ABAP having the same functionality.
    What exactly do you want to do here?  Do you just want to get the relaxation script?  For what purpose?  You should never need to inject the relaxation script into WDA. 
    >3. Is there any ways with which we can call portal event from ABAP class?
    To what purpose.  Do you just want to delegate the triggering of the event that is inside WD Component to be called from a class?  If so you can pass the portal API object reference into a class from the WD Component.  However this only works while running within WD.
    How is this class used?  Are you running in WD?  Are you trying to generate some HTML code that runs in the portal independent of WD?

  • How to Handle Business Object event in ABAP class

    Hello Everybody,
    I wanted to know if it was possible to reference BOR objects in ABAP class and handle BOR events in ABAP Objects.
    Thanks in advance.

    Hi,
    Catch the et_VALIDATE event, when InnerEvent = False and ItemChanged = True.
                If pVal.EventType = BoEventTypes.et_VALIDATE Then
                    If pVal.InnerEvent = False And pVal.ItemChanged Then
                        'TODO Your code here...
                    End If
                End If
    Regards,
    Vítor Vieira

  • Create an event using abap class (transaction swetypv)

    Hi,
    I’m trying to create an event by using an abap class.
    The purpose is to update po reqs using BAPI_REQUISITION_CHANGE upon saving a sales order. The exit is called on saving a sales order MV45AFZZ.
    In MV45AFZZ the method cl_swf_evt_event is called and the object type, event, objkey and obj cat is exported.
    Object Type = ZBUS203200
    Event = Z_TRAD_ORDER_CHANGE_OO
    I created my class ZCL_UPDATE_PUR_REQ (by copying CL_SWF_RUN_WIM_HANDLER
    And using interface name BI_EVENT_HANDLER_STATIC )
    In /nswetypv I assigned Class ZCL_UPDATE_PUR_REQ
    to Object Type ZBUS203200
    And Event Z_TRAD_ORDER_CHANGE_OO.
    All that works fine except for passing in the objectkey.
    In Class ZCL_UPDATE_PUR_REQ
    Method BI_EVENT_HANDLER_STATIC~ON_EVENT
    When I go to create a parameter for object key, I get the message
    ‘Parameters/exceptions of inherited methods or events cannot be changed’.
    Has anyone any suggestions for how I can get the object key into the method call BI_EVENT_HANDLER_STATIC~ON_EVENT?
    Thanks
    Ann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • Event triggering by abap class & ISR

    hi gurus
    1 ) can i able to see the event triggering by abap class in SWEL ?  ,
    2) in custom  ISR scenario , new form scenario has been created by our functional consultant , and asking me to trigger a workflow for approval ,  when employee fills that particular ISR FORM , workflow should start and to go his HR administrator , when HR administrator double click on workitem he should get the ISR form in display mode  & also with some descpition text  is to be added in the screen (like user decision description ) with approval button ..... my question is how to trigger a event from in form scenario ? , how to bring the FORM screen to display mode  to the HR administrator ?
    regards
    surya

    Hi Surya
    The BO for ISR forms is BUS7051 - Notification. Turn on the trace via SWELS and create a PCR/ISR form and you should see the events being triggered in SWEL.
    Good Luck
    Ravi

  • Create an event using abap class

    Hi,
    I’m trying to create an event by using an abap class.
    The purpose is to update po reqs using BAPI_REQUISITION_CHANGE upon saving a sales order.  The exit is called on saving a sales order MV45AFZZ.
    In  MV45AFZZ the method cl_swf_evt_event is called and the object type, event, objkey and obj cat is exported.
    Object Type    = ZBUS203200              
    Event          = Z_TRAD_ORDER_CHANGE_OO  
    I created my class ZCL_UPDATE_PUR_REQ (by copying CL_SWF_RUN_WIM_HANDLER    
    And using interface name BI_EVENT_HANDLER_STATIC   )
    In /nswetypv I assigned Class  ZCL_UPDATE_PUR_REQ
    to     Object Type     ZBUS203200                 
    And   Event              Z_TRAD_ORDER_CHANGE_OO.
    All that works fine except for passing in the objectkey.
    In Class ZCL_UPDATE_PUR_REQ 
    Method  BI_EVENT_HANDLER_STATIC~ON_EVENT
    When I go to create a parameter for object key, I get the message
    ‘Parameters/exceptions of inherited methods or events cannot be changed’.
    Has anyone any suggestions for how I can get the object key into the method call BI_EVENT_HANDLER_STATIC~ON_EVENT?
    Thanks
    Ann

    Hi Johann,
    You don't need a class to do the job if you are on a 6.10 or higher system. Use command CALL TRANSFORMATION to create an XML from an internal table.
    Regards,
    John.

  • Waiting step wait longer though event has created

    HI Experts,
    I have a WF which has a waiting step in one of two parallel branches of a Fork. I use below FM to create an event which is successfully created but my workflow sometimes takes longer to continue. It shows the status READY longer. BUT sometimes it works fine but sometimes more than 20, 30 minutes. I want to know why??? has any one an idea why??
    CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                                    = c_object
          objkey                                      = lv_key
          event                                       = c_event
          START_RECFB_SYNCHRON  = 'X'
          NO_COMMIT_FOR_QUEUE      = 'X'
        IMPORTING
          event_id                                   = lv_envt_id
          receiver_count                        = lv_rcvr_cnt
        EXCEPTIONS
          objtype_not_found                   = 1
          OTHERS                                   = 2.

    Hi,
    Definately check SWEL. It will probably give you more information what happened to the event or what it is waiting for.
    There is not really that much difference between the functions. Both will create the event. But in general you should always chekc SAP_WAPI* functions before using some SWW* function when you are doing workflow development. They are newer versions and the support API for workflow development.
    Regards,
    Karri
    EDIT: And perhaps with the SAP_WAPI_CREATE_EVENT the events would work better - which I actually doubt in your case, because I think that there is something wrong in the system of some general configurations (events go into queue or whatever).
    Edited by: Karri Kemppi on Aug 24, 2011 1:14 PM

  • ABAP class in task

    Hello,
    I'm using a ABAP class in a task, but when I triggers the workflow in this step its gets blocked with the status "in process".
    The abap class is public and the method that I'm calling is static, Also I have implemented the IF_WORKFLOW interface to use from the task.
    Do you have any sugestion about this to don't get block?
    Thanks

    Hello Diego,
    when using class-based tasks, most exceptions thrown during the prepare and execution steps are generally caught and not beeing forwarded into the workflow log, especially when there's a general problem with the method definition.
    In this particular case, the execution of static methods probably runs into an exception, as an instance is (accidently) required, even though -- by definition -- the method is instance-independent. For sure, class methods cannot be called as functional methods in container operations. Possibly the method was instance-bound at the time, the task was created, and later on changed to a class method. Re-Creating the task could be helpful here. Otherwise pass an instance to the task container (event though not required) and let the runtime system have it to call the class' method.
    With the very best wishes,
    Florin

  • Wait step error

    Hi everyone,
    I am using a simple wait step in my work flow . It is a wait for Event step. It is a oo event . So i have added the class to my work flow container. And used it in my wait step . When i test the work flow it throws me the error "Error when processing node '0000000204' (ParForEach index 000000)" . What could be reason for this. Can anyone help me to solve this issue.
    Thanks & Regards,
    Kevin.

    Hi Karri,
    I have done the thing as u told.... i have created a method with a returning parameter of the same class type that i use ....and with in this method i have done the following
      DATA : LCL_INST TYPE REF TO ZCL_CRM_WF.
      CREATE OBJECT LCL_INST.
      EV_ZCL_CRM_WF = LCL_INST.
    Is this correct? ......Then i have used this method in my work flow...binding EV_ZCL_CRM_WF to my container element which is also of the same class type....is this all u expected me to do....if so it gives me the same error that i mentioned in the start of this thread....help me........
    Thanks & Regards,
    Kevin

  • Shooping cart creation in SRM 7.0 using web dynpro ABAP classes.

    Hi,
    We have recently upgraded to SRM 7.0 from SRM 4.0. We are using customized portal application for the creation of the shopping cart.I am planning to create custom FM which will use the standard Web dynpro ABAP classes to create the shopping cart.
    Could you please guide with the classes that are need to be implemented and the sequence of the classes used in the shopping cart creation.
    I think these are the classes that are used in the standard web dynpro ABAP component.
    CL_FPM_EVENT ->                  Creates an instance of this class based on an event ID.
    CL_BADI_FLT_DATA_TRANS_AND_DB -> Data Handling: Transport and Database.
    CL_EXITHANDLER ->               Class for Ext. Services Within Framework of Exit Technique.
    CL_EX_BBP_DOC_CHANGE_BADI ->     BAdI Class CL_EX_BBP_DOC_CHANGE_BADI.
    CL_BBP_OBJECTS_ACCESS ->         Access Functions for Object Types.
    /SAPSRM/CL_PDO_BO_SC ->          Shopping Cart BO.
    Your expert comments will be appreciated...
    Regards,
    Naresh

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • ABAP Class not displaying in operation mapping.

    HI,
    I have created abap class using se24 for throwing exception message in sxmb_moni, this abap class needs to be called in operation mapping, even though i have activated this abap class in PI environtment, i couldnt see the abap class option in the operation mapping.
    Could any one please let me know any change profiles requirements are required,
    Thanks,
    --Sai

    Hi Sai,
    Yes, you do have to register ABAP Class Mapping in the Exchange Profile to see this option in the Operation Mapping. Follow these step-by-step configuration guidelines:
    http://www.riyaz.net/sap/xipi-how-to-register-abap-mapping-in-exchange-profile/624/
    Hope this helps,
    Greg

Maybe you are looking for

  • Some sent messages lost in Apple Mail

    I have a new Macbook Pro early 2015 running Yosemite and use Apple Mail. I am surprised at how slow outgoing messages are to send, regardless of whether I'm on a fast or slow wifi network, regardless of whether the message has rich content. More trou

  • My colors are funky!

    i got the ati drivers installed and i set up xorg to have 2 heads 1 as my reguler display and one for my tv. they both work but some colors show up wierd on the tv. On the tv some of the brighter reds show up green and some of the brightest blues sho

  • Can I use iPhone 6 in South Korea?

    My brother wants to send me an iPhone 6 from USA so I can use it in South Korea.  It will be unlocked but does it matter to get a GSM or CDMA iPhone6?  What about to use LTe service in South Korea.  Is it better to get a CDMA or GSM phone? 

  • Change of USER status for SDHF transaction type though CRMD_ORDER

    Hi, We have a requirement to change the user status of transaction of type "SDHF" creted using CRMD_ORDER. We are using FM " CRM_STATUS_CHANGE_EXTERN" for the above requirement, but stuck with the following error "Status REL is not allowed". On analy

  • Change FC Group IP Address

    I have a 3 node failover cluster that I think needs an IP address change because the current cluster IP address is on my Node Management network. Here is my network config: FC Internal Communication 10.24.24.0/24, Cluster Use: Internal FC Live Migrat