IFunctionLibrary?

If you think that something doesn't work in Aware IM post your message here
Post Reply
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

IFunctionLibrary?

Post by hpl123 »

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 9487 times
Capture2.PNG
Capture2.PNG (73.8 KiB) Viewed 9487 times
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: IFunctionLibrary?

Post by hpl123 »

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 all

package 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
Henrik (V8 Developer Ed. - Windows)
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: IFunctionLibrary?

Post by himanshu »

include "shared.jar" into lib. This should fix your issue.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: IFunctionLibrary?

Post by hpl123 »

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 all

package 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
Henrik (V8 Developer Ed. - Windows)
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: IFunctionLibrary?

Post by himanshu »

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
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: IFunctionLibrary?

Post by hpl123 »

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 all

package 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
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: IFunctionLibrary?

Post by hpl123 »

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).
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: IFunctionLibrary?

Post by hpl123 »

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.
Henrik (V8 Developer Ed. - Windows)
Post Reply