Function: Execute a Workflow

by Simon Sparks · 5 September 2025

To use this function add it to the class library file named OrchestratorService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorService.ts

Description: Orchestrator Function to execute a workflow

Function: WorkflowExecute

public WorkflowExecute(strWorkflowID: string, objProperties: Properties, strUsername: string, strPassword: string): WorkflowToken {
    
    let objWorkflow: Workflow = Server.getWorkflowWithId(strWorkflowID);

    let objWorkflowToken: WorkflowToken = null;

    try {
        objWorkflowToken = objWorkflow.execute(objProperties, strUsername, strPassword);
    }
    catch (objException) {
        this.objLogger.info(objException);
    }

    return objWorkflowToken;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like