Search in sources :

Example 1 with WorkflowTask

use of com.tremolosecurity.provisioning.core.WorkflowTask in project OpenUnison by TremoloSecurity.

the class CallWorkflow method doTask.

@Override
public boolean doTask(User user, Map<String, Object> request) throws ProvisioningException {
    Workflow toCall = super.getConfigManager().getProvisioningEngine().getWorkflowCopy(this.workflowName);
    if (toCall == null) {
        throw new ProvisioningException("workflow '" + this.workflowName + "' does not exist");
    }
    ArrayList<WorkflowTask> tasksFromWf = toCall.getTasks();
    for (WorkflowTask task : tasksFromWf) {
        task.reInit(getConfigManager(), getWorkflow());
    }
    super.setOnSuccess(tasksFromWf);
    super.markComplete(true);
    // this.getOnSuccess().addAll(toCall.getTasks());
    boolean doContinue = super.runSubTasks(super.getOnSuccess(), user, request);
    return doContinue;
}
Also used : ProvisioningException(com.tremolosecurity.provisioning.core.ProvisioningException) Workflow(com.tremolosecurity.provisioning.core.Workflow) WorkflowTask(com.tremolosecurity.provisioning.core.WorkflowTask)

Aggregations

ProvisioningException (com.tremolosecurity.provisioning.core.ProvisioningException)1 Workflow (com.tremolosecurity.provisioning.core.Workflow)1 WorkflowTask (com.tremolosecurity.provisioning.core.WorkflowTask)1