I am trying to build tutorial C2. It is building but not working as expcted. Here is the code I got from source:
importjava.util.HashMap;importjava.util.Map;importjadex.bdiv3.annotation.Belief;importjadex.bdiv3.annotation.Plan;importjadex.bdiv3.annotation.Trigger;importjadex.bdiv3.runtime.ChangeEvent;importjadex.bridge.service.annotation.Service;importjadex.micro.annotation.Agent;importjadex.micro.annotation.AgentCreated;importjadex.micro.annotation.Description;importjadex.rules.eca.ChangeInfo;/***Dynamicbelief.*/@Description("The clock agent C2. <br> This translation agent uses a belief with update rate.")@Agent@ServicepublicclassTranslationBDI{/**Thecurrenttime.*/@BeliefprotectedMap<String,String>wordtable=newHashMap<String,String>();@Belief(dynamic=true)protectedbooleanalarm=wordtable.containsKey("bugger");//--------methods--------@AgentCreatedpublicvoidinit(){wordtable.put("coffee","Kaffee");wordtable.put("milk","Milch");wordtable.put("cow","Kuh");wordtable.put("cat","Katze");wordtable.put("dog","Hund");wordtable.put("bugger","Flegel");}/***Initiateanalarm.*/@Plan(trigger=@Trigger(factchangeds="alarm"))publicvoidcheckWordPairPlan(ChangeEvent<ChangeInfo<Boolean>>event){ChangeInfo<Boolean>change=event.getValue();//Printwarningwhenvaluechangesfromfalsetotrue.if(Boolean.FALSE.equals(change.getOldValue())&&Boolean.TRUE.equals(change.getValue())){System.out.println("Warning, a colloquial word pair has been added.");}}}
Any help please?
**Question: ** The tutorial didn't mentioned to annotate the class as @Service, but in the code it was annotated as @Service. Why do we need to annotate the class as @Service here?
Last edit: Mahmud Hasan 2016-07-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Mahmud,
the nightly builds are available on our download page: https://activecomponents.org/#/download (scroll down to nightly builds).
Sadly, there was no successful build since Lars fixed the error. You can see it by looking at the date next to the build.
There is currently no way of automatically getting a notification and I don't think it's generally needed.
I will try to fix the build now so you can use the bugfix.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to build tutorial C2. It is building but not working as expcted. Here is the code I got from source:
Any help please?
**Question: ** The tutorial didn't mentioned to annotate the class as @Service, but in the code it was annotated as @Service. Why do we need to annotate the class as @Service here?
Last edit: Mahmud Hasan 2016-07-06
Hi,
actually, this was a bug. I fixed it and the working version will be shipped with the next working nightly release. Sorry for the inconveniences.
Best
Lars
Last edit: Lars Braubach 2016-07-06
Thanks Lars,
How can I get the latest Nightly build?
Is there any way to get notified once it is released?
Regards,
Mahmud
Hi Mahmud,
the nightly builds are available on our download page: https://activecomponents.org/#/download (scroll down to nightly builds).
Sadly, there was no successful build since Lars fixed the error. You can see it by looking at the date next to the build.
There is currently no way of automatically getting a notification and I don't think it's generally needed.
I will try to fix the build now so you can use the bugfix.
Build 3.0.0-RC63 is now available. Please check if this fixes your problem.
Thanks Julian! I'll try it.
UPADATE: It is working now. Thanks again.
Last edit: Mahmud Hasan 2016-07-12