Skip to content

Version history and restore

Before content leaves a server, it has a history on that server. Orchestrator keeps a record of every saved version of a workflow, action, policy, configuration element, resource element, and package. You can see what changed between two saves, and go back to any of them. Deleting an object doesn’t throw that history away either: deleted objects wait under Deleted Items until you restore them.

In this recipe you build the small set of content the rest of the chapter uses, change it once, compare the two versions, restore the first one, and then delete the workflow and bring it back.

Getting ready

  • A login to the Orchestrator Client on vco01.vmw.lab with a role that can create workflows, actions, and configuration elements.
  • The vCenter vc01.vmw.lab registered with the vSphere plug-in, as in recipe 1.9.
  • The folders VCF Orchestrator Guide/Chapter 6 under both Library > Workflows and Assets > Configurations.

How to do it

Build the example content

  1. Go to Assets > Configurations, open the folder VCF Orchestrator Guide/Chapter 6, and click New Configuration. Name it vcfguide-ch6-settings.
  2. On the Variables tab, add two variables and click Save:
Name Type Value
reportPrefix string VCF Guide
apiToken SecureString not-a-real-secret

The workflow only reads reportPrefix. apiToken stands in for the credential a real workflow would keep here, so you can see what happens to secrets in recipes 6.2 and 6.3.

  1. Go to Library > Workflows, open the folder VCF Orchestrator Guide/Chapter 6, and create the workflow Report powered-on VMs. On the General tab, set the Version to 1.0.0.
  2. On the Variables tab, add a variable reportPrefix of type string and bind it to the configuration element vcfguide-ch6-settings, variable reportPrefix, as in recipe 4.7.
  3. On the Schema tab, add a scriptable task named Count VMs, give it reportPrefix as an input, and enter:
Report powered-on VMs / Count VMs — version 1.0.0
// reportPrefix comes from the configuration element vcfguide-ch6-settings
var vms = VcPlugin.getAllVirtualMachines();
System.log(reportPrefix + ": " + vms.length + " VMs in the vSphere inventory");
  1. Click Save, then Run. The log shows one line, such as VCF Guide: 57 VMs in the vSphere inventory.

Change it

  1. In Library > Actions, create the action countPoweredOnVms in a new module, com.vcfguide.chapter6. It has no inputs and the Return type number:
com.vcfguide.chapter6/countPoweredOnVms
// Returns the number of powered-on VMs across every registered vCenter.
var vms = VcPlugin.getAllVirtualMachines();
var count = 0;
for (var i = 0; i < vms.length; i++) {
if (vms[i].runtime.powerState.value === "poweredOn") {
count++;
}
}
return count;
  1. Open Report powered-on VMs again. Replace the script of Count VMs with:
Report powered-on VMs / Count VMs — version 1.1.0
// reportPrefix comes from the configuration element vcfguide-ch6-settings
var chapter6 = System.getModule("com.vcfguide.chapter6");
var total = VcPlugin.getAllVirtualMachines().length;
var poweredOn = chapter6.countPoweredOnVms();
System.log(reportPrefix + ": " + poweredOn + " of " + total + " VMs powered on");
  1. On the General tab, change the Version to 1.1.0, add Counts powered-on VMs with an action to the description, and click Save. Run it again: the log now says VCF Guide: 42 of 57 VMs powered on.

Compare the versions

  1. Open the Version History tab. There’s one entry for each save, newest first, with its version number, the user who saved it, and the time.
  2. Select the entry for 1.0.0, and in the Diff against drop-down choose the current version. A window shows the two versions as text, with the changed script lines and the new version number and description highlighted.
Figure 6.1. The saves of a workflow on its Version History tab.
Figure 6.2. Two versions of a workflow compared as text.
  1. Close the window and click Diff Visually, at the top right of the tab. In the two Version drop-downs, choose 1.0.0 and 1.1.0. The client shows the two versions side by side, with sections for the general information, variables, inputs and outputs, and the schema.
Figure 6.3. The same comparison as a picture.
Needs a lab check. On 9.1.1, record the columns of the Version History tab, the exact name of the Diff against control, and whether the text comparison is YAML (as in the 8.12 documentation) or another format. Check whether the visual comparison marks changes inside a scriptable task’s script or only shows that the element changed.

Restore an older version

  1. Back on the Version History tab, select 1.0.0 and click Restore. The workflow’s script and its version number go back to 1.0.0.
  2. Look at the list again. The restore didn’t remove 1.1.0: it added a new entry at the top. Select 1.1.0 and click Restore to get the newer script back.
Needs a lab check. Confirm on 9.1.1 that a restore asks for confirmation, that it adds a new entry rather than removing later ones, and which version number the restored workflow shows. Check whether unsaved edits in the open editor are lost when you restore.

Delete and bring back a workflow

  1. In Library > Workflows, select Report powered-on VMs and delete it. It disappears from the folder.
  2. Click Deleted Items at the bottom of the client’s menu. It lists what was deleted in the period chosen at the top right, Show last 1 day, 7 days or 30 days, with each item’s Name, Type, Path and Deleted on. Open the ⋮ menu at the start of the row for Report powered-on VMs and choose Restore.
Deleted Items, 1 of 1, period Show last 1 day. The table has the columns Name, Type, Path and Deleted on; one row, the action checkFolders, type Action, path Actions/com/vcfguide/scratch, deleted Dec 1, 2026 6:28:05 PM.
Figure 6.4. Deleted Items, with an action deleted in the lab. Deleted workflows are listed the same way, and the ⋮ menu at the start of a row holds Restore.

Checked on 9.1.1 (embedded), with a deleted action: the page is Deleted Items in the main menu, with the columns and periods above, and Restore is the only choice in the row menu.

Needs a lab check. Still to check on 9.1.1: that a restored workflow goes back to its original folder with its version history, and how long deleted items are kept beyond the 30-day view.

How it works

Every save is a version. Each time you save an object, Orchestrator records the whole object as it was, with the user and the time, and keeps every earlier record. Comparing two entries shows the difference between two complete objects, not a list of edits. Restoring an entry saves that old object again as the newest version, so a restore never destroys anything: you can always restore your way forward again, as in step 14.

The objects with a history are the ones you write yourself: workflows, actions, policies, configuration elements, resource elements, and packages. Plug-in inventory objects, such as a registered vCenter or a REST host, aren’t on that list. They’re configuration of a plug-in, not content, and you recreate them with the plug-in’s configuration workflows.

The version number is yours. The Version field doesn’t decide whether a history entry is made. Every save makes one. The number is for people, and for package imports: when you import a package, Orchestrator compares each element’s version number with the one already on the server, and only selects elements that are newer (recipe 6.2). Raise the number whenever you change something another server should pick up.

History is stored like Git. Under the client, Orchestrator keeps its content in an internal Git repository on the server. Each save is a commit, the Version History tab is that object’s log, and Administration > Git History shows the commits for the whole server. That’s why the same history can be pushed to an external Git server in recipe 6.3, and why Broadcom’s articles on Git problems talk about Orchestrator’s “local repository”. It also explains the limits: history lives in Orchestrator’s database, so it’s as safe as your backup of the appliance (recipe 2.6), and only as long-lived as the server.

The 9.1.1 lab bears this out: the versions REST call in There’s more returns Git commit IDs, commits that were never pushed carry the tag @local-only, and an error from that call names org.eclipse.jgit, the Java Git library inside Orchestrator.

Needs a lab check. Confirm on 9.1.1 that Administration > Git History is present and lists local commits even when no external repository is connected.

Deleting marks, it doesn’t erase. A deleted workflow is marked as deleted and moved out of sight, and its version history is kept. Restoring it clears the mark, so it comes back with every earlier version.

Back in vRO 5.5–7Open the workflow, go to General > Show version history, and use Diff Against Current and Revert. A version was only kept if you raised the version number before saving, and reverting threw away unsaved changes for good.
In Orchestrator 9.xEvery save is kept on the object's Version History tab. Compare any two entries with Diff against or Diff Visually, and Restore adds the old version as a new entry.

There's more

Two people, one workflow. If someone else saves a workflow while you have it open, your save hits a merge conflict. Click Resolve next to the error. The Resolve Conflicts window offers Use theirs to keep the other person’s version, Use ours to keep yours, or Resolve to edit the merged version by hand. Resolve is unavailable when the merged version isn’t valid. The safer habit is to agree who owns which workflows.

Needs a lab check. Reproduce a merge conflict on 9.1.1 with two users editing Report powered-on VMs at once, and record the error text and the three choices in Resolve Conflicts.

Actions and configuration elements work the same way. Recipe 4.2 compared and restored versions of an action. A configuration element’s history records its variables and their values, so restoring one also restores old values. For a SecureString, the history shows only that a value is set, never the secret.

Needs a lab check. On 9.1.1, change reportPrefix in vcfguide-ch6-settings, save, and check what the element’s Version History shows for reportPrefix and for apiToken, and whether restoring an older version restores the old SecureString value.

Workflows that have no history. Workflows created by the SQL plug-in’s Generate CRUD workflows for a table workflow (recipe 5.4) don’t appear in version history and can’t be pushed to Git. Duplicate a generated workflow and use the copy if you want it tracked.

Version history from the REST API. The 9.1 API lists a workflow’s versions with GET /vco/api/workflows/{id}/versions, so a report or a pipeline can see who changed what without opening the client.

On 9.1.1 the answer is a commits list, newest first. Each entry is a Git commit of the object:

One entry from GET /vco/api/workflows/{id}/versions (9.1.1)
{
"commit": {
"authorName": "svc-vcfguide",
"authorEmail": "unknown@mail.com",
"commitDate": "2026-11-30T17:57:28.000+00:00",
"message": "Workflow updated\n@version 1.0.2\n@local-only\n@orchestrator-object-id eaba7b60-…\n",
"objectId": "394793656599f1fe44cff9c695aece8f906ddd27",
"parentId": "24cd1fbbf1324beeeb41121e65111fb459d46d0b"
}
}

objectId and parentId are Git commit IDs. The message says what kind of save it was (Workflow updated, or Created input form for a change made in the form designer, which is a commit of its own) and carries tags: the version number at that save, @local-only for a commit that was never pushed to an external repository, and the object’s ID. GET /vco/api/workflows/{id}/versions/{objectId} (operation getWorkflowForCommit) is the call for the workflow as it was at one commit.

Needs a lab check. In the lab, getWorkflowForCommit failed with a JGit No space left on device error from the appliance. Run it on a healthy 9.1.1 server and record what it returns.

Folders have no history. A folder that still has content can only be deleted with Force delete, which deletes everything inside it as well. If a folder vanished with its content, look for the workflows in Deleted Items.

Needs a lab check. Force-delete a test folder with one workflow in it on 9.1.1, and check that the workflow appears in Deleted Items and can be restored without the folder.

See also