• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-java / #157

pending completion
#157

push

github-actions

web-flow
Provide SerializationContext for PayloadConverter and PayloadCodec (#1695)

Issue #1694

497 of 497 new or added lines in 32 files covered. (100.0%)

16942 of 20806 relevant lines covered (81.43%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/temporal-sdk/src/main/java/io/temporal/payload/context/WorkflowSerializationContext.java
1
/*
2
 * Copyright (C) 2022 Temporal Technologies, Inc. All Rights Reserved.
3
 *
4
 * Copyright (C) 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
 *
6
 * Modifications copyright (C) 2017 Uber Technologies, Inc.
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this material except in compliance with the License.
10
 * You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20

21
package io.temporal.payload.context;
22

23
import io.temporal.common.Experimental;
24
import javax.annotation.Nonnull;
25

26
@Experimental
27
public class WorkflowSerializationContext implements HasWorkflowSerializationContext {
28
  private final @Nonnull String namespace;
29
  private final @Nonnull String workflowId;
30
  // We can't currently reliably and consistency provide workflowType to the DataConverter.
31
  // 1. Signals and queries don't know workflowType when they are sent.
32
  // 2. WorkflowStub#getResult call is not aware of the workflowType, workflowType is an optional
33
  // parameter for a workflow stub that is not used to start a workflow.
34
  // private final @Nullable String workflowTypeName;
35

36
  public WorkflowSerializationContext(@Nonnull String namespace, @Nonnull String workflowId) {
1✔
37
    this.namespace = namespace;
1✔
38
    this.workflowId = workflowId;
1✔
39
  }
1✔
40

41
  @Override
42
  @Nonnull
43
  public String getNamespace() {
44
    return namespace;
×
45
  }
46

47
  @Override
48
  @Nonnull
49
  public String getWorkflowId() {
50
    return workflowId;
1✔
51
  }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc