1 Reply Latest reply: May 31, 2011 5:38 PM by 845768 RSS

    Business Rules Error when Decision Function surfaced as WebService in BPM

      To use a BusinessRule as from a Business Rules activity,it needs to be surfaced as a WebService.

      I've run into an issue where as soon as I check that box and save, the BusinessRule in question goes into a error mode when viewed from the BPM Project Manager (which is why this question is posted here).

      The scenario is this:
      My types are defiend in XSD. There is a SimpleType - FooStepTypeType - which is a retricted xs:string, the common way top create an enumeration. I import this as an XML fact, it creates a Enum bucketset, which is perfect. I create a decision function - DecisionFunction1 - which has an input parameter of this type and a boolean output. I set up a simple decision table to use the input and assert the output. The editor is happy.

      At this point, I can't use the DF in my process, as it's not exposed a service, and won't be selectable via the the Properties/Implementation of a Business Rules activity.

      A soon as I mark the DF as a WebService and save it, an the rule disappears from the Rules section of the Business Catalog and reappears at the root of the catalog in error. In some cases it can't be edited.

      Hovering over the error file produced this error message:
      The argument ‘step’ of decision function ‘DecisionFunction1’ could not build because of ‘BPM-71517: Unable to identify the parameter QName. Cause: ‘FooStepTypeType. Action: Make sure that the decision function parameter is of XML type and exactly one XML Schema Element exists that represents the parameter’.

      My XSD previously did not contain a freestanding element of this type, but had elements defined in another complex type of this type. Adding a freestanding element didn't change anything. In fact it seems that elements are not avaialble to be imported as XMLFacts, only types.

      At this point, if the Rules editor is still open, the DF can be "unserviced" and after saving may be recoverable with a JDev restart. If not, manually removing the DF from the .rules xml file can help recover the file so that it can be edited again.

      Why can't I use a simpleType as an input parameter for a DF exposed as a WebService? What is BPM-71517 asking me to do exactly? I can't find any references to it via searching. Why does eveything seem fine until I expose it?

      Addendum - using JDev with BPM tools
      Addendum2 - upgraded to and the problem is still there.....


      Edited by: wylderbeast on May 20, 2011 9:38 AM

      Edited by: wylderbeast on May 20, 2011 10:09 AM

      Edited by: wylderbeast on May 31, 2011 3:22 PM
        • 1. Re: Business Rules Error when Decision Function surfaced as WebService in BPM
          Further invesitgation bears this problem out.

          Oracle support recommend wrapping the SimpleType in a ComplexType. This does work, but now I have an extra wrapper element to deal with. I either have to use the wrapped type in my other complex, composed Types and/or add an external wrapping element when trying to create Business Services in BPM to call the BusinessRules I've created.

          This is a bit messy.

          To be clear, this does not seem to be an issue with Business Rules; the BR editor and generation of Facts (including simple restricted types -> JAXB 2.0/Java Enumerations) seems to work correctly. There seems to be an issue exposing DFs as Services. The code which generated the WSDL and its supporting types seems to choke on restricted SimpleTypes.

          As a side note, it seems that HumanTasks have a similar limitation

          Edited by: wylderbeast on May 31, 2011 3:27 PM