7
7
import io .camunda .zeebe .model .bpmn .Bpmn ;
8
8
import io .camunda .zeebe .model .bpmn .BpmnModelInstance ;
9
9
import io .camunda .zeebe .model .bpmn .builder .ServiceTaskBuilder ;
10
+ import io .camunda .zeebe .spring .client .annotation .JobWorker ;
11
+ import io .camunda .zeebe .spring .client .annotation .Variable ;
10
12
import io .camunda .zeebe .spring .client .annotation .ZeebeVariable ;
11
13
import io .camunda .zeebe .spring .client .annotation .ZeebeWorker ;
12
14
import io .camunda .zeebe .spring .client .annotation .customizer .ZeebeWorkerValueCustomizer ;
@@ -62,7 +64,7 @@ public ZeebeWorkerValueCustomizer zeebeWorkerValueCustomizer() {
62
64
private static ComplexTypeDTO test6ComplexTypeDTO = null ;
63
65
private static String test6Var2 = null ;
64
66
65
- @ ZeebeWorker (name ="test1" , type = "test1" , autoComplete = true )
67
+ @ JobWorker (name ="test1" , type = "test1" , autoComplete = true )
66
68
public void handleTest1 (JobClient client , ActivatedJob job ) {
67
69
calledTest1 = true ;
68
70
}
@@ -84,7 +86,7 @@ public void testAutoComplete() {
84
86
assertTrue (calledTest1 );
85
87
}
86
88
87
- @ ZeebeWorker (type = "test2" , autoComplete = true )
89
+ @ JobWorker (type = "test2" , autoComplete = true )
88
90
public void handleTest2 (JobClient client , ActivatedJob job ) {
89
91
// Complete it here to trigger a not found in the auto complete, which will be ignored
90
92
client .newCompleteCommand (job .getKey ()).send ().join ();
@@ -109,7 +111,7 @@ public void testAutoCompleteOnAlreadyCompletedJob() {
109
111
assertTrue (calledTest2 );
110
112
}
111
113
112
- @ ZeebeWorker (name = "test3" , type = "test3" , autoComplete = true , pollInterval = 10 , enabled = false )
114
+ @ JobWorker (name = "test3" , type = "test3" , autoComplete = true , pollInterval = 10 , enabled = false )
113
115
public void handeTest3Disabled (final JobClient client , final ActivatedJob job ) {
114
116
calledTest3 = true ;
115
117
}
@@ -131,7 +133,7 @@ void shouldNotActivateJobInAnnotationDisabledWorker() {
131
133
assertThat (calledTest3 ).isFalse ();
132
134
}
133
135
134
- @ ZeebeWorker (name = "test4" , type = "test4" , autoComplete = true , pollInterval = 10 )
136
+ @ JobWorker (name = "test4" , type = "test4" , autoComplete = true , pollInterval = 10 )
135
137
public void handeTest4 (final JobClient client , final ActivatedJob job ) {
136
138
calledTest4 = true ;
137
139
}
@@ -156,7 +158,7 @@ void shouldNotActivateJobInPropertiesDisabledWorker() {
156
158
assertThat (calledTest4 ).isFalse ();
157
159
}
158
160
159
- @ ZeebeWorker (name = "test5" )
161
+ @ JobWorker (name = "test5" , autoComplete = false )
160
162
public void handeTest5 () {
161
163
}
162
164
@@ -165,8 +167,8 @@ public void testWorkerDefaultType() {
165
167
assertTrue (jobWorkerManager .findJobWorkerConfigByType ("DefaultType" ).isPresent ());
166
168
}
167
169
168
- @ ZeebeWorker (name = "test6" , type = "test6" , autoComplete = true , pollInterval = 10 )
169
- public void handleTest6 (final JobClient client , final ActivatedJob job , @ ZeebeVariable ComplexTypeDTO dto , @ ZeebeVariable String var2 ) {
170
+ @ JobWorker (name = "test6" , type = "test6" , pollInterval = 10 )
171
+ public void handleTest6 (final JobClient client , final ActivatedJob job , @ Variable ComplexTypeDTO dto , @ Variable String var2 ) {
170
172
calledTest6 = true ;
171
173
test6ComplexTypeDTO = dto ;
172
174
test6Var2 = var2 ;
0 commit comments