I have the following boost::statechart state:
struct PendingWFInfo : bsc::state<PendingWFInfo, PseudoIdle> {
bool success;
PendingWFInfo(my_context ctx) : my_base(ctx) {
std::cout << "[+] PendingWFInfo" << std::endl;
success = context<RH_StateMachine>().startReplenishment();
if (success) {
std::cout
<< ".....................Start replenishment successfully called\n";
} else {
std::cout << ".....................Failed to call Start replenishment "
"service\n";
}
}
~PendingWFInfo() { std::cout << "[-] leaving PendingWFInfo state... \n"; }
typedef boost::mpl::list<bsc::custom_reaction<InboundInfoReceived>,
bsc::transition<Error, CommunicationError>
> reactions;
bsc::result react(const InboundInfoReceived &event) {
if (context<RH_StateMachine>().getWireframeCapacity() > 0) {
transit<UserConfirmationPending>();
}
else{
transit<InboundImpossible>();
}
}
};
When i am in the current state and a InboundInfoReceived event is emitted, i get the following error /usr/include/boost/statechart/result.hpp:58: boost::statechart::detail::safe_reaction_result::~safe_reaction_result(): Assertion `reactionResult_ == consumed' failed.
The if statement is true but the transition gives me an assertion error.