I seem to not understand how to get the .find() or .and() methods to work when calling .findByType() method.
I get nothing returned if I attempt either:
var targets = Global.finder(scope).findByType(Metamodel.safetyModel.FailureMode,true).find("failureType", "TRANSIENT")
var targets2 = Global.finder(scope).findByType(Metamodel.safetyModel.FailureMode,true).and("failureType", "TRANSIENT")
I have to resort to an additional forEach function to find which failure modes are transient.
var targets = Global.finder(scope).findByType(Metamodel.safetyModel.FailureMode,true)
targets.forEach((elem) => {
if (elem.failureType == "TRANSIENT") {
// do something...
}
})
Why is that?