JBoss Community

Re: Unable to fire rules before and after human task using same rule flow group

created by Sameer K in jBPM - View the full discussion

I am using the below rule.

 

rule "RuleCheck"
ruleflow-group "validate"
no-loop
when
processInstance : WorkflowProcessInstance()
then
System.out.println("RuleCheck Executed="+processInstance.getId());
end

 

The log for above rule when i use the same rule-flow-group for multiple rule task in same process i.e. the flow mentioned in first post above is:

 

For 1st rule task

 

BEFORE RULEFLOW GROUP ACTIVATED group:validate[size=1]
BEFORE ACTIVATION FIRED rule:RuleCheck activationId:RuleCheck [1] declarations: processInstance=WorkflowProcessInstance26 [processId=Flow123,state=1](1) ruleflow-group: validate

RuleCheck Executed=25

 

For 2nd rule task

BEFORE RULEFLOW GROUP ACTIVATED group:validate[size=0] {I think this is the catch, might be wrong}

 

I feel from above log is that rule-flowgroup needs to be reactivated again, so that we get the size.

 

Can some one tell me how can we re-activate the rule flow group and then call fireallrules from afterRuleFlowGroupActivated method of AgendaEventListener.

 

Or atleast provide some pointers on how the AgendaEventListener and its methods work.

 

Thanks.

 

 

 

 

 



Reply to this message by going to Community

Start a new discussion in jBPM at Community