Um einen beliebigen Vorgang auf einen Workflow anzuwenden, müssen Sie zunächst die Orchestrator-Bestandsliste nach diesem durchsuchen und seine Definition abrufen. Die Definition listet die Workflow-Eingabe- und -Ausgabeparameter auf und enthält Links zu den verfügbaren Workflowausführungen, der Workflowpräsentation und anderen Objekten.
Voraussetzungen
Überprüfen Sie, ob das Paket mit Beispiel-Workflows in Orchestrator importiert wurde. Das Paket ist in der ZIP-Datei mit Orchestrator-Beispielanwendungen enthalten, die Sie von der Orchestrator-Dokumentationsseite herunterladen können.
Prozedur
Suchen nach dem Workflow „Send Hello“
Sie können nach dem Workflow „Send Hello“ suchen und dessen Definition abrufen:
Führen Sie zur Suche nach dem Workflow „Send Hello“ eine GET-Anforderung unter der URL des Workflowdiensts aus, indem Sie einen Filter anwenden:
GET https://localhost:8281/vco/api/workflows?conditions=name~Hello
Eine Liste der Workflows mit „Hello“ im Namen wird angezeigt:
<xml version="1.0" encoding="UTF-8" standalone="yes"> <inventory-items xmlns="http://www.vmware.com/vco" total="2"> <link rel="down" href="https://localhost:8281/vco/api/catalog/System/Workflow/CF808080808080808080808080808080E6808080013086668236014a0614d16e1/"> <attributes> <attribute name="id" value="CF808080808080808080808080808080E6808080013086668236014a0614d16e1"/> <attribute name="canExecute" value="true" /> <attribute name="description" value="" /> <attribute name="name" value="Interactive Hello World" /> <attribute name="type" value="Workflow"/> <attribute name="canEdit" value="true"/> </attributes> </link> <link rel="down" href="https://localhost:8281/vco/api/catalog/System/Workflow/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/"> <attributes> <attribute name="id" value="CF808080808080808080808080808080DA808080013086668236014a0614d16e1"/> <attribute name="canExecute" value="true" /> <attribute name="description" value="" /> <attribute name="name" value="Send Hello" /> <attribute name="type" value="Workflow"/> <attribute name="canEdit" value="true"/> </attributes> </link> </inventory-items>
Führen Sie eine GET-Anforderung unter der URL des Bestandslistenelements des Workflows „Send Hello“ aus:
GET https://localhost:8281/vco/api/catalog/System/Workflow/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/
Das Bestandslistenelement des Workflows „Send Hello“ wird im Hauptteil der Antwort angezeigt:
<xml version="1.0" encoding="UTF-8" standalone="yes"> <inventory-item xmlns="http://www.vmware.com/vco" href="https://localhost:8281/vco/api/catalog/System/Workflow/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/"> <relations> <link rel="down" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/" /> </relations> <attributes> <attribute name="id" value="CF808080808080808080808080808080DA808080013086668236014a0614d16e1"/> <attribute name="canExecute" value="true" /> <attribute name="description" value="" /> <attribute name="name" value="Send Hello" /> <attribute name="type" value="Workflow"/> <attribute name="canEdit" value="true"/> </attributes> </inventory-item>
Rufen Sie die Definition des Workflows ab, indem Sie eine GET-Anforderung unter deren URL ausführen:
GET https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/
Die Definition des Workflows „Send Hello“ wird im Hauptteil der Antwort angezeigt:
<xml version="1.0" encoding="UTF-8" standalone="yes"> <workflow xmlns="http://www.vmware.com/vco" customized-icon="false" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/"> <relations> <link rel="up" href="https://localhost:8281/vco/api/inventory/System/Workflows/Samples/HelloWorld/" /> <link rel="add" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/executions/" /> <link rel="down" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/executions/" /> <link rel="down" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/presentation/" /> <link rel="down" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/tasks/" /> <link rel="down" href="https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/icon/" /> </relations> <input-parameters> <parameter name="name" type="string" /> </input-parameters> <output-parameters> <parameter name="message" type="string" /> </output-parameters> <name>Send Hello</name> <description></description> </workflow>