Search in sources :

Example 1 with RemoveLinkInstance

use of io.lumeer.engine.api.event.RemoveLinkInstance in project engine by Lumeer.

the class TaskProcessingFacade method onRemoveLink.

public void onRemoveLink(@Observes final RemoveLinkInstance removeLinkInstanceEvent) {
    LinkType linkType = getLinkTypeForEvent(removeLinkInstanceEvent);
    if (linkType == null) {
        return;
    }
    FunctionTask functionTask = functionFacade.createTaskForRemovedLinks(linkType, Collections.singletonList(new LinkInstance(removeLinkInstanceEvent.getLinkInstance())));
    List<RuleTask> tasks = createLinkInstanceRemoveRuleTasks(linkType, removeLinkInstanceEvent.getLinkInstance());
    RuleTask ruleTask = createOrderedRuleTask(tasks);
    processTasks(functionTask, ruleTask);
}
Also used : FunctionTask(io.lumeer.core.task.FunctionTask) RuleTask(io.lumeer.core.task.RuleTask) CreateLinkInstance(io.lumeer.engine.api.event.CreateLinkInstance) LinkInstance(io.lumeer.api.model.LinkInstance) RemoveLinkInstance(io.lumeer.engine.api.event.RemoveLinkInstance) UpdateLinkInstance(io.lumeer.engine.api.event.UpdateLinkInstance) RemoveLinkType(io.lumeer.engine.api.event.RemoveLinkType) LinkType(io.lumeer.api.model.LinkType) UpdateLinkType(io.lumeer.engine.api.event.UpdateLinkType)

Aggregations

LinkInstance (io.lumeer.api.model.LinkInstance)1 LinkType (io.lumeer.api.model.LinkType)1 FunctionTask (io.lumeer.core.task.FunctionTask)1 RuleTask (io.lumeer.core.task.RuleTask)1 CreateLinkInstance (io.lumeer.engine.api.event.CreateLinkInstance)1 RemoveLinkInstance (io.lumeer.engine.api.event.RemoveLinkInstance)1 RemoveLinkType (io.lumeer.engine.api.event.RemoveLinkType)1 UpdateLinkInstance (io.lumeer.engine.api.event.UpdateLinkInstance)1 UpdateLinkType (io.lumeer.engine.api.event.UpdateLinkType)1