Skip to Content
author's profile photo Former Member
Former Member

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 12:38 PM

    Hi Andre,

    I do not understand why you are using a fork + wait step. Why don't you simply define you event as a terminating event of your activity step. from there you can bind whater parameter you need from the event container to the task container and then to the workflow container.

    Rgds,

    Patrick

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 09:40 AM

    Hi Andre,

    In the wait step also Class events will work. Have you class is initiated in the workflow?

    Also, please check the below link. It will help You.

    wait-step-error

    Thanks,

    Viji.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 10:15 AM

    Hi Viji,

    hi have read the thread that u gave to me. I start the workflow with an other event from the same class. In the container is a self-reference ("me") of my class. With this i fill a workflow container-element of the same class. This workflow container element is populated and i use it in the wait step.

    Maybe the configuration of my wait step is false .. i didnt mark "use correlation". Or the type-linkage is wrong, because thers no entry about my event. The instance linkage is filled correctly by the system, i guess.

    Andre

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 10:34 AM

    Hi,

    'My target is, to bring the user desicion back to the workflow via event.'

    Well it seems that the objective is to get data that is populated in the event container, whcih can be achieved in other ways also.

    When you are calling the WEBDYNPRO screen, after approve or reject button, you can make use of FM SAP_WAPI_WRITE_CONTAINER that can write entries in the workflow container similar to the container used by calss event.

    Alternatively, you can bind back the class event container to workflow container by binding back from the dialogue step.

    Hope this helps.

    Sangvir Singh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 10:55 AM

    Hi,

    As you told, you have activity with an abap method. So this activity will be using either calss or BOR object that is calling a method.

    So in the method that is being used to call webdynpro, you can create export parameter of that method of type event container table.

    Now after approval or rejection, fill this export table and bind back to workflow.This will pass data back to workflow container.

    Let me know if you need more clarification.

    Regards,

    Sangvir

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sangvir,

      i understand what u mean. But i dont know how to fill the export table. To display the dynpro i use the fm WDY_EXECUTE_IN_PLACE. I can provide some information with url-paramters (type String only) to the webdynpro. For Example the source-location of the pdf, wich should be displayed. But i dont know how i can get data from the webdynpro back to the method. Do u have ideas?

      Andre

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2010 at 12:33 PM

    Hi Patrick,

    the simple solutions are always hard to find. U were right thx alot 😊

    Regards,

    Andre

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.