første xml update
[virt-orchestrator.git] / vFLOWER / content / Workflows / Library / Tagging / Tag workflow.workflow.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <workflow xmlns="http://vmware.com/vco/workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://vmware.com/vco/workflow http://vmware.com/vco/workflow/Workflow-v4.xsd" root-name="item1" object-name="workflow:name=generic" id="0ef918a9-8fc7-4efd-b556-59a32f96bae5" version="0.0.1" api-version="3.1.0" allowed-operations="fve" restartMode="1" resumeFromFailedMode="0">
3     <display-name>Tag workflow</display-name>
4
5     <description>Assigns a tag to a workflow. You must specify the workflow you want to tag and the tag name and value.</description>
6
7     <position x="100.0" y="50.0"/>
8
9     <input>
10         <param name="taggedWorkflow" type="Workflow">
11             <description>Tagged object</description>
12         </param>
13         <param name="tagName" type="string">
14             <description>Tag name</description>
15         </param>
16         <param name="tagValue" type="string">
17             <description>Tag value</description>
18         </param>
19         <param name="isGlobal" type="boolean">
20             <description>Create global or private tag</description>
21         </param>
22     </input>
23
24     <workflow-item name="item0" type="end" end-mode="0">
25         <position x="384.5" y="45.40909090909091"/>
26     </workflow-item>
27
28     <workflow-item name="item1" out-name="item0" type="task">
29         <display-name>Scriptable task</display-name>
30
31         <script encoded="false">
32 if ( isGlobal ) {
33   Server.tagGlobally(taggedObject, tagName, tagValue );
34 } else {
35   Server.tag(taggedObject, tagName, tagValue );
36 }
37 System.log("Tag created : " + tagName + " = " + tagValue);
38         </script>
39
40         <in-binding>
41             <bind name="taggedObject" type="Workflow" export-name="taggedWorkflow"/>
42             <bind name="isGlobal" type="boolean" export-name="isGlobal"/>
43             <bind name="tagName" type="string" export-name="tagName"/>
44             <bind name="tagValue" type="string" export-name="tagValue"/>
45         </in-binding>
46
47         <out-binding/>
48
49         <position x="204.5" y="55.40909090909091"/>
50     </workflow-item>
51
52     <presentation>
53         <p-param name="taggedWorkflow">
54             <desc>Tagged workfow</desc>
55             <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
56         </p-param>
57         <p-param name="tagName">
58             <desc>Tag</desc>
59             <p-qual kind="static" name="mandatory" type="boolean">true</p-qual>
60         </p-param>
61         <p-param name="tagValue">
62             <desc>Value</desc>
63         </p-param>
64         <p-param name="isGlobal">
65             <desc>Global tag</desc>
66         </p-param>
67     </presentation>
68 </workflow>