Search in sources :

Example 1 with ConfluenceTaskCommon

use of com.walmartlabs.concord.plugins.confluence.ConfluenceTaskCommon in project concord-plugins by walmartlabs.

the class ConfluenceTaskV2 method execute.

@Override
public TaskResult execute(Variables input) {
    Result result = new ConfluenceTaskCommon(context.workingDirectory(), context.variables().toMap()).execute(TaskParams.of(input, context.defaultVariables().toMap()));
    TaskResult.SimpleResult taskResult = TaskResult.of(result.ok, result.error);
    if (result.pageId != null) {
        taskResult.value("pageId", result.pageId);
    }
    if (result.childId != null) {
        taskResult.value("childId", result.childId);
    }
    if (result.data != null) {
        taskResult.value("data", result.data);
    }
    return taskResult;
}
Also used : TaskResult(com.walmartlabs.concord.runtime.v2.sdk.TaskResult) ConfluenceTaskCommon(com.walmartlabs.concord.plugins.confluence.ConfluenceTaskCommon) TaskResult(com.walmartlabs.concord.runtime.v2.sdk.TaskResult) Result(com.walmartlabs.concord.plugins.confluence.Result)

Aggregations

ConfluenceTaskCommon (com.walmartlabs.concord.plugins.confluence.ConfluenceTaskCommon)1 Result (com.walmartlabs.concord.plugins.confluence.Result)1 TaskResult (com.walmartlabs.concord.runtime.v2.sdk.TaskResult)1