Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • Business Rules using BPM Global Data


    Vikas Kumar 9

    This Sample about simple BPM Rules using Global Data is about Pageflows to store some basic BPM Rules in BPM Global Data with only one Condition String and one Action String, i.e. RQLs, SLA's, condition gateway parameters, dynamic sub-proc path selection, etc. 

    Plus a more or less Complex Pageflow to browse, add, update and delete values (Business Service Pageflow: "Modify Rules & Records") 

    rule-pageflow.png.7e224a73305607d9bf1143cb2850d00f.png

    Forms to modify Rules:

    rules_2.png.75804c16254aaaca983a8488462ce1a4.png



    rule-definition.png.7f85aaf22b7867f38150ff78ab54e0e6.png  

    Forms to modify Records:

    rule-records.png.ac079509c3c6955a7000be32638bd735.png


    rule-record.png.ba6b75ef882ab2d39cc68a33afc5c0d2.png  

    Simple Rule Lookup Examples during Process Execution included in the Sample (Process: "_Sample Lookup Dummy" Script Task)

    The Sample first checks if a Rule Version is active and if it is valid for the current Date.

    DQL Sample extract:

     //***Sample2 findbyCriteria by using DQL (check for active Rule first) // finds only Rules that are active at the current time // Rulename must start with 'SLARule' i.e. 'SLARule-v1.0', 'SLARule-v1.1', etc.  var rulecrit =cac_com_tibco_evf_example_commonrulesgdata_Rule.createCriteria('(key=:ruleKey AND status=:statusValue AND validto>:validtoDate AND validfrom<:validfromDate) order by key desc',0,-1); rulecrit.setQueryParameter('ruleKey',"SLARule*"); rulecrit.setQueryParameter('statusValue',"ACTIVE"); rulecrit.setQueryParameter('validtoDate',DateTimeUtil.createDate()); rulecrit.setQueryParameter('validfromDate',DateTimeUtil.createDate());  var RuleList  = cac_com_tibco_evf_example_commonrulesgdata_Rule.findByCriteria(rulecrit);  var QRules = cac_com_tibco_evf_example_commonrulesgdata_Rule.read(RuleList); selectedRulename = QRules.get(0).key.toString();  var criteria = cac_com_tibco_evf_example_commonrulesgdata_RuleRecord.createCriteria('(key=:ruleKey AND condition=:conditionValue) order by key desc',0,-1); criteria.setQueryParameter('ruleKey',selectedRulename); criteria.setQueryParameter('conditionValue',Condition);  var RuleRecList  = cac_com_tibco_evf_example_commonrulesgdata_RuleRecord.findByCriteria(criteria); var QRules = cac_com_tibco_evf_example_commonrulesgdata_RuleRecord.read(RuleRecList); SLAdays2 = parseInt(QRules.get(0).action.toString());

     


    Full Sample Project attached below.

    Attachments

    Download attachment from resources

    20140722_global_data_bpm_rules_v.1.4-jgr.zip


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...