Commitment c = (Commitment) e.getElementChanged();
if (c.getLifeCycleStatus() == LifeCycleState.DETACHED) {
try {
if (c.getDebtor().equals(initiator.getRoleId())
&& c.getCreditor().equals(
new RoleId(
CNPArtifactTimerMaxPart.PARTICIPANT_ROLE,
RoleId.GROUP_ROLE))
&& c.getConsequent().equals(
new CompositeExpression(
LogicalOperatorType.OR,
new Fact("accept"), new Fact(
"reject")))) {
myAgent.addBehaviour(new SatisfyCommitToAcceptOrReject(
initiator));
logger.debug("SatisfyCommitToAcceptOrReject: "+(++satisfyCommitToAcceptOrReject));
}
} catch (MissingOperandException
| WrongOperandsNumberException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if (c.getLifeCycleStatus() == LifeCycleState.DISCHARGED) {
try {
if (c.getCreditor().equals(initiator.getRoleId())
&& c.getDebtor().equals(
new RoleId(
CNPArtifactTimerMaxPart.PARTICIPANT_ROLE,
RoleId.GENERIC_ROLE))
&& c.getConsequent().equals(
new CompositeExpression(
LogicalOperatorType.OR,