Runtime components : Core components : Operations : Tasks : Using operations
  
Using operations
To use an operation on the client side, do the following:
1 Instantiate the operation using a method call such as the following:
ClientOperation op;
op =(ClientOperation)BTTClientOperation.readObject("myOperation");
2 Invoke the operation's execute method:
op.execute();
Usually, in the execute() method of your operations you work with data in the context and access services and operation steps as shown in the following example:
public void execute() throws Exception {
  setValueAt("OperationTime", new java.util.Date());
  new PreJournalStep(this).execute();
  new SendHostStep(this).execute();
  new PostJournalStep(this).execute();
}
3 Once the operation has finished executing, close it to free the operation resources:
op.close();
On the server side, the Java Connector starts the server operations, invokes the execute method, and closes the operation once it has finished executing. You can override this behavior by implementing your own methods in your own operations.
On the server side, one of the connectors available in the toolkit starts the server operation when it receives a request from the client. The connector invokes the operation's execute method and ends the operation once it has finished executing by invoking the operation's close method. You can override this behavior by implementing your own methods in your own operations. See How operations work for more information on the operation process.
Go up to
Tasks