Orchestrator Workflow: Basic

by Simon Sparks · January 5, 2026

This is a sample of how to create a basic workflow orchestrator workflow using the Build Tools.

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

Filename: Samples / WorflowGeneralSampleBasic.wf.ts

import { Logger } from "com.vmware.pscoe.library.ts.logging/Logger";
import { DefaultErrorHandler, In, Item, Out, RootItem, Workflow } from "vrotsc-annotations";

@Workflow({
    name: "Sample - Basic",
    path: "CompanyName/Workflows/General",
    description: "",
    restartMode: 1,                 // restartMode - 0: Do not resume workflow run, 1: Resume workflow run (default)
    resumeFromFailedMode: 0,        // resumeFromFailedMode - 0: System default (default), 1: Enabled, 2: Disabled
    attributes: {
        businessStatus: {
            type: "string"
        },
        endMode: {
            type: "number"
        },
        strErrorMessage: {
            type: "string"
        },
    },
    input: {
        strProjectID: {
            type: "string"
        }
    },
    output: {
    
    },
})

export class generalSampleBasic {  
    
    
    @RootItem({
        target: "workflowExecute",
    })
    public workflowStart(): void { }


    @Item({
        target: "end",
    })
    public workflowExecute(@In strProjectID: string): void {
        try {
            let strResourceActionType: string = "General";
            let strResourceActionName: string = "Sample - Basic";

            let objLogger: Logger = Logger.getLogger(`${strResourceActionType} - ${strResourceActionName}`);

            let objError: Error = objException as Error;
        
            objLogger.error(`${strFunctionName} - Name: ${objError.name}`);
            objLogger.error(`${strFunctionName} - Message: ${objError.message}`);
        
            if (objError.stack) {
              objLogger.error(`${strFunctionName} - Message: ${objError.message}`);
            }
        
            if (strCustomErrorMessage !== "") {
              objLogger.error(`${strFunctionName} - Custom Error Message: ${strCustomErrorMessage}`);
            }

        } catch (e) {
            throw e;
        } finally {
        }
    }
    
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like