From 2d05e3bdf56b15efa3f3b6ac5a1056cf0deb9126 Mon Sep 17 00:00:00 2001 From: Miguel Pires Date: Wed, 19 Jun 2019 16:14:37 +0200 Subject: [PATCH] fix(protocol): change custom headers to Map BREAKING CHANGE: - Return type of 'getCustomHeaders' in JobRecord and clients' ActivateJobs response was changed from Map to Map --- .../broker/exporter/ExporterObjectMapper.java | 10 + clients/go/entities/job.go | 4 +- clients/go/entities/job_test.go | 8 +- clients/go/mock_pb/mock_gateway.go | 277 ++++----- clients/go/pb/gateway.pb.go | 529 ++++-------------- .../client/api/response/ActivatedJob.java | 2 +- .../zeebe/client/impl/ZeebeObjectMapper.java | 12 + .../impl/response/ActivatedJobImpl.java | 6 +- .../io/zeebe/client/job/ActivateJobsTest.java | 2 +- .../WorkflowInstanceFunctionalTest.java | 2 +- .../impl/encoding/MsgPackConverter.java | 16 +- .../impl/record/value/job/JobRecord.java | 4 +- .../impl/JsonSerializableToJsonTest.java | 2 +- .../protocol/record/value/JobRecordValue.java | 2 +- .../test/util/record/JobRecordStream.java | 4 +- 15 files changed, 275 insertions(+), 605 deletions(-) diff --git a/broker-core/src/main/java/io/zeebe/broker/exporter/ExporterObjectMapper.java b/broker-core/src/main/java/io/zeebe/broker/exporter/ExporterObjectMapper.java index 96ee6ba6c56a..52c8fb0c72c3 100644 --- a/broker-core/src/main/java/io/zeebe/broker/exporter/ExporterObjectMapper.java +++ b/broker-core/src/main/java/io/zeebe/broker/exporter/ExporterObjectMapper.java @@ -34,6 +34,8 @@ public class ExporterObjectMapper { private static final TypeReference> MAP_TYPE_REFERENCE = new TypeReference>() {}; + private static final TypeReference> STRING_MAP_TYPE_REFERENCE = + new TypeReference>() {}; private final ObjectMapper msgpackObjectMapper; private final ObjectMapper jsonObjectMapper; @@ -105,4 +107,12 @@ public Map fromMsgpackAsMap(InputStream inputStream) { throw new RuntimeException("Failed deserialize Msgpack JSON to map", e); } } + + public Map fromMsgpackAsStringMap(InputStream inputStream) { + try { + return msgpackObjectMapper.readValue(inputStream, STRING_MAP_TYPE_REFERENCE); + } catch (IOException e) { + throw new RuntimeException("Failed deserialize Msgpack JSON to map", e); + } + } } diff --git a/clients/go/entities/job.go b/clients/go/entities/job.go index c5245a986b0c..b1a2fef2b7fb 100644 --- a/clients/go/entities/job.go +++ b/clients/go/entities/job.go @@ -32,8 +32,8 @@ func (job *Job) GetVariablesAs(variablesType interface{}) error { return json.Unmarshal([]byte(job.Variables), variablesType) } -func (job *Job) GetCustomHeadersAsMap() (map[string]interface{}, error) { - var customHeadersMap map[string]interface{} +func (job *Job) GetCustomHeadersAsMap() (map[string]string, error) { + var customHeadersMap map[string]string return customHeadersMap, job.GetCustomHeadersAs(&customHeadersMap) } diff --git a/clients/go/entities/job_test.go b/clients/go/entities/job_test.go index 40454f2170d3..7243fcced7e7 100644 --- a/clients/go/entities/job_test.go +++ b/clients/go/entities/job_test.go @@ -31,6 +31,10 @@ var ( "foo": "bar", "hello": "world", } + expectedJsonAsMapVariables = map[string]interface{}{ + "foo": "bar", + "hello": "world", + } expectedJsonAsStruct = MyType{ Foo: "bar", Hello: "world", @@ -46,7 +50,7 @@ func TestJob_GetVariablesAsMap(t *testing.T) { if err != nil { t.Error("Failed to get variables as map", err) } - if reflect.DeepEqual(variables, expectedJsonAsMap) { + if !reflect.DeepEqual(variables, expectedJsonAsMapVariables) { t.Error("Failed to get variables as map, got", variables, "instead of", expectedJsonAsMap) } } @@ -66,7 +70,7 @@ func TestJob_GetCustomHeadersAsMap(t *testing.T) { if err != nil { t.Error("Failed to get custom headers as map", err) } - if reflect.DeepEqual(customHeaders, expectedJsonAsMap) { + if !reflect.DeepEqual(customHeaders, expectedJsonAsMap) { t.Error("Failed to get custom headers as map, got", customHeaders, "instead of", expectedJsonAsMap) } } diff --git a/clients/go/mock_pb/mock_gateway.go b/clients/go/mock_pb/mock_gateway.go index a989d7e17d78..35219db1b80c 100644 --- a/clients/go/mock_pb/mock_gateway.go +++ b/clients/go/mock_pb/mock_gateway.go @@ -1,7 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/zeebe-io/zeebe/clients/go/pb (interfaces: GatewayClient,Gateway_ActivateJobsClient) -// Package mock_pb is a generated GoMock package. package mock_pb import ( @@ -32,242 +31,206 @@ func NewMockGatewayClient(ctrl *gomock.Controller) *MockGatewayClient { } // EXPECT returns an object that allows the caller to indicate expected use -func (m *MockGatewayClient) EXPECT() *MockGatewayClientMockRecorder { - return m.recorder +func (_m *MockGatewayClient) EXPECT() *MockGatewayClientMockRecorder { + return _m.recorder } // ActivateJobs mocks base method -func (m *MockGatewayClient) ActivateJobs(arg0 context.Context, arg1 *pb.ActivateJobsRequest, arg2 ...grpc.CallOption) (pb.Gateway_ActivateJobsClient, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) ActivateJobs(_param0 context.Context, _param1 *pb.ActivateJobsRequest, _param2 ...grpc.CallOption) (pb.Gateway_ActivateJobsClient, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "ActivateJobs", varargs...) + ret := _m.ctrl.Call(_m, "ActivateJobs", _s...) ret0, _ := ret[0].(pb.Gateway_ActivateJobsClient) ret1, _ := ret[1].(error) return ret0, ret1 } // ActivateJobs indicates an expected call of ActivateJobs -func (mr *MockGatewayClientMockRecorder) ActivateJobs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActivateJobs", reflect.TypeOf((*MockGatewayClient)(nil).ActivateJobs), varargs...) +func (_mr *MockGatewayClientMockRecorder) ActivateJobs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "ActivateJobs", reflect.TypeOf((*MockGatewayClient)(nil).ActivateJobs), _s...) } // CancelWorkflowInstance mocks base method -func (m *MockGatewayClient) CancelWorkflowInstance(arg0 context.Context, arg1 *pb.CancelWorkflowInstanceRequest, arg2 ...grpc.CallOption) (*pb.CancelWorkflowInstanceResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) CancelWorkflowInstance(_param0 context.Context, _param1 *pb.CancelWorkflowInstanceRequest, _param2 ...grpc.CallOption) (*pb.CancelWorkflowInstanceResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "CancelWorkflowInstance", varargs...) + ret := _m.ctrl.Call(_m, "CancelWorkflowInstance", _s...) ret0, _ := ret[0].(*pb.CancelWorkflowInstanceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // CancelWorkflowInstance indicates an expected call of CancelWorkflowInstance -func (mr *MockGatewayClientMockRecorder) CancelWorkflowInstance(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWorkflowInstance", reflect.TypeOf((*MockGatewayClient)(nil).CancelWorkflowInstance), varargs...) +func (_mr *MockGatewayClientMockRecorder) CancelWorkflowInstance(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "CancelWorkflowInstance", reflect.TypeOf((*MockGatewayClient)(nil).CancelWorkflowInstance), _s...) } // CompleteJob mocks base method -func (m *MockGatewayClient) CompleteJob(arg0 context.Context, arg1 *pb.CompleteJobRequest, arg2 ...grpc.CallOption) (*pb.CompleteJobResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) CompleteJob(_param0 context.Context, _param1 *pb.CompleteJobRequest, _param2 ...grpc.CallOption) (*pb.CompleteJobResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "CompleteJob", varargs...) + ret := _m.ctrl.Call(_m, "CompleteJob", _s...) ret0, _ := ret[0].(*pb.CompleteJobResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // CompleteJob indicates an expected call of CompleteJob -func (mr *MockGatewayClientMockRecorder) CompleteJob(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteJob", reflect.TypeOf((*MockGatewayClient)(nil).CompleteJob), varargs...) +func (_mr *MockGatewayClientMockRecorder) CompleteJob(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "CompleteJob", reflect.TypeOf((*MockGatewayClient)(nil).CompleteJob), _s...) } // CreateWorkflowInstance mocks base method -func (m *MockGatewayClient) CreateWorkflowInstance(arg0 context.Context, arg1 *pb.CreateWorkflowInstanceRequest, arg2 ...grpc.CallOption) (*pb.CreateWorkflowInstanceResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) CreateWorkflowInstance(_param0 context.Context, _param1 *pb.CreateWorkflowInstanceRequest, _param2 ...grpc.CallOption) (*pb.CreateWorkflowInstanceResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "CreateWorkflowInstance", varargs...) + ret := _m.ctrl.Call(_m, "CreateWorkflowInstance", _s...) ret0, _ := ret[0].(*pb.CreateWorkflowInstanceResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateWorkflowInstance indicates an expected call of CreateWorkflowInstance -func (mr *MockGatewayClientMockRecorder) CreateWorkflowInstance(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateWorkflowInstance", reflect.TypeOf((*MockGatewayClient)(nil).CreateWorkflowInstance), varargs...) +func (_mr *MockGatewayClientMockRecorder) CreateWorkflowInstance(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "CreateWorkflowInstance", reflect.TypeOf((*MockGatewayClient)(nil).CreateWorkflowInstance), _s...) } // DeployWorkflow mocks base method -func (m *MockGatewayClient) DeployWorkflow(arg0 context.Context, arg1 *pb.DeployWorkflowRequest, arg2 ...grpc.CallOption) (*pb.DeployWorkflowResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) DeployWorkflow(_param0 context.Context, _param1 *pb.DeployWorkflowRequest, _param2 ...grpc.CallOption) (*pb.DeployWorkflowResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "DeployWorkflow", varargs...) + ret := _m.ctrl.Call(_m, "DeployWorkflow", _s...) ret0, _ := ret[0].(*pb.DeployWorkflowResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // DeployWorkflow indicates an expected call of DeployWorkflow -func (mr *MockGatewayClientMockRecorder) DeployWorkflow(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeployWorkflow", reflect.TypeOf((*MockGatewayClient)(nil).DeployWorkflow), varargs...) +func (_mr *MockGatewayClientMockRecorder) DeployWorkflow(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "DeployWorkflow", reflect.TypeOf((*MockGatewayClient)(nil).DeployWorkflow), _s...) } // FailJob mocks base method -func (m *MockGatewayClient) FailJob(arg0 context.Context, arg1 *pb.FailJobRequest, arg2 ...grpc.CallOption) (*pb.FailJobResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) FailJob(_param0 context.Context, _param1 *pb.FailJobRequest, _param2 ...grpc.CallOption) (*pb.FailJobResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "FailJob", varargs...) + ret := _m.ctrl.Call(_m, "FailJob", _s...) ret0, _ := ret[0].(*pb.FailJobResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // FailJob indicates an expected call of FailJob -func (mr *MockGatewayClientMockRecorder) FailJob(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FailJob", reflect.TypeOf((*MockGatewayClient)(nil).FailJob), varargs...) -} - -// GetWorkflow mocks base method -func (m *MockGatewayClient) GetWorkflow(arg0 context.Context, arg1 *pb.GetWorkflowRequest, arg2 ...grpc.CallOption) (*pb.GetWorkflowResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetWorkflow", varargs...) - ret0, _ := ret[0].(*pb.GetWorkflowResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetWorkflow indicates an expected call of GetWorkflow -func (mr *MockGatewayClientMockRecorder) GetWorkflow(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflow", reflect.TypeOf((*MockGatewayClient)(nil).GetWorkflow), varargs...) -} - -// ListWorkflows mocks base method -func (m *MockGatewayClient) ListWorkflows(arg0 context.Context, arg1 *pb.ListWorkflowsRequest, arg2 ...grpc.CallOption) (*pb.ListWorkflowsResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListWorkflows", varargs...) - ret0, _ := ret[0].(*pb.ListWorkflowsResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListWorkflows indicates an expected call of ListWorkflows -func (mr *MockGatewayClientMockRecorder) ListWorkflows(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListWorkflows", reflect.TypeOf((*MockGatewayClient)(nil).ListWorkflows), varargs...) +func (_mr *MockGatewayClientMockRecorder) FailJob(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "FailJob", reflect.TypeOf((*MockGatewayClient)(nil).FailJob), _s...) } // PublishMessage mocks base method -func (m *MockGatewayClient) PublishMessage(arg0 context.Context, arg1 *pb.PublishMessageRequest, arg2 ...grpc.CallOption) (*pb.PublishMessageResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) PublishMessage(_param0 context.Context, _param1 *pb.PublishMessageRequest, _param2 ...grpc.CallOption) (*pb.PublishMessageResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "PublishMessage", varargs...) + ret := _m.ctrl.Call(_m, "PublishMessage", _s...) ret0, _ := ret[0].(*pb.PublishMessageResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // PublishMessage indicates an expected call of PublishMessage -func (mr *MockGatewayClientMockRecorder) PublishMessage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishMessage", reflect.TypeOf((*MockGatewayClient)(nil).PublishMessage), varargs...) +func (_mr *MockGatewayClientMockRecorder) PublishMessage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "PublishMessage", reflect.TypeOf((*MockGatewayClient)(nil).PublishMessage), _s...) } // ResolveIncident mocks base method -func (m *MockGatewayClient) ResolveIncident(arg0 context.Context, arg1 *pb.ResolveIncidentRequest, arg2 ...grpc.CallOption) (*pb.ResolveIncidentResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) ResolveIncident(_param0 context.Context, _param1 *pb.ResolveIncidentRequest, _param2 ...grpc.CallOption) (*pb.ResolveIncidentResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "ResolveIncident", varargs...) + ret := _m.ctrl.Call(_m, "ResolveIncident", _s...) ret0, _ := ret[0].(*pb.ResolveIncidentResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ResolveIncident indicates an expected call of ResolveIncident -func (mr *MockGatewayClientMockRecorder) ResolveIncident(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveIncident", reflect.TypeOf((*MockGatewayClient)(nil).ResolveIncident), varargs...) +func (_mr *MockGatewayClientMockRecorder) ResolveIncident(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "ResolveIncident", reflect.TypeOf((*MockGatewayClient)(nil).ResolveIncident), _s...) } // SetVariables mocks base method -func (m *MockGatewayClient) SetVariables(arg0 context.Context, arg1 *pb.SetVariablesRequest, arg2 ...grpc.CallOption) (*pb.SetVariablesResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) SetVariables(_param0 context.Context, _param1 *pb.SetVariablesRequest, _param2 ...grpc.CallOption) (*pb.SetVariablesResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "SetVariables", varargs...) + ret := _m.ctrl.Call(_m, "SetVariables", _s...) ret0, _ := ret[0].(*pb.SetVariablesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // SetVariables indicates an expected call of SetVariables -func (mr *MockGatewayClientMockRecorder) SetVariables(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVariables", reflect.TypeOf((*MockGatewayClient)(nil).SetVariables), varargs...) +func (_mr *MockGatewayClientMockRecorder) SetVariables(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "SetVariables", reflect.TypeOf((*MockGatewayClient)(nil).SetVariables), _s...) } // Topology mocks base method -func (m *MockGatewayClient) Topology(arg0 context.Context, arg1 *pb.TopologyRequest, arg2 ...grpc.CallOption) (*pb.TopologyResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) Topology(_param0 context.Context, _param1 *pb.TopologyRequest, _param2 ...grpc.CallOption) (*pb.TopologyResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "Topology", varargs...) + ret := _m.ctrl.Call(_m, "Topology", _s...) ret0, _ := ret[0].(*pb.TopologyResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // Topology indicates an expected call of Topology -func (mr *MockGatewayClientMockRecorder) Topology(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Topology", reflect.TypeOf((*MockGatewayClient)(nil).Topology), varargs...) +func (_mr *MockGatewayClientMockRecorder) Topology(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "Topology", reflect.TypeOf((*MockGatewayClient)(nil).Topology), _s...) } // UpdateJobRetries mocks base method -func (m *MockGatewayClient) UpdateJobRetries(arg0 context.Context, arg1 *pb.UpdateJobRetriesRequest, arg2 ...grpc.CallOption) (*pb.UpdateJobRetriesResponse, error) { - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) +func (_m *MockGatewayClient) UpdateJobRetries(_param0 context.Context, _param1 *pb.UpdateJobRetriesRequest, _param2 ...grpc.CallOption) (*pb.UpdateJobRetriesResponse, error) { + _s := []interface{}{_param0, _param1} + for _, _x := range _param2 { + _s = append(_s, _x) } - ret := m.ctrl.Call(m, "UpdateJobRetries", varargs...) + ret := _m.ctrl.Call(_m, "UpdateJobRetries", _s...) ret0, _ := ret[0].(*pb.UpdateJobRetriesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // UpdateJobRetries indicates an expected call of UpdateJobRetries -func (mr *MockGatewayClientMockRecorder) UpdateJobRetries(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateJobRetries", reflect.TypeOf((*MockGatewayClient)(nil).UpdateJobRetries), varargs...) +func (_mr *MockGatewayClientMockRecorder) UpdateJobRetries(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + _s := append([]interface{}{arg0, arg1}, arg2...) + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "UpdateJobRetries", reflect.TypeOf((*MockGatewayClient)(nil).UpdateJobRetries), _s...) } // MockGateway_ActivateJobsClient is a mock of Gateway_ActivateJobsClient interface @@ -289,92 +252,92 @@ func NewMockGateway_ActivateJobsClient(ctrl *gomock.Controller) *MockGateway_Act } // EXPECT returns an object that allows the caller to indicate expected use -func (m *MockGateway_ActivateJobsClient) EXPECT() *MockGateway_ActivateJobsClientMockRecorder { - return m.recorder +func (_m *MockGateway_ActivateJobsClient) EXPECT() *MockGateway_ActivateJobsClientMockRecorder { + return _m.recorder } // CloseSend mocks base method -func (m *MockGateway_ActivateJobsClient) CloseSend() error { - ret := m.ctrl.Call(m, "CloseSend") +func (_m *MockGateway_ActivateJobsClient) CloseSend() error { + ret := _m.ctrl.Call(_m, "CloseSend") ret0, _ := ret[0].(error) return ret0 } // CloseSend indicates an expected call of CloseSend -func (mr *MockGateway_ActivateJobsClientMockRecorder) CloseSend() *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).CloseSend)) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) CloseSend() *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "CloseSend", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).CloseSend)) } // Context mocks base method -func (m *MockGateway_ActivateJobsClient) Context() context.Context { - ret := m.ctrl.Call(m, "Context") +func (_m *MockGateway_ActivateJobsClient) Context() context.Context { + ret := _m.ctrl.Call(_m, "Context") ret0, _ := ret[0].(context.Context) return ret0 } // Context indicates an expected call of Context -func (mr *MockGateway_ActivateJobsClientMockRecorder) Context() *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Context)) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) Context() *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "Context", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Context)) } // Header mocks base method -func (m *MockGateway_ActivateJobsClient) Header() (metadata.MD, error) { - ret := m.ctrl.Call(m, "Header") +func (_m *MockGateway_ActivateJobsClient) Header() (metadata.MD, error) { + ret := _m.ctrl.Call(_m, "Header") ret0, _ := ret[0].(metadata.MD) ret1, _ := ret[1].(error) return ret0, ret1 } // Header indicates an expected call of Header -func (mr *MockGateway_ActivateJobsClientMockRecorder) Header() *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Header)) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) Header() *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "Header", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Header)) } // Recv mocks base method -func (m *MockGateway_ActivateJobsClient) Recv() (*pb.ActivateJobsResponse, error) { - ret := m.ctrl.Call(m, "Recv") +func (_m *MockGateway_ActivateJobsClient) Recv() (*pb.ActivateJobsResponse, error) { + ret := _m.ctrl.Call(_m, "Recv") ret0, _ := ret[0].(*pb.ActivateJobsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // Recv indicates an expected call of Recv -func (mr *MockGateway_ActivateJobsClientMockRecorder) Recv() *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Recv)) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) Recv() *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "Recv", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Recv)) } // RecvMsg mocks base method -func (m *MockGateway_ActivateJobsClient) RecvMsg(arg0 interface{}) error { - ret := m.ctrl.Call(m, "RecvMsg", arg0) +func (_m *MockGateway_ActivateJobsClient) RecvMsg(_param0 interface{}) error { + ret := _m.ctrl.Call(_m, "RecvMsg", _param0) ret0, _ := ret[0].(error) return ret0 } // RecvMsg indicates an expected call of RecvMsg -func (mr *MockGateway_ActivateJobsClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).RecvMsg), arg0) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "RecvMsg", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).RecvMsg), arg0) } // SendMsg mocks base method -func (m *MockGateway_ActivateJobsClient) SendMsg(arg0 interface{}) error { - ret := m.ctrl.Call(m, "SendMsg", arg0) +func (_m *MockGateway_ActivateJobsClient) SendMsg(_param0 interface{}) error { + ret := _m.ctrl.Call(_m, "SendMsg", _param0) ret0, _ := ret[0].(error) return ret0 } // SendMsg indicates an expected call of SendMsg -func (mr *MockGateway_ActivateJobsClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).SendMsg), arg0) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "SendMsg", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).SendMsg), arg0) } // Trailer mocks base method -func (m *MockGateway_ActivateJobsClient) Trailer() metadata.MD { - ret := m.ctrl.Call(m, "Trailer") +func (_m *MockGateway_ActivateJobsClient) Trailer() metadata.MD { + ret := _m.ctrl.Call(_m, "Trailer") ret0, _ := ret[0].(metadata.MD) return ret0 } // Trailer indicates an expected call of Trailer -func (mr *MockGateway_ActivateJobsClientMockRecorder) Trailer() *gomock.Call { - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Trailer)) +func (_mr *MockGateway_ActivateJobsClientMockRecorder) Trailer() *gomock.Call { + return _mr.mock.ctrl.RecordCallWithMethodType(_mr.mock, "Trailer", reflect.TypeOf((*MockGateway_ActivateJobsClient)(nil).Trailer)) } diff --git a/clients/go/pb/gateway.pb.go b/clients/go/pb/gateway.pb.go index 07671d292638..356b5ed3421d 100644 --- a/clients/go/pb/gateway.pb.go +++ b/clients/go/pb/gateway.pb.go @@ -77,7 +77,7 @@ func (x Partition_PartitionBrokerRole) String() string { } func (Partition_PartitionBrokerRole) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{27, 0} + return fileDescriptor_f1a937782ebbded5, []int{23, 0} } type ActivateJobsRequest struct { @@ -991,223 +991,6 @@ func (m *FailJobResponse) XXX_DiscardUnknown() { var xxx_messageInfo_FailJobResponse proto.InternalMessageInfo -type GetWorkflowRequest struct { - // the unique key identifying the workflow definition (e.g. returned from a workflow in - // the DeployWorkflowResponse message) - WorkflowKey int64 `protobuf:"varint,1,opt,name=workflowKey,proto3" json:"workflowKey,omitempty"` - // the version of the process; set to -1 to use the latest version - Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - // the BPMN process ID of the workflow definition - BpmnProcessId string `protobuf:"bytes,3,opt,name=bpmnProcessId,proto3" json:"bpmnProcessId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetWorkflowRequest) Reset() { *m = GetWorkflowRequest{} } -func (m *GetWorkflowRequest) String() string { return proto.CompactTextString(m) } -func (*GetWorkflowRequest) ProtoMessage() {} -func (*GetWorkflowRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{16} -} - -func (m *GetWorkflowRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetWorkflowRequest.Unmarshal(m, b) -} -func (m *GetWorkflowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetWorkflowRequest.Marshal(b, m, deterministic) -} -func (m *GetWorkflowRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetWorkflowRequest.Merge(m, src) -} -func (m *GetWorkflowRequest) XXX_Size() int { - return xxx_messageInfo_GetWorkflowRequest.Size(m) -} -func (m *GetWorkflowRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetWorkflowRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetWorkflowRequest proto.InternalMessageInfo - -func (m *GetWorkflowRequest) GetWorkflowKey() int64 { - if m != nil { - return m.WorkflowKey - } - return 0 -} - -func (m *GetWorkflowRequest) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *GetWorkflowRequest) GetBpmnProcessId() string { - if m != nil { - return m.BpmnProcessId - } - return "" -} - -type GetWorkflowResponse struct { - // the unique key identifying the workflow definition (e.g. returned from a workflow in - // the DeployWorkflowResponse message) - WorkflowKey int64 `protobuf:"varint,1,opt,name=workflowKey,proto3" json:"workflowKey,omitempty"` - // the version of the process - Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - // the BPMN process ID of the workflow definition - BpmnProcessId string `protobuf:"bytes,3,opt,name=bpmnProcessId,proto3" json:"bpmnProcessId,omitempty"` - // the name of the resource used to deployed the workflow - ResourceName string `protobuf:"bytes,4,opt,name=resourceName,proto3" json:"resourceName,omitempty"` - // a BPMN XML representation of the workflow - BpmnXml string `protobuf:"bytes,5,opt,name=bpmnXml,proto3" json:"bpmnXml,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetWorkflowResponse) Reset() { *m = GetWorkflowResponse{} } -func (m *GetWorkflowResponse) String() string { return proto.CompactTextString(m) } -func (*GetWorkflowResponse) ProtoMessage() {} -func (*GetWorkflowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{17} -} - -func (m *GetWorkflowResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetWorkflowResponse.Unmarshal(m, b) -} -func (m *GetWorkflowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetWorkflowResponse.Marshal(b, m, deterministic) -} -func (m *GetWorkflowResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetWorkflowResponse.Merge(m, src) -} -func (m *GetWorkflowResponse) XXX_Size() int { - return xxx_messageInfo_GetWorkflowResponse.Size(m) -} -func (m *GetWorkflowResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetWorkflowResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetWorkflowResponse proto.InternalMessageInfo - -func (m *GetWorkflowResponse) GetWorkflowKey() int64 { - if m != nil { - return m.WorkflowKey - } - return 0 -} - -func (m *GetWorkflowResponse) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *GetWorkflowResponse) GetBpmnProcessId() string { - if m != nil { - return m.BpmnProcessId - } - return "" -} - -func (m *GetWorkflowResponse) GetResourceName() string { - if m != nil { - return m.ResourceName - } - return "" -} - -func (m *GetWorkflowResponse) GetBpmnXml() string { - if m != nil { - return m.BpmnXml - } - return "" -} - -type ListWorkflowsRequest struct { - // optional filter: if specified, only the workflows with this given process ID will be - // returned - BpmnProcessId string `protobuf:"bytes,1,opt,name=bpmnProcessId,proto3" json:"bpmnProcessId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListWorkflowsRequest) Reset() { *m = ListWorkflowsRequest{} } -func (m *ListWorkflowsRequest) String() string { return proto.CompactTextString(m) } -func (*ListWorkflowsRequest) ProtoMessage() {} -func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{18} -} - -func (m *ListWorkflowsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListWorkflowsRequest.Unmarshal(m, b) -} -func (m *ListWorkflowsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListWorkflowsRequest.Marshal(b, m, deterministic) -} -func (m *ListWorkflowsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListWorkflowsRequest.Merge(m, src) -} -func (m *ListWorkflowsRequest) XXX_Size() int { - return xxx_messageInfo_ListWorkflowsRequest.Size(m) -} -func (m *ListWorkflowsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListWorkflowsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListWorkflowsRequest proto.InternalMessageInfo - -func (m *ListWorkflowsRequest) GetBpmnProcessId() string { - if m != nil { - return m.BpmnProcessId - } - return "" -} - -type ListWorkflowsResponse struct { - // a list of deployed workflows matching the request criteria (if any) - Workflows []*WorkflowMetadata `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListWorkflowsResponse) Reset() { *m = ListWorkflowsResponse{} } -func (m *ListWorkflowsResponse) String() string { return proto.CompactTextString(m) } -func (*ListWorkflowsResponse) ProtoMessage() {} -func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{19} -} - -func (m *ListWorkflowsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListWorkflowsResponse.Unmarshal(m, b) -} -func (m *ListWorkflowsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListWorkflowsResponse.Marshal(b, m, deterministic) -} -func (m *ListWorkflowsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListWorkflowsResponse.Merge(m, src) -} -func (m *ListWorkflowsResponse) XXX_Size() int { - return xxx_messageInfo_ListWorkflowsResponse.Size(m) -} -func (m *ListWorkflowsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListWorkflowsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListWorkflowsResponse proto.InternalMessageInfo - -func (m *ListWorkflowsResponse) GetWorkflows() []*WorkflowMetadata { - if m != nil { - return m.Workflows - } - return nil -} - type PublishMessageRequest struct { // the name of the message Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1230,7 +1013,7 @@ func (m *PublishMessageRequest) Reset() { *m = PublishMessageRequest{} } func (m *PublishMessageRequest) String() string { return proto.CompactTextString(m) } func (*PublishMessageRequest) ProtoMessage() {} func (*PublishMessageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{20} + return fileDescriptor_f1a937782ebbded5, []int{16} } func (m *PublishMessageRequest) XXX_Unmarshal(b []byte) error { @@ -1296,7 +1079,7 @@ func (m *PublishMessageResponse) Reset() { *m = PublishMessageResponse{} func (m *PublishMessageResponse) String() string { return proto.CompactTextString(m) } func (*PublishMessageResponse) ProtoMessage() {} func (*PublishMessageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{21} + return fileDescriptor_f1a937782ebbded5, []int{17} } func (m *PublishMessageResponse) XXX_Unmarshal(b []byte) error { @@ -1329,7 +1112,7 @@ func (m *ResolveIncidentRequest) Reset() { *m = ResolveIncidentRequest{} func (m *ResolveIncidentRequest) String() string { return proto.CompactTextString(m) } func (*ResolveIncidentRequest) ProtoMessage() {} func (*ResolveIncidentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{22} + return fileDescriptor_f1a937782ebbded5, []int{18} } func (m *ResolveIncidentRequest) XXX_Unmarshal(b []byte) error { @@ -1367,7 +1150,7 @@ func (m *ResolveIncidentResponse) Reset() { *m = ResolveIncidentResponse func (m *ResolveIncidentResponse) String() string { return proto.CompactTextString(m) } func (*ResolveIncidentResponse) ProtoMessage() {} func (*ResolveIncidentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{23} + return fileDescriptor_f1a937782ebbded5, []int{19} } func (m *ResolveIncidentResponse) XXX_Unmarshal(b []byte) error { @@ -1398,7 +1181,7 @@ func (m *TopologyRequest) Reset() { *m = TopologyRequest{} } func (m *TopologyRequest) String() string { return proto.CompactTextString(m) } func (*TopologyRequest) ProtoMessage() {} func (*TopologyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{24} + return fileDescriptor_f1a937782ebbded5, []int{20} } func (m *TopologyRequest) XXX_Unmarshal(b []byte) error { @@ -1437,7 +1220,7 @@ func (m *TopologyResponse) Reset() { *m = TopologyResponse{} } func (m *TopologyResponse) String() string { return proto.CompactTextString(m) } func (*TopologyResponse) ProtoMessage() {} func (*TopologyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{25} + return fileDescriptor_f1a937782ebbded5, []int{21} } func (m *TopologyResponse) XXX_Unmarshal(b []byte) error { @@ -1504,7 +1287,7 @@ func (m *BrokerInfo) Reset() { *m = BrokerInfo{} } func (m *BrokerInfo) String() string { return proto.CompactTextString(m) } func (*BrokerInfo) ProtoMessage() {} func (*BrokerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{26} + return fileDescriptor_f1a937782ebbded5, []int{22} } func (m *BrokerInfo) XXX_Unmarshal(b []byte) error { @@ -1567,7 +1350,7 @@ func (m *Partition) Reset() { *m = Partition{} } func (m *Partition) String() string { return proto.CompactTextString(m) } func (*Partition) ProtoMessage() {} func (*Partition) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{27} + return fileDescriptor_f1a937782ebbded5, []int{23} } func (m *Partition) XXX_Unmarshal(b []byte) error { @@ -1616,7 +1399,7 @@ func (m *UpdateJobRetriesRequest) Reset() { *m = UpdateJobRetriesRequest func (m *UpdateJobRetriesRequest) String() string { return proto.CompactTextString(m) } func (*UpdateJobRetriesRequest) ProtoMessage() {} func (*UpdateJobRetriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{28} + return fileDescriptor_f1a937782ebbded5, []int{24} } func (m *UpdateJobRetriesRequest) XXX_Unmarshal(b []byte) error { @@ -1661,7 +1444,7 @@ func (m *UpdateJobRetriesResponse) Reset() { *m = UpdateJobRetriesRespon func (m *UpdateJobRetriesResponse) String() string { return proto.CompactTextString(m) } func (*UpdateJobRetriesResponse) ProtoMessage() {} func (*UpdateJobRetriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{29} + return fileDescriptor_f1a937782ebbded5, []int{25} } func (m *UpdateJobRetriesResponse) XXX_Unmarshal(b []byte) error { @@ -1707,7 +1490,7 @@ func (m *SetVariablesRequest) Reset() { *m = SetVariablesRequest{} } func (m *SetVariablesRequest) String() string { return proto.CompactTextString(m) } func (*SetVariablesRequest) ProtoMessage() {} func (*SetVariablesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{30} + return fileDescriptor_f1a937782ebbded5, []int{26} } func (m *SetVariablesRequest) XXX_Unmarshal(b []byte) error { @@ -1759,7 +1542,7 @@ func (m *SetVariablesResponse) Reset() { *m = SetVariablesResponse{} } func (m *SetVariablesResponse) String() string { return proto.CompactTextString(m) } func (*SetVariablesResponse) ProtoMessage() {} func (*SetVariablesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{31} + return fileDescriptor_f1a937782ebbded5, []int{27} } func (m *SetVariablesResponse) XXX_Unmarshal(b []byte) error { @@ -1799,10 +1582,6 @@ func init() { proto.RegisterType((*WorkflowMetadata)(nil), "gateway_protocol.WorkflowMetadata") proto.RegisterType((*FailJobRequest)(nil), "gateway_protocol.FailJobRequest") proto.RegisterType((*FailJobResponse)(nil), "gateway_protocol.FailJobResponse") - proto.RegisterType((*GetWorkflowRequest)(nil), "gateway_protocol.GetWorkflowRequest") - proto.RegisterType((*GetWorkflowResponse)(nil), "gateway_protocol.GetWorkflowResponse") - proto.RegisterType((*ListWorkflowsRequest)(nil), "gateway_protocol.ListWorkflowsRequest") - proto.RegisterType((*ListWorkflowsResponse)(nil), "gateway_protocol.ListWorkflowsResponse") proto.RegisterType((*PublishMessageRequest)(nil), "gateway_protocol.PublishMessageRequest") proto.RegisterType((*PublishMessageResponse)(nil), "gateway_protocol.PublishMessageResponse") proto.RegisterType((*ResolveIncidentRequest)(nil), "gateway_protocol.ResolveIncidentRequest") @@ -1820,98 +1599,92 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 1451 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x73, 0xdb, 0x44, - 0x14, 0xb7, 0xfc, 0x91, 0x8f, 0x17, 0x37, 0x71, 0x37, 0x89, 0xab, 0x9a, 0x36, 0xe3, 0xee, 0xf4, - 0xc3, 0x30, 0x1d, 0xb7, 0x13, 0x18, 0x0e, 0xd0, 0x43, 0xdb, 0x34, 0x69, 0x9d, 0x3a, 0x6d, 0x50, - 0x43, 0x4b, 0x19, 0x86, 0x8e, 0x24, 0x6f, 0x1a, 0x25, 0xb2, 0x56, 0x48, 0x72, 0x8a, 0x3b, 0xc3, - 0x8d, 0x0b, 0x57, 0x4e, 0xdc, 0x38, 0xf0, 0x07, 0xf4, 0x02, 0xc3, 0x1f, 0x00, 0x7f, 0x18, 0xb3, - 0xf2, 0xae, 0xbc, 0x92, 0xd6, 0x8e, 0x0b, 0xc3, 0x6d, 0xf7, 0xed, 0xdb, 0xf7, 0xf1, 0x7b, 0x4f, - 0xbf, 0x7d, 0x36, 0x9c, 0x7b, 0x6d, 0x46, 0xe4, 0x8d, 0x39, 0x6c, 0xfb, 0x01, 0x8d, 0x28, 0xaa, - 0xf1, 0xed, 0xab, 0x78, 0x6b, 0x53, 0x17, 0xbf, 0xd3, 0x60, 0xf5, 0x9e, 0x1d, 0x39, 0xa7, 0x66, - 0x44, 0x76, 0xa9, 0x15, 0x1a, 0xe4, 0xbb, 0x01, 0x09, 0x23, 0x84, 0xa0, 0x1c, 0x0d, 0x7d, 0xa2, - 0x6b, 0x4d, 0xad, 0xb5, 0x68, 0xc4, 0x6b, 0x54, 0x87, 0xb9, 0x37, 0x34, 0x38, 0x21, 0x81, 0x5e, - 0x8c, 0xa5, 0x7c, 0x87, 0x74, 0x98, 0x8f, 0x9c, 0x3e, 0xa1, 0x83, 0x48, 0x2f, 0x35, 0xb5, 0x56, - 0xc9, 0x10, 0x5b, 0x74, 0x13, 0xce, 0xf7, 0xcd, 0xef, 0x99, 0xdd, 0x03, 0x2a, 0xbc, 0xe8, 0xe5, - 0xa6, 0xd6, 0xaa, 0x18, 0xf9, 0x03, 0x74, 0x15, 0xce, 0x1d, 0x92, 0xc8, 0x3e, 0x7a, 0x6e, 0x06, - 0x8e, 0x69, 0xb9, 0x44, 0xaf, 0x34, 0x4b, 0xad, 0x45, 0x23, 0x2d, 0xc4, 0xbb, 0xb0, 0x96, 0x0e, - 0x38, 0xf4, 0xa9, 0x17, 0x12, 0xb4, 0x09, 0xe5, 0x63, 0x6a, 0x85, 0xba, 0xd6, 0x2c, 0xb5, 0x96, - 0x36, 0x37, 0xda, 0xd9, 0x54, 0xdb, 0xe2, 0x56, 0x6f, 0x97, 0x5a, 0x46, 0xac, 0x8b, 0x7f, 0x2c, - 0x42, 0x55, 0x16, 0xa3, 0x1a, 0x94, 0x4e, 0xc8, 0x30, 0xce, 0xba, 0x64, 0xb0, 0x65, 0x02, 0x44, - 0x51, 0x02, 0xe2, 0x0e, 0xc0, 0x31, 0xb5, 0x1e, 0x11, 0xb3, 0x47, 0x82, 0x30, 0xce, 0x79, 0x69, - 0xf3, 0x52, 0xde, 0xe1, 0x6e, 0xa2, 0x63, 0x48, 0xfa, 0x2c, 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7, 0xa9, - 0x24, 0x46, 0x4f, 0xa0, 0x96, 0xe5, 0x5e, 0xa4, 0x48, 0x7b, 0x02, 0xd9, 0x37, 0x3e, 0x9a, 0x45, - 0x55, 0x38, 0xbb, 0x7f, 0x05, 0x2e, 0x3a, 0xb4, 0xfd, 0x96, 0x10, 0x8b, 0xb4, 0x53, 0x7f, 0xa7, - 0xd9, 0xd4, 0xdd, 0x2f, 0x7c, 0x5d, 0xf4, 0x2d, 0x6b, 0x2e, 0xde, 0x7f, 0xfc, 0x4f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x05, 0xf3, 0xd5, 0xf7, 0x6f, 0x13, 0x00, 0x00, + // 1347 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x6f, 0xdb, 0xc6, + 0x16, 0x16, 0xf5, 0xb0, 0xe5, 0x63, 0xc5, 0x56, 0xc6, 0xb1, 0xc2, 0xe8, 0x26, 0x86, 0x32, 0x48, + 0x72, 0x75, 0x2f, 0x02, 0x25, 0x70, 0x8b, 0x2e, 0xda, 0x2c, 0x9a, 0x38, 0x76, 0x23, 0xc7, 0x4e, + 0x5c, 0xc6, 0x4d, 0xd0, 0xa2, 0x68, 0x40, 0x52, 0xc7, 0x31, 0x6d, 0x8a, 0xc3, 0x92, 0x94, 0x53, + 0x05, 0xe8, 0xae, 0x9b, 0x6e, 0xbb, 0xea, 0xae, 0x8b, 0xfe, 0x80, 0x6c, 0xfa, 0x0f, 0xda, 0xbf, + 0xd4, 0x7d, 0x31, 0xa3, 0x21, 0xc5, 0xc7, 0x48, 0x76, 0x0b, 0x74, 0xc7, 0x39, 0x73, 0xe6, 0x3c, + 0xbe, 0xf3, 0x94, 0xe0, 0xd2, 0x1b, 0x33, 0xc2, 0xb7, 0xe6, 0xb8, 0xe7, 0x07, 0x2c, 0x62, 0xa4, + 0x29, 0x8f, 0xaf, 0xc5, 0xd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8, 0x39, 0x80, 0x45, 0x39, 0x6f, + 0x48, 0xa7, 0xf8, 0x2c, 0x3b, 0xf2, 0xda, 0x37, 0xe7, 0x70, 0xa4, 0x0d, 0xcf, 0x36, 0x7f, 0x95, + 0xe1, 0xca, 0x79, 0xa6, 0x32, 0x7c, 0xc6, 0x1c, 0x29, 0x91, 0x63, 0x58, 0xcd, 0x4d, 0x03, 0xa2, + 0x78, 0xae, 0x1e, 0x36, 0xed, 0xff, 0x5d, 0x80, 0x33, 0xd1, 0xf4, 0x1a, 0x1a, 0xe9, 0x62, 0x53, + 0x15, 0x92, 0xa2, 0x0f, 0xa8, 0x0a, 0x49, 0x55, 0xb3, 0xb4, 0x44, 0x5e, 0x40, 0x3d, 0x9e, 0x54, + 0x44, 0x01, 0x71, 0x6e, 0xb2, 0xb5, 0xe9, 0x3c, 0x96, 0x44, 0xe8, 0x29, 0x34, 0xf3, 0x9d, 0x8b, + 0x28, 0xdc, 0x9e, 0xd1, 0x2a, 0xdb, 0xff, 0xbf, 0x08, 0x6b, 0xac, 0xec, 0xd1, 0x4d, 0xb8, 0xe6, + 0xb0, 0xde, 0x3b, 0x44, 0x0b, 0x7b, 0x99, 0xff, 0x30, 0x6c, 0xe6, 0x1e, 0x94, 0xbe, 0x2a, 0xfb, + 0x96, 0xb5, 0x20, 0xce, 0x1f, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0x53, 0xe4, 0x8b, 0x91, 0xe4, + 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2004,24 +1777,6 @@ type GatewayClient interface { //- the job is already in a failed state, i.e. ran out of retries FailJob(ctx context.Context, in *FailJobRequest, opts ...grpc.CallOption) (*FailJobResponse, error) // - //Fetches the workflow definition either by workflow key, or BPMN process ID and version. - //At least one of workflowKey or bpmnProcessId must be specified. - // - //Errors: - //NOT_FOUND: - //- no workflow with the given key exists (if workflowKey was given) - //- no workflow with the given process ID exists (if bpmnProcessId was given but version was -1) - //- no workflow with the given process ID and version exists (if both bpmnProcessId and version were given) - GetWorkflow(ctx context.Context, in *GetWorkflowRequest, opts ...grpc.CallOption) (*GetWorkflowResponse, error) - // - //Lists all workflows matching the request criteria currently deployed in the cluster. - // - //Errors: - //NOT_FOUND: - //- no workflows have been deployed yet (if no bpmnProcessId was given) - //- no workflow with the given process ID exists (if bpmnProcessId was given) - ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error) - // //Publishes a single message. Messages are published to specific partitions computed from their //correlation keys. // @@ -2150,24 +1905,6 @@ func (c *gatewayClient) FailJob(ctx context.Context, in *FailJobRequest, opts .. return out, nil } -func (c *gatewayClient) GetWorkflow(ctx context.Context, in *GetWorkflowRequest, opts ...grpc.CallOption) (*GetWorkflowResponse, error) { - out := new(GetWorkflowResponse) - err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/GetWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *gatewayClient) ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error) { - out := new(ListWorkflowsResponse) - err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/ListWorkflows", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *gatewayClient) PublishMessage(ctx context.Context, in *PublishMessageRequest, opts ...grpc.CallOption) (*PublishMessageResponse, error) { out := new(PublishMessageResponse) err := c.cc.Invoke(ctx, "/gateway_protocol.Gateway/PublishMessage", in, out, opts...) @@ -2293,24 +2030,6 @@ type GatewayServer interface { //- the job is already in a failed state, i.e. ran out of retries FailJob(context.Context, *FailJobRequest) (*FailJobResponse, error) // - //Fetches the workflow definition either by workflow key, or BPMN process ID and version. - //At least one of workflowKey or bpmnProcessId must be specified. - // - //Errors: - //NOT_FOUND: - //- no workflow with the given key exists (if workflowKey was given) - //- no workflow with the given process ID exists (if bpmnProcessId was given but version was -1) - //- no workflow with the given process ID and version exists (if both bpmnProcessId and version were given) - GetWorkflow(context.Context, *GetWorkflowRequest) (*GetWorkflowResponse, error) - // - //Lists all workflows matching the request criteria currently deployed in the cluster. - // - //Errors: - //NOT_FOUND: - //- no workflows have been deployed yet (if no bpmnProcessId was given) - //- no workflow with the given process ID exists (if bpmnProcessId was given) - ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error) - // //Publishes a single message. Messages are published to specific partitions computed from their //correlation keys. // @@ -2376,12 +2095,6 @@ func (*UnimplementedGatewayServer) DeployWorkflow(ctx context.Context, req *Depl func (*UnimplementedGatewayServer) FailJob(ctx context.Context, req *FailJobRequest) (*FailJobResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FailJob not implemented") } -func (*UnimplementedGatewayServer) GetWorkflow(ctx context.Context, req *GetWorkflowRequest) (*GetWorkflowResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflow not implemented") -} -func (*UnimplementedGatewayServer) ListWorkflows(ctx context.Context, req *ListWorkflowsRequest) (*ListWorkflowsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkflows not implemented") -} func (*UnimplementedGatewayServer) PublishMessage(ctx context.Context, req *PublishMessageRequest) (*PublishMessageResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PublishMessage not implemented") } @@ -2513,42 +2226,6 @@ func _Gateway_FailJob_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Gateway_GetWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GatewayServer).GetWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gateway_protocol.Gateway/GetWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GatewayServer).GetWorkflow(ctx, req.(*GetWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Gateway_ListWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkflowsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GatewayServer).ListWorkflows(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/gateway_protocol.Gateway/ListWorkflows", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GatewayServer).ListWorkflows(ctx, req.(*ListWorkflowsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Gateway_PublishMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PublishMessageRequest) if err := dec(in); err != nil { @@ -2663,14 +2340,6 @@ var _Gateway_serviceDesc = grpc.ServiceDesc{ MethodName: "FailJob", Handler: _Gateway_FailJob_Handler, }, - { - MethodName: "GetWorkflow", - Handler: _Gateway_GetWorkflow_Handler, - }, - { - MethodName: "ListWorkflows", - Handler: _Gateway_ListWorkflows_Handler, - }, { MethodName: "PublishMessage", Handler: _Gateway_PublishMessage_Handler, diff --git a/clients/java/src/main/java/io/zeebe/client/api/response/ActivatedJob.java b/clients/java/src/main/java/io/zeebe/client/api/response/ActivatedJob.java index 569a4b55f748..72a632ce51f9 100644 --- a/clients/java/src/main/java/io/zeebe/client/api/response/ActivatedJob.java +++ b/clients/java/src/main/java/io/zeebe/client/api/response/ActivatedJob.java @@ -33,7 +33,7 @@ public interface ActivatedJob { JobHeaders getHeaders(); /** @return user-defined headers associated with this job */ - Map getCustomHeaders(); + Map getCustomHeaders(); /** @return the assigned worker to complete the job */ String getWorker(); diff --git a/clients/java/src/main/java/io/zeebe/client/impl/ZeebeObjectMapper.java b/clients/java/src/main/java/io/zeebe/client/impl/ZeebeObjectMapper.java index da7dd479f5a5..d5f9385f6098 100644 --- a/clients/java/src/main/java/io/zeebe/client/impl/ZeebeObjectMapper.java +++ b/clients/java/src/main/java/io/zeebe/client/impl/ZeebeObjectMapper.java @@ -28,6 +28,9 @@ public class ZeebeObjectMapper extends ObjectMapper { private static final TypeReference> MAP_TYPE_REFERENCE = new TypeReference>() {}; + private static final TypeReference> STRING_MAP_TYPE_REFERENCE = + new TypeReference>() {}; + public T fromJson(String json, Class typeClass) { try { return readValue(json, typeClass); @@ -46,6 +49,15 @@ public Map fromJsonAsMap(String json) { } } + public Map fromJsonAsStringMap(String json) { + try { + return readValue(json, STRING_MAP_TYPE_REFERENCE); + } catch (IOException e) { + throw new InternalClientException( + String.format("Failed to deserialize json '%s' to 'Map'", json), e); + } + } + public String toJson(Object value) { try { return writeValueAsString(value); diff --git a/clients/java/src/main/java/io/zeebe/client/impl/response/ActivatedJobImpl.java b/clients/java/src/main/java/io/zeebe/client/impl/response/ActivatedJobImpl.java index 4ffcb6d87fa6..806549257aa8 100644 --- a/clients/java/src/main/java/io/zeebe/client/impl/response/ActivatedJobImpl.java +++ b/clients/java/src/main/java/io/zeebe/client/impl/response/ActivatedJobImpl.java @@ -29,7 +29,7 @@ public class ActivatedJobImpl implements ActivatedJob { private final long key; private final String type; private final JobHeaders headers; - private final Map customHeaders; + private final Map customHeaders; private final String worker; private final int retries; private final long deadline; @@ -41,7 +41,7 @@ public ActivatedJobImpl(ZeebeObjectMapper objectMapper, GatewayOuterClass.Activa key = job.getKey(); type = job.getType(); headers = new JobHeadersImpl(job.getJobHeaders()); - customHeaders = objectMapper.fromJsonAsMap(job.getCustomHeaders()); + customHeaders = objectMapper.fromJsonAsStringMap(job.getCustomHeaders()); worker = job.getWorker(); retries = job.getRetries(); deadline = job.getDeadline(); @@ -64,7 +64,7 @@ public JobHeaders getHeaders() { } @Override - public Map getCustomHeaders() { + public Map getCustomHeaders() { return customHeaders; } diff --git a/clients/java/src/test/java/io/zeebe/client/job/ActivateJobsTest.java b/clients/java/src/test/java/io/zeebe/client/job/ActivateJobsTest.java index 801ed1dc63d4..177dbaf9f842 100644 --- a/clients/java/src/test/java/io/zeebe/client/job/ActivateJobsTest.java +++ b/clients/java/src/test/java/io/zeebe/client/job/ActivateJobsTest.java @@ -49,7 +49,7 @@ public void shouldActivateJobs() { .setKey(12) .setType("foo") .setJobHeaders(jobHeaders1) - .setCustomHeaders("{\"version\": 1}") + .setCustomHeaders("{\"version\": \"1\"}") .setWorker("worker1") .setRetries(34) .setDeadline(1231) diff --git a/engine/src/test/java/io/zeebe/engine/processor/workflow/instance/WorkflowInstanceFunctionalTest.java b/engine/src/test/java/io/zeebe/engine/processor/workflow/instance/WorkflowInstanceFunctionalTest.java index fb9fde99d3e7..323190a7a12d 100644 --- a/engine/src/test/java/io/zeebe/engine/processor/workflow/instance/WorkflowInstanceFunctionalTest.java +++ b/engine/src/test/java/io/zeebe/engine/processor/workflow/instance/WorkflowInstanceFunctionalTest.java @@ -337,7 +337,7 @@ public void shouldCreateJobWithWorkflowInstanceAndCustomHeaders() { .hasElementId(taskId) .hasWorkflowInstanceKey(workflowInstanceKey); - final Map customHeaders = event.getValue().getCustomHeaders(); + final Map customHeaders = event.getValue().getCustomHeaders(); assertThat(customHeaders).containsEntry("a", "b").containsEntry("c", "d"); } diff --git a/protocol-impl/src/main/java/io/zeebe/protocol/impl/encoding/MsgPackConverter.java b/protocol-impl/src/main/java/io/zeebe/protocol/impl/encoding/MsgPackConverter.java index 16cdf9fbb1e4..c2387b512197 100644 --- a/protocol-impl/src/main/java/io/zeebe/protocol/impl/encoding/MsgPackConverter.java +++ b/protocol-impl/src/main/java/io/zeebe/protocol/impl/encoding/MsgPackConverter.java @@ -42,8 +42,13 @@ import org.msgpack.jackson.dataformat.MessagePackFactory; public final class MsgPackConverter { + private static final JsonEncoding JSON_ENCODING = JsonEncoding.UTF8; private static final Charset JSON_CHARSET = StandardCharsets.UTF_8; + private static final TypeReference> OBJECT_MAP_TYPE_REFERENCE = + new TypeReference>() {}; + private static final TypeReference> STRING_MAP_TYPE_REFERENCE = + new TypeReference>() {}; /* * Extract from jackson doc: @@ -149,11 +154,18 @@ private static void convert( //////////////////////////////////////////////////////////////////////////////////////////////// public static Map convertToMap(DirectBuffer buffer) { + return convertToMap(OBJECT_MAP_TYPE_REFERENCE, buffer); + } + + public static Map convertToStringMap(DirectBuffer buffer) { + return convertToMap(STRING_MAP_TYPE_REFERENCE, buffer); + } + + private static Map convertToMap( + TypeReference> typeRef, DirectBuffer buffer) { final byte[] msgpackBytes = BufferUtil.bufferAsArray(buffer); final byte[] jsonBytes = convertToJsonBytes(new ByteArrayInputStream(msgpackBytes)); - final TypeReference> typeRef = - new TypeReference>() {}; try { return JSON_OBJECT_MAPPER.readValue(jsonBytes, typeRef); } catch (IOException e) { diff --git a/protocol-impl/src/main/java/io/zeebe/protocol/impl/record/value/job/JobRecord.java b/protocol-impl/src/main/java/io/zeebe/protocol/impl/record/value/job/JobRecord.java index d6abccf1dad5..6f004323089e 100644 --- a/protocol-impl/src/main/java/io/zeebe/protocol/impl/record/value/job/JobRecord.java +++ b/protocol-impl/src/main/java/io/zeebe/protocol/impl/record/value/job/JobRecord.java @@ -100,8 +100,8 @@ public Headers getHeaders() { } @Override - public Map getCustomHeaders() { - return MsgPackConverter.convertToMap(customHeadersProp.getValue()); + public Map getCustomHeaders() { + return MsgPackConverter.convertToStringMap(customHeadersProp.getValue()); } @Override diff --git a/protocol-impl/src/test/java/io/zeebe/protocol/impl/JsonSerializableToJsonTest.java b/protocol-impl/src/test/java/io/zeebe/protocol/impl/JsonSerializableToJsonTest.java index 5eb448faa03c..2e60f033ffd7 100644 --- a/protocol-impl/src/test/java/io/zeebe/protocol/impl/JsonSerializableToJsonTest.java +++ b/protocol-impl/src/test/java/io/zeebe/protocol/impl/JsonSerializableToJsonTest.java @@ -392,7 +392,7 @@ public static Object[][] records() { record.setCustomHeaders(wrapArray(MsgPackConverter.convertToMsgPack(customHeaders))); return record; }, - "{'headers':{'bpmnProcessId':'test-process','workflowKey':13,'workflowDefinitionVersion':12,'workflowInstanceKey':1234,'elementId':'activity','elementInstanceKey':123},'worker':'myWorker','type':'myType','variables':'{\"foo\":\"bar\"}','retries':12,'errorMessage':'failed message','customHeaders':{'workerVersion':42},'deadline':13}" + "{'headers':{'bpmnProcessId':'test-process','workflowKey':13,'workflowDefinitionVersion':12,'workflowInstanceKey':1234,'elementId':'activity','elementInstanceKey':123},'worker':'myWorker','type':'myType','variables':'{\"foo\":\"bar\"}','retries':12,'errorMessage':'failed message','customHeaders':{'workerVersion':\"42\"},'deadline':13}" }, ///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocol/src/main/java/io/zeebe/protocol/record/value/JobRecordValue.java b/protocol/src/main/java/io/zeebe/protocol/record/value/JobRecordValue.java index 49b1d8bb8eb3..18ae9aa85e0b 100644 --- a/protocol/src/main/java/io/zeebe/protocol/record/value/JobRecordValue.java +++ b/protocol/src/main/java/io/zeebe/protocol/record/value/JobRecordValue.java @@ -37,7 +37,7 @@ public interface JobRecordValue extends RecordValueWithVariables { Headers getHeaders(); /** @return user-defined headers associated with this job */ - Map getCustomHeaders(); + Map getCustomHeaders(); /** @return the assigned worker to complete the job */ String getWorker(); diff --git a/test-util/src/main/java/io/zeebe/test/util/record/JobRecordStream.java b/test-util/src/main/java/io/zeebe/test/util/record/JobRecordStream.java index 5848203f41dc..cc1d695ac0ad 100644 --- a/test-util/src/main/java/io/zeebe/test/util/record/JobRecordStream.java +++ b/test-util/src/main/java/io/zeebe/test/util/record/JobRecordStream.java @@ -41,11 +41,11 @@ public JobRecordStream withHeaders(final Headers headers) { return valueFilter(v -> headers.equals(v.getHeaders())); } - public JobRecordStream withCustomHeaders(final Map customHeaders) { + public JobRecordStream withCustomHeaders(final Map customHeaders) { return valueFilter(v -> customHeaders.equals(v.getCustomHeaders())); } - public JobRecordStream withCustomHeader(final String key, final Object value) { + public JobRecordStream withCustomHeader(final String key, final String value) { return valueFilter(v -> value.equals(v.getCustomHeaders().get(key))); }