-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathTestScripterTask.job
More file actions
82 lines (74 loc) · 2.12 KB
/
TestScripterTask.job
File metadata and controls
82 lines (74 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8"?>
<Main>
<References>
</References>
<Jobs>
<Job dataclassname="TParametersJobDataItem" name="Parameters Item">
<Params>
<Description></Description>
<CanPerform></CanPerform>
<FlowAction>Success</FlowAction>
<ParamList>
<Param name="name1">value1</Param>
<Param name="name2">value2</Param>
</ParamList>
</Params>
<Job dataclassname="TScripterDataItem" name="PascalScript Item">
<Params>
<Description>qwwqqw
</Description>
<CanPerform></CanPerform>
<FlowAction>Success</FlowAction>
<ErrorBindType>and</ErrorBindType>
<ScriptFile></ScriptFile>
<LogFile>c:\Users\Public\Log.txt</LogFile>
<IsUseScriptFile>No</IsUseScriptFile>
<IsUseLogFile>No</IsUseLogFile>
<Script><![CDATA[var
list: TStringList;
value1: string;
begin
list := TStringList.Create();
try
list.Add('Hello World');
value1 := JobParams.GetParam('name1');
value1 := value1 + ' modified in PascalScript';
list.Add(value1);
JobParams.SetParam('name1', value1);
list.SaveToFile('c:\Users\Public\PascalScriptTest.txt');
JobLog.Add('Saved to file: ' + value1);
finally
list.Free();
end;
end.
]]></Script>
<ErrorWords></ErrorWords>
<Language>PascalScript</Language>
</Params>
</Job>
<Job dataclassname="TScripterDataItem" name="JavaScript Item">
<Params>
<Description></Description>
<CanPerform></CanPerform>
<FlowAction>Success</FlowAction>
<ErrorBindType>and</ErrorBindType>
<ScriptFile></ScriptFile>
<LogFile></LogFile>
<IsUseScriptFile>No</IsUseScriptFile>
<IsUseLogFile>No</IsUseLogFile>
<Script><![CDATA[var value1 = jobParams.getParam("name1");
value1 += " modified in JavaScript";
jobParams.setParam("name1", value1);
var value2 = jobParams.getParam("name2");
var text = value1 + " " + value2;
var fs = require('fs');
fs.writeFileSync("c:\\Users\\Public\\JavaScriptTest.txt", "\ufeff" + text);
jobLog.add("Saved to file: " + text);
]]></Script>
<ErrorWords></ErrorWords>
<Language>JavaScript</Language>
</Params>
</Job>
</Job>
</Jobs>
</Main>