---
title: "jadex version changes for api"
author: "turingfellow"
date: "2010-06-21T22:09:10Z"
tags: []
categories: ["编程语言"]
slug: "jadex-version-changes-for-api"
draft: false
lastmod: "2010-06-21T22:09:10Z"
id: 695989
url: "https://turingfellow.iteye.com/blog/695989"
---

How can i retrieve event information from body of some plan (getInitialEvent() in jadex 0.96 version) in jadex 2.0 ?

The method getInitialEvent() has been replaced by the getReason() method. This has been done, because you can now also get information about other triggering reasons for executing a plan, such as belief changes. The method returns an IElement object, which can be casted to the object that you expect. E.g. for a plan triggered by a message event, you should do:

IMessageEvent messageevent = (IMessageEvent)getReason();

---选自faq