IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Command

Action Abstract class

The action abstract class provides a default way to implement command interface. It has two parameters:

See the following code for example:

public class Journal extends Action<Map<String, Object>,String, Exception>{
  public String execute(Map<String, Object>context) throws Exception{
   Integer counter = (Integer) context.get("counter");
   counter = counter + 1;
   context.put("counter", counter);
   return "ok";
	}
}

It is totally stateless so please follow the stateless model such as do not call any APIs outside execute() etc, it’ll cause unpredictable result.



Feedback