Skip to Content

functional method not evaluated in wf start condition

I want to extend an existing (and working) start condition with a functional method of a custom BOR object. However, it seems that the functional method is not evaluated when the event is triggered, so the workflow is started even if conditions aren't met.

The workflow is started with event FIPP-ASSIGNED (available through delegation from custom BOR object ZOKU_FIPP). The existing start condition checks for the company code. I added a new functional method to it.

The functional method is defined as a synchronous method with some ABAP for additional checks.

I have tested that the start condition works fine when I test it in the condition editor with proper test data.

I have also tested using the corresponding functional method as a separate step in the workflow. It is called and works correctly then. However, I checked with debugging (an eternal loop + SM50) that the functional method is not called from the start condition when the event is triggered.

What am I missing?

startcond-1.png (18.9 kB)
startcond-2.png (19.5 kB)
startcond-2.png (19.5 kB)
startcond-3.png (77.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 13, 2017 at 06:51 AM


    It is correct, your functional method will not call. Simply adding a method in BO will not call internally. You have to use it in TASK.

    For your requirement you can use Check FM in Event linkage. You can find lots of document in SAP SCN for that.

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks for the tip Anjan!

      I don't agree with you that the method should/would not call, but thanks to you, I reinvestigated and noticed a silly typo that prevents the rule from executing. Unfortunately, even after correcting that type, the method is not called.

      The typo was that I had chosen the attribute IsParked into the rule, but my method is called IsDuplicate. Didn't notice that even though I took the screen prints for my original post.

      Why I think the method should be called: we have configured the FM SWB_2_CHECK_FB_START_COND_EVAL into the event linkage. See note 2146464 for instance. The function module interprets the start conditions maintained with the condition editor (above). I debugged the function with suitable input parameters, and I see that it is evaluating the specified start condition with company codes and the function module.

      I set a breakpoint into my functional method, and use the test tool in the condition editor. The method is called.

      However, when I call the function SWB_2_CHECK_FB_START_COND_EVAL with appropriate input parameters, the method does not get called. Instead, the function call returns an error indicating that it couldn't interpret the conditions. I'm not sure how seriously I should take that, as the condition editor confirms that the condition is correctly formed.

      rule-table2.png (44.5 kB)
  • Feb 13, 2017 at 01:34 PM

    This post also gave me the idea to create a suitable check function module. Still, I'd rather not do that, as I'd need to incorporate the existing company code checks as well. The start conditions should be a flexible tool for adding rules, and it's more transparent to superusers.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 30, 2017 at 12:09 PM


    You can use the functional methods same as how you use your container elements in the binding definition. check this blog.


    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14, 2018 at 08:04 AM

    I agree with Pavan that I should be able to use functional methods. Unfortunately, it doesn't work. So I ended up evaluating it as a separate task, as I had tried and Anjan confirmed.

    Add comment
    10|10000 characters needed characters exceeded