2022

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Now we will discuss the steps for creating a new "Hello World" AppCode. In this example we want to demonstrate how to create one AppCode implementation from scratch. This AppCode class which we are talking about, we will be able to demonstrate the operations which we need to implement as a part of the AppCode implementation.

The HelloWorld implementation class will take the input data as a list of HelloParameter objects and will print it out by prefixing "Hello" to it. The Read operation on it will return an array of pre-defined HelloParameters with their data 

1. Open your TestAppCode project which you downloaded as a part of the QuickStart section

2. Define your new HelloWorld AppCode implementation class in the source folder and ensure you are selecting the interface as AppCode while defining the class Image Added
You would see a new class created with the default method signatures 

Image Added

Coming to the 3 methods showing up, the following would be the basic functionality 

1. Open

This method should open the connection with the 3rd party system and should initiate the session as mentioned earlier. In our case since it is a Hello World and there is no 3rd party system which we are integrating with actually. We will just initialize the session key and print it out to the console and to the log. 

Code Block

 @Override
public void open() throws RemoteException {
	// TODO Auto-generated method stub
	sessionKey = UUID.randomUUID().toString();
	logger.log(Level.INFO, "Hello World AppCode Session opened:" + sessionKey);

System.out.println("Hello World AppCode Session opened:" + sessionKey);

	}