Remove Process Variables from a Process Instance - Remove Process Variables from a Process Instance - This operation builds a remove-process-variables command payload. Use it to remove one or more variables from a process instance. - Content Innovation Cloud - Hyland Automate Modeler - Current/Hyland-Automate-Modeler/ofd8644735120502 - Current - Current

Hyland Automate Modeler

Platform
Content Innovation Cloud
Product
Hyland Automate Modeler
Release
Current
License
ft:lastPublication
2026-11-02T23:02:36.222215
ft:locale
en-US

This operation builds a remove-process-variables command payload. Use it to remove one or more variables from a process instance.

The base command is:

processPayloadBuilder.removeVariables()

You can use the following options:

Option Description
withProcessInstance(processInstance: ProcessInstance) Specifies the process instance from which to remove variables.
withProcessInstanceId(processInstanceId: string) Specifies the ID of the process instance from which to remove variables.
withVariableNames(variableName: string) Removes a single process variable.
withVariableNames(variableNames: string[]) Removes multiple process variables.

The following is the command example:

processPayloadBuilder
    .removeVariables()
    .withProcessInstanceId(variables.processInstanceId)
    .withVariableNames('draft')
    .build();

processPayloadBuilder.removeVariables() creates a remove-process-variables payload builder. withProcessInstanceId(variables.processInstanceId) specifies the target process instance using the value stored in the processInstanceId process variable. withVariableNames('draft') removes the draft process variable from the process instance. build() creates the final command payload.