Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.phenoml.maven'

version = '10.0.0'
version = '10.1.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.phenoml.maven'
artifactId = 'phenoml-java-sdk'
version = '10.0.0'
version = '10.1.0'
from components.java
pom {
name = 'phenoml'
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 10.1.0 - 2026-03-11
* New optional `preview` parameter available on workflow execution requests. When enabled, create operations return mock resources instead of persisting to the FHIR server. The response also includes a `preview` field to indicate whether the workflow was executed in preview mode.

## 10.0.0 - 2026-03-11
* The `ErrorResponse` class has been removed from the summary types package. If your code references `com.phenoml.api.resources.summary.types.ErrorResponse`, you'll need to update your imports and error handling logic to use alternative error response types available in the SDK.

Expand Down
8 changes: 8 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5857,6 +5857,14 @@ client.workflows().execute(

**inputData:** `Map<String, Object>` — Input data for workflow execution

</dd>
</dl>

<dl>
<dd>

**preview:** `Optional<Boolean>` — If true, create operations return mock resources instead of persisting to the FHIR server

</dd>
</dl>
</dd>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/phenoml/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/10.0.0");
put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/10.1.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.phenoml.fern:api-sdk");
put("X-Fern-SDK-Version", "10.0.0");
put("X-Fern-SDK-Version", "10.1.0");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = ExecuteWorkflowRequest.Builder.class)
public final class ExecuteWorkflowRequest {
private final Map<String, Object> inputData;

private final Optional<Boolean> preview;

private final Map<String, Object> additionalProperties;

private ExecuteWorkflowRequest(Map<String, Object> inputData, Map<String, Object> additionalProperties) {
private ExecuteWorkflowRequest(
Map<String, Object> inputData, Optional<Boolean> preview, Map<String, Object> additionalProperties) {
this.inputData = inputData;
this.preview = preview;
this.additionalProperties = additionalProperties;
}

Expand All @@ -37,6 +42,14 @@ public Map<String, Object> getInputData() {
return inputData;
}

/**
* @return If true, create operations return mock resources instead of persisting to the FHIR server
*/
@JsonProperty("preview")
public Optional<Boolean> getPreview() {
return preview;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -49,12 +62,12 @@ public Map<String, Object> getAdditionalProperties() {
}

private boolean equalTo(ExecuteWorkflowRequest other) {
return inputData.equals(other.inputData);
return inputData.equals(other.inputData) && preview.equals(other.preview);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.inputData);
return Objects.hash(this.inputData, this.preview);
}

@java.lang.Override
Expand All @@ -70,13 +83,16 @@ public static Builder builder() {
public static final class Builder {
private Map<String, Object> inputData = new LinkedHashMap<>();

private Optional<Boolean> preview = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

private Builder() {}

public Builder from(ExecuteWorkflowRequest other) {
inputData(other.getInputData());
preview(other.getPreview());
return this;
}

Expand All @@ -102,8 +118,22 @@ public Builder inputData(String key, Object value) {
return this;
}

/**
* <p>If true, create operations return mock resources instead of persisting to the FHIR server</p>
*/
@JsonSetter(value = "preview", nulls = Nulls.SKIP)
public Builder preview(Optional<Boolean> preview) {
this.preview = preview;
return this;
}

public Builder preview(Boolean preview) {
this.preview = Optional.ofNullable(preview);
return this;
}

public ExecuteWorkflowRequest build() {
return new ExecuteWorkflowRequest(inputData, additionalProperties);
return new ExecuteWorkflowRequest(inputData, preview, additionalProperties);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ public final class ExecuteWorkflowResponse {

private final Optional<Results> results;

private final Optional<Boolean> preview;

private final Map<String, Object> additionalProperties;

private ExecuteWorkflowResponse(
Optional<Boolean> success,
Optional<String> message,
Optional<Results> results,
Optional<Boolean> preview,
Map<String, Object> additionalProperties) {
this.success = success;
this.message = message;
this.results = results;
this.preview = preview;
this.additionalProperties = additionalProperties;
}

Expand All @@ -60,6 +64,14 @@ public Optional<Results> getResults() {
return results;
}

/**
* @return Whether the workflow was executed in preview mode
*/
@JsonProperty("preview")
public Optional<Boolean> getPreview() {
return preview;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -72,12 +84,15 @@ public Map<String, Object> getAdditionalProperties() {
}

private boolean equalTo(ExecuteWorkflowResponse other) {
return success.equals(other.success) && message.equals(other.message) && results.equals(other.results);
return success.equals(other.success)
&& message.equals(other.message)
&& results.equals(other.results)
&& preview.equals(other.preview);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.success, this.message, this.results);
return Objects.hash(this.success, this.message, this.results, this.preview);
}

@java.lang.Override
Expand All @@ -97,6 +112,8 @@ public static final class Builder {

private Optional<Results> results = Optional.empty();

private Optional<Boolean> preview = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

Expand All @@ -106,6 +123,7 @@ public Builder from(ExecuteWorkflowResponse other) {
success(other.getSuccess());
message(other.getMessage());
results(other.getResults());
preview(other.getPreview());
return this;
}

Expand Down Expand Up @@ -148,8 +166,22 @@ public Builder results(Results results) {
return this;
}

/**
* <p>Whether the workflow was executed in preview mode</p>
*/
@JsonSetter(value = "preview", nulls = Nulls.SKIP)
public Builder preview(Optional<Boolean> preview) {
this.preview = preview;
return this;
}

public Builder preview(Boolean preview) {
this.preview = Optional.ofNullable(preview);
return this;
}

public ExecuteWorkflowResponse build() {
return new ExecuteWorkflowResponse(success, message, results, additionalProperties);
return new ExecuteWorkflowResponse(success, message, results, preview, additionalProperties);
}
}

Expand Down
Loading