diff --git a/src/component/event/design/ActionExecuted.js b/src/component/event/design/ActionExecuted.js index e6aec8a..469d484 100644 --- a/src/component/event/design/ActionExecuted.js +++ b/src/component/event/design/ActionExecuted.js @@ -6,13 +6,13 @@ function ActionExecuted(props) { const type = "Action Executed" if (props.event.message.type === "SendMessage") { const message = props.event.message.event.messageInfo - const intendedMeansInfo = props.event.message.event.intentionInfo.intendedMeansInfo[0] - const description = "Action send message " + message.message + " to " + message.receiver + " was executed following the intention int-" + intendedMeansInfo.id + "-" + intendedMeansInfo.trigger - const explanation = [props.log.slice(0, props.log.indexOf(props.event)).findLast(e => e.message.type === "IntentionCreated" && e.message.event.intentionInfo.intendedMeansInfo[0].plan.body.includes(intendedMeansInfo.trigger))] + const intentionInfo = props.event.message.event.intentionInfo + const description = "Action send message " + message.message + " to " + message.receiver + " was executed following the intention int-" + intentionInfo.id + "-" + intentionInfo.trigger + const explanation = [props.log.slice(0, props.log.indexOf(props.event)).findLast(e => e.message.type === "IntentionCreated" && intentionInfo.id === props.event.message.event.intentionInfo.id )] - if (!intendedMeansInfo.trigger.includes("kqml")) { + if (!intentionInfo.trigger.includes("kqml")) { return ( - ) } diff --git a/src/component/event/design/NewIntention.js b/src/component/event/design/NewIntention.js index f24fea0..672cc91 100644 --- a/src/component/event/design/NewIntention.js +++ b/src/component/event/design/NewIntention.js @@ -12,7 +12,7 @@ function NewIntention(props) { if (!goal.includes("kqml")) { if (selectPlan) { - const description = "New intention " + id + " for goal " + goal + " using plan " + selectPlan.message.event.selectedPlan.label + const description = "New intention " + id + " created for goal " + goal + " using plan " + selectPlan.message.event.selectedPlan.label return (