Creating simple Business Rules in BPEL process

Hi,
I have an environment consisting of SOA Suite 11g running on Weblogic Server. I'm using JDeveloper 11g for development.
Scenario
I have a BPEL process which starts off by polling a DB table and I then assign the input to a Recieve activity's InputVariable. I have a 'Number' column which will contain a number between 1 and 3. I then require Business Rules (BR) to be set up which read this value, and based on the number, assign a 'Name' string (which is to be the output variable from the business rules) to be used later on in BPEL process.
Problem - I have followed the basic tutorials available in order to set up the business rules, but am getting numerous errors. Firstly, I sometimes find that my input/output variables created during setup of BR component and the XSD based on this, does not have XML Faces automatically created for it (therefore have to create it myself by clicking on the + button and doing this for each element of XSD). When I do get this working, I then double-click on my Business Rules activity in my BPEL process, only to find that the input/output variables here no longer are assignable to my BR input/output variables as I get the following error "Exception: Problem Building Schema!".
I am not sure why this is, but suspect that my XSD (which is very simple anyway) or the setup steps I follow to define the link to my XSD, are wrong.
I have taken the following steps so far:
1. Create empty BPEL process
2. Set up polling adapter to poll DB table
3. Create Receive activity and assigned polled input to created variable
4. Add Business Rules component to composite and set up and create dictionary here. Also set up inputs/outputs to be in form of my XSD elements.
5. Add Business Rules component to my BPEL process and configure this to include input/output variables (*This is where error occurs*)
6. Go back to .rules component in composite to define rule and define rule
Upon deployment, I get many errors most of which pertain to "Unresolved XML element... make sure XML element +xxxxx+ is defined in one of WSDL's that are referenced by the deployment descriptor."
I have only imported a simple XSD containing two elements to this project. The other XSD is the one of my polling adapter. I've not created any input/output variables for the overall BPEL process as didn't think I was required to.
Can you please help in getting this process doing the simple activities described at the top.
I appreciate your help.
Edited by: user10248308 on 10-Mar-2010 11:49

Hi,
Create a project with BPEL composite
Now drag a business rule
Now create input variable of type ur requestelement
and output variable of type response element
Now in rules designer page take decision table
and then craete a condition (inputelement.input > 1000) and in the rule select true
now create another rule select false
Npw create an action with assertion and select the parameterized box there
now in designer page for first rule assign some value (say 500) and for second rule some value(100)
Now in bpel u have to assign a value to input var of BR
Deploy the process
If u supply 10000 u will get 500
if u supply 100 u will get 100
In the same way u can do by using If-Then
You can use facts and bucketsets according to ur requirement
Regards
PavanKumar.M
PavanKumar.M

Similar Messages

  • JHeadstart, Oracle Business Rules and BPEL Process Manager

    Dear JHeadstart Team,
    I have some questions regarding integration of JHeadstart and Oracle Business Rules and Oracle BPEL Process Manager. As a matter of fact I don't have any work expriences with these tools so my questions may not be good and precise.
    1- Using a business rule engine can dramatically increase speed of development and ease of maintenance.I had a very good exprience in using JHeadstart and Headstart in the past but I wanted to know if it is possible to use Oracle Business Rules in conjunction with the JHeadstart ? If so, What steps should be taken? Is there any known issue about this integration? Does Oracle Business Rules have any interference with JHeadstart or it is only used in model layer during insert,update,delete?
    2- Is it possible to develope a system based on oracle work flow engine (Oracle BPEL Process Manager) using JHeadstart ? If so, What steps should be taken and how the changes in the flow of work would by applyed in a system developed by JHeadstart. Is there any known issue about this integration?
    Any help,link to documents or general guidelines would be highly appreciated.
    Thanks in advance,
    Navid

    Couple of things I would like to add, are the following.
    In the context of an ADF application usage of Oracle Business Rules most likely is in the business logic layer, but mind that it does not need to be restricted to that.
    Oracle Business Rules takes so called 'facts' as input, evaluates some rules based on that and change those facts or return some result. That might be checking a business rule as defined in the JHeadstart Developers Guide. But it might also return some value that is used in a navigation rule.
    Think about a page flow where after page A normally page C is presentend, but in case of some situation (like a customer ordered something and you want to present some special offering based on that) you want page B presented in between (i.e. A -> B -> C). Oracle Rules could be used to determine this page flow. This would be an example of using it in the controller layer (probably in combination with using facts that come from the model layer).
    Another remark that I would like to make, is that in my opinion it does not make much sense to use Oracle Rules for business rules that logically more or less are part of your data model (like end date must be on or after begin date). You typically use Oracle Rules to implement business rules that are of a volatile nature, meaning that day-to-day business may require a change of the rules. One example is the navigation case that I mentioned before. Another (typical) example would be a rule that defines when a customer is a Gold customer.
    Jan Kettenis

  • Unable to integarte Oracle business rules with BPEL

    hi'
    I am unable to integrate Business rules with BPEL, I am using JDeveloper to do this.
    I have successfully made a connection to rule repository and using decision service in synchronous BPEL process.
    In the decision service wizard step 1 of 2
    1.) Selected 'Execute Ruleset' in Invocation pattern
    2.) Selected rules set which I have cretead before.
    the problem is coming when nothing is geting displayed in the
    window below for Fact name, assert name, watch fact.
    please help me why Fact name, assert name, watch fact are not coming.
    thanks
    Yatan

    Thanks Anirudh,
    Do I need to make some changes in the java classes or in the XSD file which I am importing while creating new BPEL process
    I am importing the same XSD file in input and output, actually I am updating the database in the BPEL process so I am taking the
    input from the payload and updating the DB.
    Do I need to make two different <complexType name="updatingDB"> and <complexType name="businessrules">in the XSD
    if you have some example which shows the Integration of BPEL and Business rules
    with Java facts please share it with me.
    thanks
    Yatan
    Edited by: user10681871 on May 25, 2009 11:51 PM
    Edited by: user10681871 on May 26, 2009 12:02 AM

  • Accessing Business rules from BPEL, OESB and OSB

    How to aceess Business rules from BPEL, OESB and OSB ?

    Hey you can use Decision Service in BPEL process. You have "Decide" activity for this. However, no idea about ESB or OSB.

  • Error while creating a business rule

    Hi all,
    I am trying to create abusiness rule from eas console when I am choosing business rule >repsitory view > rules>new rule> select outline,
    I am able to select a essbase database outline ,but while I am trying to select planning outline i am getting the following error
    WARN http-10080-Processor4 com.hyperion.hbr.plugin.planning.PlanningMetadata - Error connecting to Planning server metamorp-ee0b9e.
    Any suggestion?
    Thanks

    Hi,
    The first thing to always try is :-
    stop planning service
    stop eas service
    restart rmi service
    start eas service
    start planning service
    log into planning application you want to create a business rule for.
    log into EAS, create business rule, associate outline with planning app
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Help with Creating a Business Rule...

    Hi All,
    I am using Planning 11.1.1.1.0.
    I have created a classic planning application and now have to incorporate a way to copy data from one slice of the essbase db to other.
    I am trying to copy data from the following slice
    Entity : EasternZone
    Version:Working (Bottom Up)
    Scenario: Actuals
    Currency:USD
    Period:YearTotal
    Year: 2007
    to
    Entity : EasternZone
    Version:Working (Bottom Up)
    Scenario: Actuals
    Currency:USD
    Period:YearTotal
    Year: 2008 and increase by a certain percentage which is not fixed..
    How should i go about achieving this using business rules? (Calc manager is used with only EPMA applications so where do i create the business rule?) Can somebody share some ideas please?
    Any help would be greatly appreciated.
    Kind Regards.
    Alicia

    Hi!
    Are you transferring data in same application from db to another? If yes, then possibly you could use @xref function.
    for example :
    fix ("EasternZone", "Working","Actuals","USD","YearTotal")
    "2008" = @xref("_name of source db location alias_","2007")*[RunTimePrompt for percentage];
    endfix
    The name of the location alias you can find from destination db --> edit --> location aliases. There you can see the location alias name of the source db.
    if you want to be sure about block creation then you could also add the following rows at the beginning
    /*fix ("EasternZone", "Working","Actuals","USD","YearTotal","any account")*/
    /* "2008" = 0;*/
    /*endfix*/
    kind regards,
    user637777

  • Create a Business Rule to validate a datetime field

    Hi friends,
    I'm trying to create a business rules to validate a datetime attribute.
    I tried to use the Validation "must contain the pattern" but I don't kwnow exactly how it works.
    In the Edit Action section I have 3 options:
    - Attribute value
    - Attribute
    - Blank
    Where should I write the RegExp?
    Any comment will be appreciated.
    Kinde Regards,
    Paul

    Hi superbluesman,
    thanks for your quick answer.
    I created this expression to validate my specific date format and it works:
    ^(0[1-9]|1[012]|[1-9])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d
    Kind Regards,
    Paul

  • While i am creating my business rule i am not able to connect the planning

    while i am creating my business rule i am not able to connect the planning application and database?I dont know what is the reason?

    Make sure you log into the planning application before logging into EAS.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Business Rules and BPEL integration

    hi
    can u provide me information on how to integrate Business Rules with BPEL. do provide me any documents related to this, if any.

    Hi,
    In the new 10.1.3 release (scheduled to hit the streets this summer) Oracle provides business rules support in the BPEL product.
    Supported in 10.1.3 are Ilog Jrules as well as Oracle's own business rules engine that will be contained in the package.
    More info on new features can be found in a recent web seminar for which the replay can be obtained here: http://www.oracle.com/technology/products/ias/bpel/htdocs/webinars.html.
    Hth, Sjoerd

  • Creating a dynamic variable in bpel process

    hi
    I have a requirement i.e. how to create a dynamic variable in bpel process?
    Help me out with this....thanks.

    Open your bpel and look for and icon that looks like this... (x)
    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_gsbpel.htm#CIADACJJ

  • Business rule assignment in Process Control 10.0, does not show any Control

    Hi All,
    I have created Organization, and assigned Mitigation control, as shown below. I have also created data Source and Business rule. But Business rule assignment is Blank for Controls. So, could you suggest, how can i see the Controls for the Business rule
    Regards
    Plaban

    You'll need to ensure the timeframes are aligned. What is the valid from date of your organisation and equally so important from your (sub)proces and your control. You are trying to do an assignment as per the first of january 2015. You'll not find entities that are created after Jan 1 2015.
    Furthermore you can only select controls that are either earmarked to be tested automated or semi-automated.
    Finally you're refering to mitigating controls. So that would imply you have integrated the AC mitigating controls with PC or vice versa. What is the creation date of the mitigating control and per which date has it been assigned to the local subprocess?
    In order to provide a precise answer we'd need more details on the exact process you've follow. There are simply more than on possible root causes depending on what you've done.
    Hope this helps.
    Cheers,
    Jan

  • Business Rules with BPEL or ADF

    Hi,
    My requirement is :
    We have to migrate records from one DB table to another DB table.
    And we have to apply Business Rules on those records while they are on there journy from source DB to target DB.
    We have two choices to achieve this:-
    1) Use BPEL process and Tranform Record from Source to Destination by applying Business Rules
    Or
    2) Develop ADF application and use business rules SDK to fetch the Rules and apply them to Tranfer Data from Source DB to Traget DB.
    Can anybody suggest the better approach on this.
    Thanks & Regards,
    anvv sharma

    You may want to provide more information on your use case. The way I read this is that neither product would suite your use case. This looks more like an ETL solution, therefore ODI may be a better play.
    Is this a one off exercise?
    How big is the payload?
    what are the examples of the business rules?
    Are the business rules dynamic?
    cheers
    James

  • Error while creating a Business rule dictionary in Jdevloper 11g

    Hi,
    I am getting the following error when i define the Inputs and outputs during creating on a new business rule dictionary.
    Some XML schemas are not in the "xsd" directory! gardes.xsd
    Please manually move or copy the Schemas
    I am following the "Creating a Rule-enabled Non-SOA Java EE Application" guide in Oracle® Fusion Middleware User's Guide for Oracle Business Rules, 11g Release 1 (11.1.1)
    The two schema files generated were having different content after creation of XML schema file so I copied the file to make them same. Its still giving me the same error.
    Please Help.
    Thanks,
    Mac

    Please post business rules questions on the SOA Suite forum:
    SOA Suite

  • Error creating web service proxy for bpel process in jdev 10.1.3

    Hi,
    I am trying to create a web service proxy in Jdeveloper 10.1.3, and get the following error:
    Element type "fault" is missing required attribute "name"
    I have created a fault on one of the operations, and in the .wsdl file there is a name attribute:
    <operation name="process">
    <fault name="TestError" message="client:TestErrorMessage"/>
    </operation>
    The fault definition in the .wsdl obtained from the process when you access it over http is somewhat different:
    <fault>
    <soap:fault name="TestError" use="literal" encodingStyle="" />
    </fault>
    Any ideas how to workaround this problem?
    Toby

    Hi Susan,
    The WSDL generated by BPEL designer is :
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="EncryptedPasswordTest"
    targetNamespace="http://xmlns.oracle.com/EncryptedPasswordTest"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/EncryptedPasswordTest"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of services participating in this BPEL process
         The default output of the BPEL designer uses strings as input and
         output to the BPEL Process. But you can define or import any XML
         Schema type and us them as part of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <types>
              <schema attributeFormDefault="qualified"
                   elementFormDefault="qualified"
                   targetNamespace="http://xmlns.oracle.com/EncryptedPasswordTest"
                   xmlns="http://www.w3.org/2001/XMLSchema">
                   <element name="EncryptedPasswordTestProcessRequest">
                        <complexType>
                             <sequence>
                                  <element name="username" type="string"/>
                             </sequence>
                        </complexType>
                   </element>
                   <element name="EncryptedPasswordTestProcessResponse">
                        <complexType>
                             <sequence>
                                  <element name="password" type="string"/>
                             </sequence>
                        </complexType>
                   </element>
                   <element name="EncryptedPasswordTestProcessError">
                        <complexType>
                             <sequence>
                                  <element name="code" type="string"/>
                                  <element name="description" type="string"/>
                             </sequence>
                        </complexType>
                   </element>
              </schema>
         </types>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <message name="EncryptedPasswordTestRequestMessage">
              <part name="payload" element="client:EncryptedPasswordTestProcessRequest"/>
         </message>
         <message name="EncryptedPasswordTestResponseMessage">
              <part name="payload" element="client:EncryptedPasswordTestProcessResponse"/>
         </message>
         <message name="EncryptedPasswordTestErrorMessage">
              <part name="payload" element="client:EncryptedPasswordTestProcessError"/>
         </message>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- portType implemented by the EncryptedPasswordTest BPEL process -->
         <portType name="EncryptedPasswordTest">
              <operation name="process">
                   <input message="client:EncryptedPasswordTestRequestMessage" />
                   <output message="client:EncryptedPasswordTestResponseMessage"/>
    <fault name="EncryptedPasswordTestError" message="client:EncryptedPasswordTestErrorMessage"/>
              </operation>
         </portType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <plnk:partnerLinkType name="EncryptedPasswordTest">
              <plnk:role name="EncryptedPasswordTestProvider">
                   <plnk:portType name="client:EncryptedPasswordTest"/>
              </plnk:role>
         </plnk:partnerLinkType>
    </definitions>
    And the WSDL produced when you access the ws endpoint is:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="EncryptedPasswordTest"
    targetNamespace="http://xmlns.oracle.com/EncryptedPasswordTest"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/EncryptedPasswordTest"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:client="http://xmlns.oracle.com/EncryptedPasswordTest"
    >
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/EncryptedPasswordTest"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="EncryptedPasswordTestProcessRequest">
    <complexType>
    <sequence>
    <element name="username" type="string"/>
    </sequence>
    </complexType>
    </element>
    <element name="EncryptedPasswordTestProcessResponse">
    <complexType>
    <sequence>
    <element name="password" type="string"/>
    </sequence>
    </complexType>
    </element>
    <element name="EncryptedPasswordTestProcessError">
    <complexType>
    <sequence>
    <element name="code" type="string"/>
    <element name="description" type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    </types>
    <message name="EncryptedPasswordTestErrorMessage">
    <part name="payload" element="tns:EncryptedPasswordTestProcessError"/>
    </message>
    <message name="EncryptedPasswordTestResponseMessage">
    <part name="payload" element="tns:EncryptedPasswordTestProcessResponse"/>
    </message>
    <message name="EncryptedPasswordTestRequestMessage">
    <part name="payload" element="tns:EncryptedPasswordTestProcessRequest"/>
    </message>
    <portType name="EncryptedPasswordTest">
    <operation name="process">
    <input message="tns:EncryptedPasswordTestRequestMessage"/>
    <output message="tns:EncryptedPasswordTestResponseMessage"/>
    <fault name="EncryptedPasswordTestError" message="tns:EncryptedPasswordTestErrorMessage"/>
    </operation>
    </portType>
    <binding name="EncryptedPasswordTestBinding" type="tns:EncryptedPasswordTest">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="process">
    <soap:operation style="document" soapAction="process"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    <fault>
    <soap:fault name="EncryptedPasswordTestError" use="literal" encodingStyle=""/>
    </fault>
    </operation>
    </binding>
    <service name="EncryptedPasswordTest">
    <port name="EncryptedPasswordTestPort" binding="tns:EncryptedPasswordTestBinding">
    <soap:address location="http://bpel5.lon.domroot.com:7779/orabpel/default/EncryptedPasswordTest/1.0"/>
    </port>
    </service>
    <plnk:partnerLinkType name="EncryptedPasswordTest">
    <plnk:role name="EncryptedPasswordTestProvider">
    <plnk:portType name="tns:EncryptedPasswordTest"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

  • Error creating 'Journalling Business Rules'

    When running 'Maintain Journalling Business Rules' for a table with 19 columns an EMPTY 'BR_xxx_JRN_DEL' trigger is created , hence the CAPI definition fails.
    If I add 1 more column to make it 20 columns the 'BR_xxx_JRN_DEL' and the CAPI are both generating correctly.
    Has anyone else found this ?????

    Sandra,
    Ok we have the modified version of hsd and we still have similar problem. Here is the detailed log
    Log Messages
    Utility      Maintain Journalling Business Rules
    Revision      6.5.3.2
    Parameters      
    Prompt      Value
    Table to be Journalled      app/ my table
    Errors
    Message
    Activity aborted with ORACLE internal errors.
    -6502 ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Debug Detailed
    Message
    BLAPI.OPEN_ACTIVITY
    Number of Tables to create/delete Journalling Rules for: 1
    Business Rule Design Definition for BR_xxx_JRN_UPD
    No Update Trigger Columns specified. Business Rule BR_xxx_JRN_UPD will fire when any column is updated.
    end of initial_checks
    Create/maintain message with constraint_name = HRS_BR_xxx_JRN_UPD
    Message QMS-00151 already exists in Headstart message tables, no new message was created.
    Activity aborted with ORACLE internal errors.
    -6502 ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    and this is the piece of code from bltext
    -- 6.5.2.3 changed if condition
    -- if length(l_text_lines(l_ctr + 1))+ 2 + length(l_build_string) &gt; 1990
    if length(replace(l_text_lines(l_ctr + 1), chr(10), NL_CR)||NL_CR)
    +
    length(l_build_string) &gt; 2000
    then
    exit;
    end if;
    end loop; -- compose 1 build string
    -- 6.5.2.3 changed if condition
    -- if nvl(length(l_build_string),'') &gt; 0
    if nvl(length(l_build_string),0) &gt; 0
    then
    -- 6.5.0.1 column element_type_for added.
    insert into cdi_text
    ( txt_ref
    , txt_seq
    , txt_type
    , txt_text
    , element_type_for
    values
    ( p_el_id
    , l_insert_at_seq
    , p_text_type
    , l_build_string
    , p_el_type
    end if; -- nvl(length(l_build_string),'') &gt; 0
    if l_ctr &gt;= p_text_counter
    then
    exit;
    else
    l_build_string:= '';
    l_insert_at_seq:= l_insert_at_seq + 1;
    end if; -- l_ctr = p_text_counter
    end loop; -- (maximum) over all lines in local text-store
    end if; -- l_lock
    exception
    when others
    then
    bllog.write
    ('Exception: '||sqlerrm
    , bllog.debug
    bllog.write
    (' Length Buildstring '||to_char(length(l_build_string))
    , bllog.debug
    bllog.write
    (' Line number '||to_char(l_insert_at_seq)||' Text type = '||p_text_type
    , bllog.debug
    bllog.write
    ( 'Exception; Note that the text for this element may have been corrupted.'
    , bllog.errors
    end write_lines_to_repository;

Maybe you are looking for