Custom Conditional Expression

Hi,
Is there a way where I can use Java beans to evaluate the conditional expression that take the flow from one service task to another.

For eg : If I have a process A that is connected to B via a sequence flow with conditions, I want to evaluate these conditions using Java for more complex conditions