<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: functional method not evaluated in wf start condition in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367129#M26559</link>
    <description>&lt;P&gt;&lt;A href="https://blogs.sap.com/2014/11/06/sapwf-customer-connection-event-linkage-setting/"&gt;This post&lt;/A&gt; 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.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2017 13:34:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-02-13T13:34:45Z</dc:date>
    <item>
      <title>functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaq-p/367126</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/19770-startcond-1.png" /&gt;&lt;/P&gt;&lt;P&gt;The functional method is defined as a synchronous method with some ABAP for additional checks.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/19802-startcond-2.png" /&gt;&lt;/P&gt;&lt;P&gt;I have tested that the start condition works fine when I test it in the condition editor with proper test data.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/19804-startcond-3.png" /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;What am I missing? &lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 09:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaq-p/367126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-10T09:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367127#M26557</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;  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.&lt;/P&gt;&lt;P&gt;   For your requirement you can use Check FM in Event linkage. You can find lots of  document in SAP SCN  for that.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 06:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367127#M26557</guid>
      <dc:creator>anjan_paul</dc:creator>
      <dc:date>2017-02-13T06:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367128#M26558</link>
      <description>&lt;P&gt;Thanks for the tip Anjan!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/20191-rule-table2.png" /&gt;&lt;/P&gt;&lt;P&gt;I set a breakpoint into my functional method, and use the test tool in the condition editor. The method is called.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 13:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367128#M26558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-13T13:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367129#M26559</link>
      <description>&lt;P&gt;&lt;A href="https://blogs.sap.com/2014/11/06/sapwf-customer-connection-event-linkage-setting/"&gt;This post&lt;/A&gt; 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.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 13:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367129#M26559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-13T13:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367130#M26560</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use the functional methods same as how you use your container elements in the binding definition. check this &lt;A target="_blank" href="https://wiki.scn.sap.com/wiki/display/ABAP/Using+functional+methods+in+workflows+and+tasks"&gt;blog&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Thanks,Pavan&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:09:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367130#M26560</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2017-03-30T12:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367131#M26561</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 08:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367131#M26561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-02-14T08:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367132#M26562</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Even i tried to put the Check FM in Event linkage but it doesn't triggered and i couldn't able to meet the requirement as well. Can some one suggest how to put the Custom FM in Event linkage so that Check condition could get activated there&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sri Ram&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 05:32:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367132#M26562</guid>
      <dc:creator>former_member39336</dc:creator>
      <dc:date>2020-10-20T05:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: functional method not evaluated in wf start condition</title>
      <link>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367133#M26563</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I Achieved this functionality. Below are the points which i want to share.&lt;/P&gt;&lt;P&gt;1. i created a Custom FM and Kept the logic in it .&lt;/P&gt;&lt;P&gt;2. Went to SWE2 and in the event linkage placed that Custom FM.&lt;/P&gt;&lt;P&gt;3. Its mandatory to put the Exception along with your Condition (With respect to your scenario).&lt;/P&gt;&lt;P&gt; if sy-subrc eq/ne 0.&lt;/P&gt;&lt;P&gt;Raise Any Exception.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;This code has inserted according to my requirement and i got my requirement fulfilled.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sri Ram&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 06:27:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/functional-method-not-evaluated-in-wf-start-condition/qaa-p/367133#M26563</guid>
      <dc:creator>former_member39336</dc:creator>
      <dc:date>2020-10-28T06:27:50Z</dc:date>
    </item>
  </channel>
</rss>

