congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DeciderService.populateWorkflowAndTaskData
Code IndexAdd Tabnine to your IDE (free)

How to use
populateWorkflowAndTaskData
method
in
com.netflix.conductor.core.execution.DeciderService

Best Java code snippets using com.netflix.conductor.core.execution.DeciderService.populateWorkflowAndTaskData (Showing top 7 results out of 315)

origin: Netflix/conductor

/**
 * Updates the workflow output.
 *
 * @param workflow the workflow instance
 * @param task     if not null, the output of this task will be copied to workflow output if no output parameters are specified in the workflow defintion
 *                 if null, the output of the last task in the workflow will be copied to workflow output of no output parameters are specified in the workflow definition
 */
void updateWorkflowOutput(final Workflow workflow, @Nullable Task task) {
  List<Task> allTasks = workflow.getTasks();
  if (allTasks.isEmpty()) {
    return;
  }
  Task last = Optional.ofNullable(task).orElse(allTasks.get(allTasks.size() - 1));
  WorkflowDef workflowDef = workflow.getWorkflowDefinition();
  Map<String, Object> output;
  if (workflowDef.getOutputParameters() != null && !workflowDef.getOutputParameters().isEmpty()) {
    Workflow workflowInstance = populateWorkflowAndTaskData(workflow);
    output = parametersUtils.getTaskInput(workflowDef.getOutputParameters(), workflowInstance, null, null);
  } else if (StringUtils.isNotBlank(last.getExternalOutputPayloadStoragePath())) {
    output = externalPayloadStorageUtils.downloadPayload(last.getExternalOutputPayloadStoragePath());
    Monitors.recordExternalPayloadStorageUsage(last.getTaskDefName(), ExternalPayloadStorage.Operation.READ.toString(), ExternalPayloadStorage.PayloadType.TASK_OUTPUT.toString());
  } else {
    output = last.getOutputData();
  }
  workflow.setOutput(output);
  externalPayloadStorageUtils.verifyAndUpload(workflow, ExternalPayloadStorage.PayloadType.WORKFLOW_OUTPUT);
}
origin: Netflix/conductor

public List<Task> getTasksToBeScheduled(Workflow workflow,
                    WorkflowTask taskToSchedule, int retryCount, String retriedTaskId) {
  workflow = populateWorkflowAndTaskData(workflow);
  Map<String, Object> input = parametersUtils.getTaskInput(taskToSchedule.getInputParameters(),
      workflow, null, null);
origin: Netflix/conductor

workflow.setExternalInputPayloadStoragePath(workflowInputPath);
workflow.getTasks().add(task);
Workflow workflowInstance = deciderService.populateWorkflowAndTaskData(workflow);
assertNotNull(workflowInstance);
assertTrue(workflow.getInput().isEmpty());
origin: Netflix/conductor

Workflow workflowInstance = populateWorkflowAndTaskData(workflow);
Map<String, Object> taskInput = parametersUtils.getTaskInputV2(workflowTask.getInputParameters(), workflowInstance, rescheduled.getTaskId(), taskDefinition);
rescheduled.getInputData().putAll(taskInput);
origin: com.netflix.conductor/conductor-core

/**
 * Updates the workflow output.
 *
 * @param workflow the workflow instance
 * @param task     if not null, the output of this task will be copied to workflow output if no output parameters are specified in the workflow defintion
 *                 if null, the output of the last task in the workflow will be copied to workflow output of no output parameters are specified in the workflow definition
 */
void updateWorkflowOutput(final Workflow workflow, @Nullable Task task) {
  List<Task> allTasks = workflow.getTasks();
  if (allTasks.isEmpty()) {
    return;
  }
  Task last = Optional.ofNullable(task).orElse(allTasks.get(allTasks.size() - 1));
  WorkflowDef workflowDef = workflow.getWorkflowDefinition();
  Map<String, Object> output;
  if (workflowDef.getOutputParameters() != null && !workflowDef.getOutputParameters().isEmpty()) {
    Workflow workflowInstance = populateWorkflowAndTaskData(workflow);
    output = parametersUtils.getTaskInput(workflowDef.getOutputParameters(), workflowInstance, null, null);
  } else if (StringUtils.isNotBlank(last.getExternalOutputPayloadStoragePath())) {
    output = externalPayloadStorageUtils.downloadPayload(last.getExternalOutputPayloadStoragePath());
    Monitors.recordExternalPayloadStorageUsage(last.getTaskDefName(), ExternalPayloadStorage.Operation.READ.toString(), ExternalPayloadStorage.PayloadType.TASK_OUTPUT.toString());
  } else {
    output = last.getOutputData();
  }
  workflow.setOutput(output);
  externalPayloadStorageUtils.verifyAndUpload(workflow, ExternalPayloadStorage.PayloadType.WORKFLOW_OUTPUT);
}
origin: com.netflix.conductor/conductor-core

public List<Task> getTasksToBeScheduled(Workflow workflow,
                    WorkflowTask taskToSchedule, int retryCount, String retriedTaskId) {
  workflow = populateWorkflowAndTaskData(workflow);
  Map<String, Object> input = parametersUtils.getTaskInput(taskToSchedule.getInputParameters(),
      workflow, null, null);
origin: com.netflix.conductor/conductor-core

Workflow workflowInstance = populateWorkflowAndTaskData(workflow);
Map<String, Object> taskInput = parametersUtils.getTaskInputV2(workflowTask.getInputParameters(), workflowInstance, rescheduled.getTaskId(), taskDefinition);
rescheduled.getInputData().putAll(taskInput);
com.netflix.conductor.core.executionDeciderServicepopulateWorkflowAndTaskData

Javadoc

Populates the workflow input data and the tasks input/output data if stored in external payload storage. This method creates a deep copy of the workflow instance where the payloads will be stored after downloading from external payload storage.

Popular methods of DeciderService

  • decide
  • getTasksToBeScheduled
  • isResponseTimedOut
  • retry
  • updateWorkflowOutput
    Updates the workflow output.
  • <init>
  • checkForTimeout
  • checkForWorkflowCompletion
  • getNextTask
  • getNextTasksToBeScheduled
  • isTaskSkipped
  • startWorkflow
  • isTaskSkipped,
  • startWorkflow,
  • timeoutTask

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now