本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.setOutputData()
方法的一些代码示例,展示了Task.setOutputData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setOutputData()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:setOutputData
暂无
代码示例来源:origin: Netflix/conductor
@VisibleForTesting
void failTask(Task task, PayloadType payloadType, String errorMsg) {
logger.error(errorMsg);
task.setReasonForIncompletion(errorMsg);
task.setStatus(Task.Status.FAILED_WITH_TERMINAL_ERROR);
if (payloadType == PayloadType.TASK_INPUT) {
task.setInputData(null);
} else {
task.setOutputData(null);
}
throw new TerminateWorkflowException(errorMsg, Workflow.WorkflowStatus.FAILED, task);
}
代码示例来源:origin: Netflix/conductor
task.setOutputData(replaced);
task.setOutputMessage(taskDetails.getOutputMessage());
task.getOutputData().put("conductor.event.messageId", messageId);
代码示例来源:origin: Netflix/conductor
.forEach(task -> {
if (StringUtils.isNotBlank(task.getExternalOutputPayloadStoragePath())) {
task.setOutputData(externalPayloadStorageUtils.downloadPayload(task.getExternalOutputPayloadStoragePath()));
Monitors.recordExternalPayloadStorageUsage(task.getTaskDefName(), ExternalPayloadStorage.Operation.READ.toString(), ExternalPayloadStorage.PayloadType.TASK_OUTPUT.toString());
task.setExternalOutputPayloadStoragePath(null);
代码示例来源:origin: Netflix/conductor
if (skipTaskRequest != null) {
theTask.setInputData(skipTaskRequest.getTaskInput());
theTask.setOutputData(skipTaskRequest.getTaskOutput());
theTask.setInputMessage(skipTaskRequest.getTaskInputMessage());
theTask.setOutputMessage(skipTaskRequest.getTaskOutputMessage());
代码示例来源:origin: Netflix/conductor
@SuppressWarnings("unchecked")
@Test
public void testUpdateWorkflowOutput() {
Workflow workflow = new Workflow();
workflow.setWorkflowDefinition(new WorkflowDef());
deciderService.updateWorkflowOutput(workflow, null);
assertNotNull(workflow.getOutput());
assertTrue(workflow.getOutput().isEmpty());
Task task = new Task();
Map<String, Object> taskOutput = new HashMap<>();
taskOutput.put("taskKey", "taskValue");
task.setOutputData(taskOutput);
workflow.getTasks().add(task);
WorkflowDef workflowDef = new WorkflowDef();
when(metadataDAO.get(anyString(), anyInt())).thenReturn(Optional.of(workflowDef));
deciderService.updateWorkflowOutput(workflow, null);
assertNotNull(workflow.getOutput());
assertEquals("taskValue", workflow.getOutput().get("taskKey"));
}
代码示例来源:origin: Netflix/conductor
@Test
public void testFailTaskWithOutputPayload() {
Task task = new Task();
task.setOutputData(new HashMap<>());
expectedException.expect(TerminateWorkflowException.class);
externalPayloadStorageUtils.failTask(task, ExternalPayloadStorage.PayloadType.TASK_OUTPUT, "error");
assertNotNull(task);
assertNull(task.getOutputData());
}
}
代码示例来源:origin: Netflix/conductor
Map<String, Object> output = new HashMap<String, Object>();
output.put("ok1", "ov1");
t2.setOutputData(output);
t2.setStatus(COMPLETED);
workflowExecutionService.updateTask(t2);
t3.setOutputData(output);
t3.setStatus(COMPLETED);
workflowExecutionService.updateTask(t3);
代码示例来源:origin: Netflix/conductor
Map<String, Object> output = new HashMap<>();
output.put("ok1", "ov1");
task2.setOutputData(output);
task2.setStatus(FAILED);
workflowExecutionService.updateTask(task2);
assertTrue(task2.getInputData().containsKey("k1"));
assertEquals("v1", task2.getInputData().get("k1"));
task2.setOutputData(output);
task2.setStatus(COMPLETED);
workflowExecutionService.updateTask(task2);
output = new HashMap<>();
output.put("ok1", "ov1");
task3.setOutputData(output);
task3.setStatus(COMPLETED);
workflowExecutionService.updateTask(task3);
代码示例来源:origin: Netflix/conductor
break;
case TASK_OUTPUT:
((Task) entity).setOutputData(null);
((Task) entity).setExternalOutputPayloadStoragePath(uploadHelper(payloadBytes, payloadSize, PayloadType.TASK_OUTPUT));
Monitors.recordExternalPayloadStorageUsage(((Task) entity).getTaskDefName(), ExternalPayloadStorage.Operation.WRITE.toString(), PayloadType.TASK_OUTPUT.toString());
代码示例来源:origin: Netflix/conductor
outputDataMap.put( pair.getKey(), fromProto( pair.getValue() ) );
to.setOutputData(outputDataMap);
if (from.hasWorkflowTask()) {
to.setWorkflowTask( fromProto( from.getWorkflowTask() ) );
代码示例来源:origin: Netflix/conductor
task.setStatus(COMPLETED);
task.setOutputData(taskResult.getOutputData());
task.setOutputMessage(taskResult.getOutputMessage());
task.setExternalOutputPayloadStoragePath(taskResult.getExternalOutputPayloadStoragePath());
task.setOutputData(taskResult.getOutputData());
task.setOutputMessage(taskResult.getOutputMessage());
task.setExternalOutputPayloadStoragePath(taskResult.getExternalOutputPayloadStoragePath());
代码示例来源:origin: Netflix/conductor
task.setOutputData(null);
task.setExternalOutputPayloadStoragePath(taskOutputPath);
task.setStatus(COMPLETED);
代码示例来源:origin: Netflix/conductor
public Task copy() {
Task copy = new Task();
copy.setCallbackAfterSeconds(callbackAfterSeconds);
copy.setCallbackFromWorker(callbackFromWorker);
copy.setCorrelationId(correlationId);
copy.setInputData(inputData);
copy.setOutputData(outputData);
copy.setReferenceTaskName(referenceTaskName);
copy.setStartDelayInSeconds(startDelayInSeconds);
copy.setTaskDefName(taskDefName);
copy.setTaskType(taskType);
copy.setWorkflowInstanceId(workflowInstanceId);
copy.setWorkflowType(workflowType);
copy.setResponseTimeoutSeconds(responseTimeoutSeconds);
copy.setStatus(status);
copy.setRetryCount(retryCount);
copy.setPollCount(pollCount);
copy.setTaskId(taskId);
copy.setWorkflowTask(workflowTask);
copy.setDomain(domain);
copy.setInputMessage(inputMessage);
copy.setOutputMessage(outputMessage);
copy.setRateLimitPerFrequency(rateLimitPerFrequency);
copy.setRateLimitFrequencyInSeconds(rateLimitFrequencyInSeconds);
copy.setExternalInputPayloadStoragePath(externalInputPayloadStoragePath);
copy.setExternalOutputPayloadStoragePath(externalOutputPayloadStoragePath);
return copy;
}
代码示例来源:origin: Netflix/conductor
task.setOutputData(null);
task.setExternalOutputPayloadStoragePath(taskOutputPath);
task.setStatus(COMPLETED);
代码示例来源:origin: com.netflix.conductor/conductor-core
@VisibleForTesting
void failTask(Task task, PayloadType payloadType, String errorMsg) {
logger.error(errorMsg);
task.setReasonForIncompletion(errorMsg);
task.setStatus(Task.Status.FAILED_WITH_TERMINAL_ERROR);
if (payloadType == PayloadType.TASK_INPUT) {
task.setInputData(null);
} else {
task.setOutputData(null);
}
throw new TerminateWorkflowException(errorMsg, Workflow.WorkflowStatus.FAILED, task);
}
代码示例来源:origin: com.netflix.conductor/conductor-core
task.setOutputData(replaced);
task.setOutputMessage(taskDetails.getOutputMessage());
task.getOutputData().put("conductor.event.messageId", messageId);
代码示例来源:origin: com.netflix.conductor/conductor-core
.forEach(task -> {
if (StringUtils.isNotBlank(task.getExternalOutputPayloadStoragePath())) {
task.setOutputData(externalPayloadStorageUtils.downloadPayload(task.getExternalOutputPayloadStoragePath()));
Monitors.recordExternalPayloadStorageUsage(task.getTaskDefName(), ExternalPayloadStorage.Operation.READ.toString(), ExternalPayloadStorage.PayloadType.TASK_OUTPUT.toString());
task.setExternalOutputPayloadStoragePath(null);
代码示例来源:origin: com.netflix.conductor/conductor-core
if (skipTaskRequest != null) {
theTask.setInputData(skipTaskRequest.getTaskInput());
theTask.setOutputData(skipTaskRequest.getTaskOutput());
theTask.setInputMessage(skipTaskRequest.getTaskInputMessage());
theTask.setOutputMessage(skipTaskRequest.getTaskOutputMessage());
代码示例来源:origin: com.netflix.conductor/conductor-grpc
outputDataMap.put( pair.getKey(), fromProto( pair.getValue() ) );
to.setOutputData(outputDataMap);
if (from.hasWorkflowTask()) {
to.setWorkflowTask( fromProto( from.getWorkflowTask() ) );
代码示例来源:origin: com.netflix.conductor/conductor-common
public Task copy() {
Task copy = new Task();
copy.setCallbackAfterSeconds(callbackAfterSeconds);
copy.setCallbackFromWorker(callbackFromWorker);
copy.setCorrelationId(correlationId);
copy.setInputData(inputData);
copy.setOutputData(outputData);
copy.setReferenceTaskName(referenceTaskName);
copy.setStartDelayInSeconds(startDelayInSeconds);
copy.setTaskDefName(taskDefName);
copy.setTaskType(taskType);
copy.setWorkflowInstanceId(workflowInstanceId);
copy.setWorkflowType(workflowType);
copy.setResponseTimeoutSeconds(responseTimeoutSeconds);
copy.setStatus(status);
copy.setRetryCount(retryCount);
copy.setPollCount(pollCount);
copy.setTaskId(taskId);
copy.setWorkflowTask(workflowTask);
copy.setDomain(domain);
copy.setInputMessage(inputMessage);
copy.setOutputMessage(outputMessage);
copy.setRateLimitPerFrequency(rateLimitPerFrequency);
copy.setRateLimitFrequencyInSeconds(rateLimitFrequencyInSeconds);
copy.setExternalInputPayloadStoragePath(externalInputPayloadStoragePath);
copy.setExternalOutputPayloadStoragePath(externalOutputPayloadStoragePath);
return copy;
}
内容来源于网络,如有侵权,请联系作者删除!