In your application, you can create implementations of the following custom objects:
Every custom object has its implementation either in the Expression Language or in Java and its definition in a definition file: for example, a custom form component must be implemented as a Java class that extends the UIComponent
interface or as an expression that returns a custom component in the Expression Language; and its custom component definition must be in a definition file so you can use it for modeling.
When implementing your custom objects in Java, you can implement them as POJOs or as EJBs: it is recommended to implement them as POJOs unless the object needs to use a server service. In such a case, the EJB must be then registered with the Execution Engine using the ComponentServiceBean
.
Once you have created your EJB implementation of a custom object, you need to register it with the Execution Engine:
registerCustomComponents()
method:@Override protected void registerCustomComponents() { //register(<task_instance>, <task_interface>.class); register(sendGoodsTask, SendGoodsTask.class); //register(<function_instance>, <function_interface_class>.class); register(shippingFeeFunctions, ShippingFeeFunctions.class); }
@Override protected void registerCustomComponents() { register(<task_instance>, <task_implementation>.class); register(<function_instance>, <function_implementation>.class); }