-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-mode.html
140 lines (140 loc) · 12 KB
/
test-mode.html
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="JobStreamer : JobStreamer site."/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.1.8/semantic.min.css" type="text/css"/>
<link rel="stylesheet" href="css/basic.css" type="text/css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/prism/1.5.0/themes/prism.css" type="text/css"/>
</head>
<body>
<div class="ui fixed inverted teal menu">
<div class="title item"><a href="./index.html"><b>Job Streamer</b></a></div>
</div>
<div/>
<div id="main_content_wrap" class="main ui grid content">
<div class="four wide column">
<div class="ui vertical fluid tabular menu">
<a class="item" href="get-started-quickly.html">
Getting Started
</a>
<div class="item">
<div class="header">Guide</div>
<div class="menu">
<a class="item" href="auth.html">
Authentication and authorization
</a>
<a class="item" href="deploy-batch-components.html">
Deploy batch components
</a>
<a class="item" href="create-a-job.html">
Create job
</a>
<a class="item" href="execute-the-job.html">
Execute job
</a>
<a class="item" href="schedule-job.html">
Schedule job
</a>
<a class="item" href="job-config.html">
Job config
</a>
<a class="item" href="notificator-config.html">
Notificator config
</a>
<a class="item" href="import-export.html">
Import and export
</a>
<a class="item" href="test-mode.html">
Test mode
</a>
<a class="item" href="healthcheck.html">
Healthcheck
</a>
</div>
</div>
<div class="item">
<div class="header">Components</div>
<div class="menu">
<a class="item" href="control-bus.html">
Control bus
</a>
<a class="item" href="agent.html">
Agent
</a>
<a class="item" href="console.html">
Management console
</a>
<a class="item" href="notificator.html">
Notificator
</a>
</div>
</div>
<div class="item">
<div class=" header">For contributers</div>
<div class="menu">
<a class="item" href="get-started-developer.html">
Getting Started for contributers
</a>
<a class="item" href="developer-guide.html">
Developer guide for contributers
</a>
</div>
</div>
</div> </div>
<div class="twelve wide stretched column">
<h1><a href="#test-mode" name="test-mode">Test mode</a></h1><p>Test mode is a function to test whether the job structure is correct or not when you create it.</p><h2><a href="#use-case" name="use-case">Use case</a></h2><p>For example, you can validate invalid jobs like following in the test mode.</p>
<ul>
<li>Step is looping</li>
<li>Step names duplicate</li>
</ul><h2><a href="#how-to-use" name="how-to-use">How to use</a></h2><h3>1. Press execution button in the job creation page.</h3><p><img src="img/execute-test-mode.png" alt="image" /></p><h3>2. All steps is replaced to the mock and executed.</h3><h3>3. Progress bar turns green when it succeeds.</h3><p><img src="img/test-success.png" alt="image" /></p><h3>4. Progress bar turns red and error logs is outputted in the console when it failed.</h3><p><img src="img/fail-test.png" alt="image" /></p><h2><a href="#api" name="api">API</a></h2><h3>1. Execute new test</h3>
<pre><code>POST /test-executions
</code></pre><h4><a href="#request" name="request">Request</a></h4>
<pre><code class="clojure">{
:bpom "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:jsr352=\"http://jsr352/\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"Definitions_1\" targetNamespace=\"http://bpmn.io/schema/bpmn\">\n <jsr352:job id=\"Job_1\" isExecutable=\"false\">\n <jsr352:start id=\"Start_1\">\n <bpmn:outgoing>Transition_0qj68gv</bpmn:outgoing>\n </jsr352:start>\n <jsr352:step id=\"Step_0wzrzrb\">\n <bpmn:incoming>Transition_1isxcy1</bpmn:incoming>\n <bpmn:incoming>Transition_0qj68gv</bpmn:incoming>\n <bpmn:outgoing>Transition_18mid3w</bpmn:outgoing>\n </jsr352:step>\n <jsr352:step id=\"Step_0szv8t7\">\n <bpmn:incoming>Transition_18mid3w</bpmn:incoming>\n <bpmn:outgoing>Transition_1isxcy1</bpmn:outgoing>\n </jsr352:step>\n <jsr352:transition id=\"Transition_18mid3w\" sourceRef=\"Step_0wzrzrb\" targetRef=\"Step_0szv8t7\" />\n <jsr352:transition id=\"Transition_1isxcy1\" sourceRef=\"Step_0szv8t7\" targetRef=\"Step_0wzrzrb\" />\n <jsr352:transition id=\"Transition_0qj68gv\" sourceRef=\"Start_1\" targetRef=\"Step_0wzrzrb\" />\n </jsr352:job>\n <bpmndi:BPMNDiagram id=\"BPMNDiagram_1\">\n <bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Job_1\">\n <bpmndi:BPMNShape id=\"_BPMNShape_Start_2\" bpmnElement=\"Start_1\">\n <dc:Bounds x=\"173\" y=\"102\" width=\"36\" height=\"36\" />\n </bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"Step_0wzrzrb_di\" bpmnElement=\"Step_0wzrzrb\">\n <dc:Bounds x=\"249\" y=\"136\" width=\"120\" height=\"100\" />\n </bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"Step_0szv8t7_di\" bpmnElement=\"Step_0szv8t7\" isExpanded=\"true\">\n <dc:Bounds x=\"572\" y=\"166\" width=\"120\" height=\"100\" />\n </bpmndi:BPMNShape>\n <bpmndi:BPMNEdge id=\"Transition_18mid3w_di\" bpmnElement=\"Transition_18mid3w\">\n <di:waypoint xsi:type=\"dc:Point\" x=\"369\" y=\"186\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"471\" y=\"186\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"471\" y=\"216\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"572\" y=\"216\" />\n <bpmndi:BPMNLabel>\n <dc:Bounds x=\"486\" y=\"191\" width=\"0\" height=\"0\" />\n </bpmndi:BPMNLabel>\n </bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"Transition_1isxcy1_di\" bpmnElement=\"Transition_1isxcy1\">\n <di:waypoint xsi:type=\"dc:Point\" x=\"572\" y=\"216\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"471\" y=\"216\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"471\" y=\"212\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"369\" y=\"212\" />\n <bpmndi:BPMNLabel>\n <dc:Bounds x=\"486\" y=\"204\" width=\"0\" height=\"0\" />\n </bpmndi:BPMNLabel>\n </bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"Transition_0qj68gv_di\" bpmnElement=\"Transition_0qj68gv\">\n <di:waypoint xsi:type=\"dc:Point\" x=\"209\" y=\"120\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"229\" y=\"120\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"229\" y=\"177\" />\n <di:waypoint xsi:type=\"dc:Point\" x=\"249\" y=\"177\" />\n <bpmndi:BPMNLabel>\n <dc:Bounds x=\"244\" y=\"138.5\" width=\"0\" height=\"0\" />\n </bpmndi:BPMNLabel>\n </bpmndi:BPMNEdge>\n </bpmndi:BPMNPlane>\n </bpmndi:BPMNDiagram>\n</bpmn:definitions>\n"
}
</code></pre><h4><a href="#input" name="input">input</a></h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>bpmn</td>
<td>String</td>
<td>BPMN file content you want to test</td>
</tr>
</tbody>
</table><h4><a href="#response" name="response">Response</a></h4>
<pre><code class="clojure">{:state-id 1}
</code></pre><h3>2. Get test execution status</h3>
<pre><code>GET /test-execution/:state-id
</code></pre><h4><a href="#response" name="response">Response</a></h4>
<pre><code class="clojure">{:log-message "JBERET000007: Failed to run job Job_1, Step_1wdp5if, org.jberet.job.model.Step@762a8334", :log-exception "java.lang.IllegalStateException: JBERET000607: The step Step_1wdp5if would form a loopback in sequence: [Step_1wdp5if, Step_0mjwgb4]\n\tat org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:108)\n\tat org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)\n\tat org.jberet.runtime.runner.CompositeExecutionRunner.runJobElement(CompositeExecutionRunner.java:128)\n\tat org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:196)\n\tat org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)\n\tat org.jberet.runtime.runner.CompositeExecutionRunner.runJobElement(CompositeExecutionRunner.java:128)\n\tat org.jberet.runtime.runner.StepExecutionRunner.run(StepExecutionRunner.java:196)\n\tat org.jberet.runtime.runner.CompositeExecutionRunner.runStep(CompositeExecutionRunner.java:164)\n\tat org.jberet.runtime.runner.CompositeExecutionRunner.runFromHeadOrRestartPoint(CompositeExecutionRunner.java:88)\n\tat org.jberet.runtime.runner.JobExecutionRunner.run(JobExecutionRunner.java:59)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat java.lang.Thread.run(Thread.java:745)\n", :batch-status :batch-status/failed}
</code></pre>
</div>
</div>
<div class="ui inverted teal footer vertical segment">
<div class="container">
<div class="ui stackable divided relaxed grid">
<div class="sixteen wide column">
<p>Copyright @ 2015-2016 kawasima & contributors.</p>
<p>Released under the EPL license.</p>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/jquery/1.12.3/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/prism/1.5.0/prism.js"></script>
<script src="https://cdn.jsdelivr.net/prism/1.5.0/components/prism-java.min.js"></script>
<script src="https://cdn.jsdelivr.net/prism/1.5.0/components/prism-bash.min.js"></script>
<script src="https://cdn.jsdelivr.net/prism/1.5.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.1.8/semantic.min.js"> </script>
</body>
</html>