TaskAppComponent
Required to implement a task component. Task components is invoked whenever a task is created, updated or removed from the dexi system and is made to sync the Dexi Task manager with an external task management system or auditing.
Source: Github
Example:
package my.org.components;
import io.dexi.service.AppContext;
import io.dexi.service.components.AppComponent;
import io.dexi.service.components.TaskAppComponent;
@AppComponent("send-task-to-my-app")
public class MyTaskAppComponent implements TaskAppComponent<MyAppConfig, MyComponentConfig> {
@Override
public Class<MyComponentConfig> getComponentConfigClass() {
return MyComponentConfig.class;
}
@Override
public void invoke(AppContext<MyAppConfig, MyComponentConfig> ctxt, TaskAppComponent.Task task) {
//Perform some action with task
}
}
components:
- name: send-task-to-my-app
type: task
title: Send task information to my app
specification:
endpoint: # Will invoke MyTaskAppComponent::invoke
url: "${baseUrl}/dexi/task/invoke"
method: POST
outputs:
rowIndex:
title: Row Index
type: number
rowValue:
title: Row Value
type: string
Updated over 4 years ago