If you think that something doesn't work in Aware IM post your message here
#53594 by hpl123
Sun Mar 29, 2020 12:31 am
Hi all/support,
I am following the 3 part Java plugin tutorial video step by step and during the step with create a class and add interface "IFunctionLibrary", it cannot be found? I have done exactly what you did in the tutorial and I can see other AwareIM "components" in the add interface window but not "IFunctionLibrary". Has something changed in this area? Thanks

I am on Aware 8.2 (build 2565) and Eclipse IDE for Java Developers Version: 2020-03 (4.15.0).

Screenshots:
Capture.PNG
Capture.PNG (72.81 KiB) Viewed 1390 times

Capture2.PNG
Capture2.PNG (73.8 KiB) Viewed 1390 times
#53595 by hpl123
Sun Mar 29, 2020 9:45 am
I also try to follow part 3 of the tutorial i.e implement a custom process and then I do find the IProcess interface but the entire code skeleton is not written into Eclipse:
Code: Select allpackage com.fokalpoint.awareim.plugins;

import com.bas.basserver.executionengine.IProcess;

public class MyProcess implements IProcess {

   @Override
   public boolean cancel() {
      // TODO Auto-generated method stub
      return false;
   }

}


and I get the following errors:
-The type MyProcess must implement the inherited abstract method IProcess.execute(IExecutionEngine, Object[]) MyProcess.java /AwareImPlugins/src/com/fokalpoint/awareim/plugins line 5 Java Problem
-The type MyProcess must implement the inherited abstract method IProcess.resume(IExecutionEngine, Object) MyProcess.java /AwareImPlugins/src/com/fokalpoint/awareim/plugins line 5 Java Problem
-The serializable class MyProcess does not declare a static final serialVersionUID field of type long MyProcess.java /AwareImPlugins/src/com/fokalpoint/awareim/plugins line 5 Java Problem
#53596 by himanshu
Sun Mar 29, 2020 11:05 am
include "shared.jar" into lib. This should fix your issue.
#53598 by hpl123
Sun Mar 29, 2020 11:37 am
Thanks Himanshu, that solved the IFunctionLibrary problem so that now works but the IProcess does not. When I add the IProcess interface, I get the following code in the class:
Code: Select allpackage com.fokalpoint.awareim.plugins;

import com.bas.basserver.executionengine.IProcess;

public class MyProcess implements IProcess {

   @Override
   public boolean cancel() {
      // TODO Auto-generated method stub
      return false;
   }

}


and the following errors:
- The type MyProcess must implement the inherited abstract method IProcess.execute(IExecutionEngine, Object[]) MyProcess.java /AwareImPlugins/src/com/fokalpoint/awareim/plugins line 5 Java Problem

- The type MyProcess must implement the inherited abstract method IProcess.resume(IExecutionEngine, Object) MyProcess.java /AwareImPlugins/src/com/fokalpoint/awareim/plugins line 5 Java Problem
#53601 by himanshu
Sun Mar 29, 2020 12:32 pm
You need to implement all the abstract methods of IProcess.

Whatever IDE you are using for the development there must be some action which will automatically fix your issue.

I am currently not handy with sample code... if needed then let me know
#53602 by hpl123
Sun Mar 29, 2020 12:37 pm
Thanks again Himanshu and I followed the exact instructions Vlad went through in the video tutorial using the same program i.e Eclipse so would think it should work.

I think I solved it my also adding interface connection.jar. When I did that I did get the entire "skeleton" as shown in the video tutorial. Support (or Himanshu if you know?), can you please confirm this is right/new (when compared to what you did in the tutorial)?

This is the code I got (no errors) after adding the connection.jar (I now have awareim.jar, openadaptor.jar, shared,jar and connection.jar as referenced libraries) and when adding a class using interface IProcess:
Code: Select allpackage com.fokalpoint.awareim.plugins;

import com.bas.basserver.executionengine.ExecutionException;
import com.bas.basserver.executionengine.IExecutionEngine;
import com.bas.basserver.executionengine.IProcess;
import com.bas.basserver.executionengine.SuspendProcessException;
import com.bas.connectionserver.server.AccessDeniedException;

public class ProcessSkeleton implements IProcess {

   @Override
   public boolean cancel() {
      // TODO Auto-generated method stub
      return false;
   }

   @Override
   public Object execute(IExecutionEngine arg0, Object[] arg1)
         throws SuspendProcessException, ExecutionException, AccessDeniedException {
      // TODO Auto-generated method stub
      return null;
   }

   @Override
   public Object resume(IExecutionEngine arg0, Object arg1)
         throws SuspendProcessException, ExecutionException, AccessDeniedException {
      // TODO Auto-generated method stub
      return null;
   }

}



Thanks
#53611 by hpl123
Mon Mar 30, 2020 11:21 am
I replicated the plugin from the Java tutorial and worked so I guess the above setup does work. Better documentation of how exactly to set this up in Eclipse or other IDE´s would be nice (and also updating the video so it reflects the process above).
#53634 by hpl123
Tue Mar 31, 2020 11:25 pm
I see now I missed a part of the programmers reference that describes the process above with the "missing" jars so was my miss/bad.

Who is online

Users browsing this forum: No registered users and 4 guests