Hallo,
I want to add a CustomConditions to the FormEngine. I tried it like this, but it doesn’t worked (while validating the rule, which uses the CustomCondition, the Engine couldn’t found it):
const customConditions: ((state: EngineState) => CustomConditionsMap) =
() =>
({
CustomConditionName: {
check(
data: IData,
relevantEntities: Set<IIdentifier> | undefined,
formallyIncorrectFields: Set<IIdentifier>,
errorField: IIdentifier
) {
// doSomething and return boolen
}
}
});
const config = ApplicationFactories.createApplicationSetup({
...,
additionalMiddlewares: [
...createEngineMiddlewares({ converter: customConverters(), customConditions: customConditions }),
...createBapFormEngineMiddlewares(),
...
],
...});
Has anyone experience with CustomConditions and have a hint for me or can help me to found out, what is wrong?
Best regards
Nora