Rule Event

Hi everyone,

 

I am using a rule Event to determine whether to continue the flow immediately

This is the way i do it

the rule it self return true/ false value

However, the following error occurs:

May I know why is that?

  Discussion posts and replies are publicly visible

Parents
  • Hi joanneh,

    The rule event evaluates to true iff the condition you specified to be true, then the flow be continued in the process flow.
    With your inputs(Screenshots) it's harder to say what is wrong in the rule. Can you provide the configure screenshot??
  • Dear Santosh Kumar D,

    Thanks for helping, this is the way I do it:

    "if(isusermemberofgroup( username:loggedInUser(), groupId:23),true,false)"

    and when I use a script task node to check the returned value from the above rule, it returns "true" as boolean; but it does not work in the rule Event node
  • Hello,

    First of all you don't need to wrap boolean function into if(), you can use isUserMemberOfGroup() directly. It should work.

    The error you have because this node is not user input and loggedInUser() doesn't return a correct value for isUserMemberOfGroup().

    As I understand your scenario should wait until some user will be added into a group in case he is not yet a member. In this case the user should be saved into a process variable and passed as a parameter into isUserMemberOfGroup(). The problem here is that the rule is reevaluated when a process variable changes and changing membership will not update process variable. So you need some additional pieces to have it reevaluated after membership changed.
Reply
  • Hello,

    First of all you don't need to wrap boolean function into if(), you can use isUserMemberOfGroup() directly. It should work.

    The error you have because this node is not user input and loggedInUser() doesn't return a correct value for isUserMemberOfGroup().

    As I understand your scenario should wait until some user will be added into a group in case he is not yet a member. In this case the user should be saved into a process variable and passed as a parameter into isUserMemberOfGroup(). The problem here is that the rule is reevaluated when a process variable changes and changing membership will not update process variable. So you need some additional pieces to have it reevaluated after membership changed.
Children