To use this function add it to the class library file named OrchestratorService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: OrchestratorService.ts
Function WorkflowAttributeLog
public WorkflowAttributeLog(objWorkflowToken: WorkflowToken): void {
let objWorkflow: Workflow = objWorkflowToken.rootWorkflow;
let arrAttribute: Attribute[] = objWorkflow.attributes;
let objPropertiesAttributes: Properties = objWorkflowToken.getAttributes();
let objJson: {} = {};
arrAttribute.forEach((objAttribute: Attribute): void => {
let strParameterInputName: string = objAttribute.name;
let strParameterInputValue: string = objPropertiesAttributes.get<string>(strParameterInputName);
objJson[strParameterInputName] = strParameterInputValue;
});
let strJson: string = Utilities.stringifyJson(objJson);
this.objLogger.info("Workflow attributes in JSON format: " + strJson);
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
