contract CreditAgency {
dates {
beginDate = 2022-01-01 08:00:00
dueDate = 2022-12-31 18:00:00
}
parties {
application = "creditAgency"
process = "integrationProcess"
}
terms {
right requestScore {
//Setting the limit operation by day and the number of user by request
rolePlayer = process
operation = poll
condition {
OperationLimit(1000 by Second) AND
MessageContent("count(//CPF)" == 1)
}
onBreach (EventLog("Request limit by day exceeded or inconsistent message content"))
}
prohibition requestScoreP {
//"Setting the times that when it is prohibited to send a request"
rolePlayer = process
operation = request
condition {
TimeInterval("18:30:00" to "7:30:00" )
}
onBreach(EventLog("Request made outside of allowed hours"))
}
obligation responseWithScore {
//Setting the time limit for responding to a resquest
rolePlayer = application
operation = response
condition{
Timeout("60")
}
onBreach(EventLog("Timeout for replying has been exceeded"))
}
}
}