Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Fixes #166

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -27,7 +27,7 @@ ext {
spectator : '1.3.7',
awsSsm : '1.12.300',
azureSsm : '4.2.3',
azureIdentity : '1.3.7',
azureIdentity : '1.12.2',
eureka : '1.10.17',
wiremock : '2.33.2',
ioGRPC : '1.63.1',
Expand Down Expand Up @@ -251,5 +251,5 @@ signing {
tasks.withType(Test) {
maxParallelForks = 1
}
sourceSets.main.java.srcDirs += ['example/java', 'example/resources']
sourceSets.main.java.srcDirs += ['examples/java', 'examples/resources']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

examples/resources is a resource dir, so it should be:

sourceSets.main.resources.srcDirs += ['examples/resources']

BUT, if you fix this, you must also exclude workflow.json, task_domain_wf.json from the generated jar.

This doesn't matter much at the moment because no example is actually using the resources programmatically.


2 changes: 1 addition & 1 deletion docs/workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class ConductorWorkers {
}
```

See [DynamicWorkflow](../../examples/java/io/orkes/conductor/sdk/DynamicWorkflow) for a fully functional example.
See [DynamicWorkflow](../../examples/java/io/orkes/conductor/sdk/dynamicworkflow) for a fully functional example.

### Kitchen-Sink Workflow

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

61 changes: 0 additions & 61 deletions examples/java/io/orkes/conductor/sdk/WorkflowTest.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,31 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.conductor.common.config.ObjectMapperProvider;
import com.netflix.conductor.common.metadata.tasks.TaskResult;
import com.netflix.conductor.common.metadata.tasks.TaskType;
import com.netflix.conductor.common.metadata.workflow.WorkflowDef;
import com.netflix.conductor.common.metadata.workflow.WorkflowTask;
import com.netflix.conductor.common.run.Workflow;
import com.netflix.conductor.common.run.WorkflowTestRequest;

import io.orkes.conductor.client.ApiClient;
import io.orkes.conductor.client.MetadataClient;
import io.orkes.conductor.client.OrkesClients;
import io.orkes.conductor.client.WorkflowClient;
import io.orkes.conductor.client.model.WorkflowTestRequest;


import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;



Expand Down Expand Up @@ -135,4 +136,3 @@ protected Map<String, List<WorkflowTestRequest.TaskMock>> getTestInputs(String p


}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import io.orkes.conductor.client.ApiClient;
import io.orkes.conductor.client.OrkesClients;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.util.Arrays;
import java.util.UUID;

import io.orkes.conductor.client.AuthorizationClient;
import io.orkes.conductor.client.OrkesClients;
import io.orkes.conductor.client.model.AuthorizationRequest;
import io.orkes.conductor.client.model.SubjectRef;
import io.orkes.conductor.client.model.TargetRef;
import io.orkes.conductor.client.model.UpsertGroupRequest;
import io.orkes.conductor.client.model.UpsertUserRequest;
import io.orkes.conductor.client.model.*;

/**
* Examples for managing user authorization in Orkes Conductor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
package io.orkes.conductor.sdk;
/*
* Copyright 2024 Orkes, Inc.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk.examples;

import java.time.Duration;

import com.netflix.conductor.sdk.workflow.def.ConductorWorkflow;
import com.netflix.conductor.sdk.workflow.def.tasks.*;
import com.netflix.conductor.sdk.workflow.executor.WorkflowExecutor;
import com.netflix.conductor.sdk.workflow.def.tasks.JQ;



import java.time.Duration;
import io.orkes.conductor.sdk.examples.helloworld.workflow.WorkflowInput;

public class KitchenSink {
private final WorkflowExecutor executor;
public GreetingsWorkflow(WorkflowExecutor executor) {
public KitchenSink(WorkflowExecutor executor) {
this.executor = executor;
}
public ConductorWorkflow<WorkflowInput> createWorkflow() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.util.Arrays;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import io.orkes.conductor.client.MetadataClient;
import io.orkes.conductor.client.OrkesClientException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
package io.orkes.conductor.sdk;
/*
* Copyright 2024 Orkes, Inc.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk.examples;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

import com.netflix.conductor.common.metadata.tasks.TaskDef;
import com.netflix.conductor.sdk.workflow.executor.WorkflowExecutor;

import io.orkes.conductor.client.MetadataClient;
import io.orkes.conductor.client.OrkesClients;
import io.orkes.conductor.client.TaskClient;
import io.orkes.conductor.client.WorkflowClient;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;


public class TaskConfigure {

Expand Down Expand Up @@ -49,4 +62,3 @@ public static void main(String[] args) throws ExecutionException, InterruptedExc

}
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.io.IOException;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.netflix.conductor.client.worker.Worker;
import com.netflix.conductor.common.metadata.tasks.Task;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package io.orkes.conductor.sdk;
package io.orkes.conductor.sdk.examples;

import java.util.Arrays;

Expand All @@ -19,7 +19,7 @@
import io.orkes.conductor.client.OrkesClients;
import io.orkes.conductor.client.WorkflowClient;

import static io.orkes.conductor.sdk.MetadataManagement.workflowDef;
import static io.orkes.conductor.sdk.examples.MetadataManagement.workflowDef;

/**
* Examples for managing Workflow operations in Conductor
Expand Down
Loading
Loading