This task can be viewed as 3 different subtasks. You need to define how the conditions are to be specified. You need some representation of the conditions. And you need to integrate it into the program.
How to specify conditions
Unless you users are able to program, it looks like you need a DSL (domain specific language). If developers write, or help domain experts write, the conditions and actions, here on referred to as 'rules' then you can probably do with a textual one. One option, if you use scripting languages, is to actually make the rules in that language with some syntactic sugar. But since you use Java, you will need to compile it.
The language could for instance look something like this:
IF card = normal AND years < 20 THEN set credit = 500
The above snippet has a lot of context. If you can avoid being ambigous, then that can make the language alot simpler. For instance, whose 'years' are we talking about before? Well if the rules are being evaluated in the context of a card, then it is card owner. But if it is not clear the language may have to be more complicated, eg. 'years(owner(card))', and you might begin to scare normal users with the parantheses.
If it is not developers that writing the conditions, then you should strongly consider a graphical tool around your language. The graphical tool can constrain the options, to avoid spelling mistakes for instance, and guide users to available options.
Semantic model
Have some formal model of language. This could be an abstract syntax tree for expressions. And the root is a node with two children, a condition node, and an action node. Then to evaluate the rules for some context, you find the all the rules defined by the user, evaluate it using the abstract syntax tree, and it the condition is true, then run the action. You might also interprete the rules to handle conflicts. For example what happens if there is another rules that says 'if the card is normal and age of user less than 15 then set credit to 300'? Now both rules applies, but if that is not desirable you can inform the user. Beware, however if you language is too powerful, this can be undecidable, meaning you can't detect all such conflicts.
The above snippet might result in an abstract syntax tree like the following:
________________RULE____
/ \
AND ACTIONS
______/ \______ |
/ \ _SET_
_ = _ _ < _ / \
/ \ / \ credit 500
card normal age 20
Interpreter
You need to implement an interpreter or your semantic model. This will 'run' the model against the data you have. For example, use the current data in the system, to check the conditions described by the semantic model, then run the appropriate actions that updates the data.
For instance the pseudocode to process the setNode might look something like this:
onVisitSet(SetNode setNode, CardContext context) {
if (setNode.assignType == CARD) {
Account account = context.getAccountForCard();
account.setBalance(500);
} else if (...)
//....
}
Remember, though real banks don't just 'set' a balance.