Seems zigflow passes stale data to activity as input #212
-
|
Hi, I have a very simple activity: // filename GreetActivits.java
package helloworkflow;
import io.temporal.activity.ActivityInterface;
import io.temporal.activity.ActivityMethod;
@ActivityInterface
public interface GreetActivities {
@ActivityMethod
String dummy(String region);
}// filename GreetActivitsImpl.java
package helloworkflow;
import io.temporal.activity.Activity;
import io.temporal.activity.ActivityInfo;
import io.temporal.activity.ActivityExecutionContext;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
public class GreetActivitiesImpl implements GreetActivities {
@Override
public String dummy(String region){
System.out.printf("dummy: kicked off\n");
System.out.printf("dummy: region = %s\n", region);
return "";
}
}// filename: SayHelloWorker
package helloworkflow;
import io.temporal.client.WorkflowClient;
import io.temporal.serviceclient.WorkflowServiceStubs;
import io.temporal.worker.Worker;
import io.temporal.worker.WorkerFactory;
public class SayHelloWorker {
public static void main(String[] args) {
WorkflowServiceStubs service = WorkflowServiceStubs.newLocalServiceStubs();
WorkflowClient client = WorkflowClient.newInstance(service);
WorkerFactory factory = WorkerFactory.newInstance(client);
Worker worker = factory.newWorker("my-task-queue");
worker.registerActivitiesImplementations(new GreetActivitiesImpl());
System.out.println("Starting SayHelloWorker for task queue 'my-task-queue'...");
factory.start();
}
}I have dummy.yaml document:
dsl: 1.0.0
namespace: zigflow
name: DummyWorkflow
version: 1.0.0
do:
- DummyTask:
call: activity
with:
name: Dummy
arguments:
- ${ $input[0] }
taskQueue: my-task-queueI start the zigflow worker: Now I run kick off the workflow: temporal workflow start \
--type DummyWorkflow \
--workflow-id "workflow-$(uuidgen)" \
--task-queue zigflow \
--input '["ABC"]' Then I run it again, but set input to XYZ: temporal workflow start \
--type DummyWorkflow \
--workflow-id "workflow-$(uuidgen)" \
--task-queue zigflow \
--input '["XYZ"]' But surprisingly, I still see gets printed, not sure why zigflow invoke the dummy activity with stale input value. Any help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Yeah, I'm getting the same when I run that, which is odd. I'm going to experiment and see what's what. |
Beta Was this translation helpful? Give feedback.
-
|
There was a bug, fixed in #215. This will be released in v0.6.11 |
Beta Was this translation helpful? Give feedback.
There was a bug, fixed in #215. This will be released in v0.6.11