com.fivefaces.structureclient.controller.ScheduleController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-structure-client Show documentation
Show all versions of common-structure-client Show documentation
structure Client for Five Faces
The newest version!
package com.fivefaces.structureclient.controller;
import com.fivefaces.cloud.workflow.WorkflowRepo;
import com.fivefaces.cloud.workflow.WorkflowService;
import com.fivefaces.cloud.workflow.awsonprem.model.WorkflowStructure;
import com.fivefaces.structure.query.builder.StructureQuery;
import com.fivefaces.structure.service.StructureService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
@Component
@RequiredArgsConstructor
@Slf4j
public class ScheduleController {
private final StructureService structureService;
private final WorkflowService workflowService;
private final WorkflowRepo workflowRepo;
@Scheduled(fixedDelay = 30000)
public void scheduleFixedDelayTask() {
// todo this requires the time to execute to be added once we implement the thing
StructureQuery json = StructureQuery.fromJson("""
{
"type" : "delayedWorkflow",
"criteria" : []
}""").build();
final List