Commitment c = (Commitment) e.getElementChanged();
if (c.getLifeCycleStatus() == LifeCycleState.CONDITIONAL) {
try {
if (c.getCreditor().equals(participant.getRoleId())
&& c.getDebtor().equals(
new RoleId(
CNPArtifactTimerMaxPart.INITIATOR_ROLE,
RoleId.GENERIC_ROLE))
&& c.getConsequent().equals(
new CompositeExpression(
LogicalOperatorType.OR,
new Fact("accept"), new Fact(
"reject")))) {
myAgent.addBehaviour(new CommitToDoneOrFailureIfAccept(participant, this));
}
} catch (MissingOperandException
| WrongOperandsNumberException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
else if (c.getLifeCycleStatus() == LifeCycleState.DETACHED) {
try {
if (c.getDebtor().equals(participant.getRoleId())
&& c.getCreditor().equals(
new RoleId(
CNPArtifactTimerMaxPart.INITIATOR_ROLE,
RoleId.GENERIC_ROLE))
&& c.getConsequent().equals(
new CompositeExpression(
LogicalOperatorType.OR,