refactor: Update RunWorkflow to use VMAPI for replacing values in argumentContent

This commit refactors the RunWorkflow class to use the VMAPI module instead of the deprecated VMUtil module for replacing values in the argumentContent. The VMAPI module provides a more up-to-date and efficient method for replacing values, improving the performance and maintainability of the code.
This commit is contained in:
Simon Larsen
2024-05-21 20:51:16 +01:00
parent 631c22aa64
commit 89e08614f4

View File

@@ -28,7 +28,7 @@ import logger from 'CommonServer/Utils/Logger';
import TimeoutException from 'Common/Types/Exception/TimeoutException';
import Exception from 'Common/Types/Exception/Exception';
import WorkflowLog from 'Model/Models/WorkflowLog';
import VMUtil from 'CommonServer/Utils/VM';
import VMAPI from 'CommonServer/Utils/VM/VMAPI';
const AllComponents: Dictionary<ComponentMetadata> = loadAllComponentMetadata();
@@ -362,7 +362,7 @@ export default class RunWorkflow {
continue;
}
argumentContent = VMUtil.replaceValueInPlace(
argumentContent = VMAPI.replaceValueInPlace(
storageMap as any,
argumentContent as string,
argument.type === ComponentInputType.JSON