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") 


    Forms to modify Rules:



    Forms to modify Records:



    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.


    Download attachment from resources


    User Feedback

    Recommended Comments

    There are no comments to display.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...