+ ConditionType condition = ((RuleType) object).getCondition();
+ if (condition != null) {
+ ApplyType decisionApply = (ApplyType) condition.getExpression().getValue();
+ decisionApply = (ApplyType) decisionApply.getExpression().get(0).getValue();
+ ruleAlgoirthmTracker = new LinkedList<Integer>();
+ if(policyAdapter.getRuleProvider()!=null && policyAdapter.getRuleProvider().equals("GUARD_YAML")){
+ YAMLParams yamlParams = new YAMLParams();
+ for(int i=0; i<attributeList.size() ; i++){
+ Map<String, String> map = (Map<String,String>)attributeList.get(i);
+ if(map.get("key").equals("actor")){
+ yamlParams.setActor(map.get("value"));
+ }else if(map.get("key").equals("recipe")){
+ yamlParams.setRecipe(map.get("value"));
+ }
+ }
+ ApplyType apply = ((ApplyType)((ApplyType)decisionApply.getExpression().get(0).getValue()).getExpression().get(0).getValue());
+ yamlParams.setGuardActiveStart(((AttributeValueType)apply.getExpression().get(1).getValue()).getContent().get(0).toString());
+ yamlParams.setGuardActiveEnd(((AttributeValueType)apply.getExpression().get(2).getValue()).getContent().get(0).toString());
+ yamlParams.setLimit(((AttributeValueType)((ApplyType)decisionApply.getExpression().get(1).getValue()).getExpression().get(1).getValue()).getContent().get(0).toString());
+ String timeWindow = ((AttributeDesignatorType)((ApplyType)((ApplyType)decisionApply.getExpression().get(1).getValue()).getExpression().get(0).getValue()).getExpression().get(0).getValue()).getIssuer();
+ yamlParams.setTimeWindow(timeWindow.substring(timeWindow.lastIndexOf(":")+1));
+ policyAdapter.setYamlparams(yamlParams);
+ policyAdapter.setAttributes(new ArrayList<Object>());
+ policyAdapter.setRuleAlgorithmschoices(new ArrayList<Object>());
+ break;
+ }
+ // Populating Rule Algorithms starting from compound.
+ prePopulateDecisionCompoundRuleAlgorithm(index, decisionApply);
+ policyAdapter.setRuleAlgorithmschoices(ruleAlgorithmList);
+ }