Problem
Once ActivityType is declared it is not possible to change it’s registration options (including task list). Moreover, if we want to have a host/machine specific task list for an activity; this becomes tricky — requiring multiple task lists.
Solution
In your workflow implementation class; you can pass in the hostname (to the @Execute method); then just create ActivitySchedulingOptions and pass them to your activities clients; e.g.:
public class <YOUR>WorkflowImpl implements <YOUR>Workflow { ... @Execute(version = "0.0.4") public void process(String hostname) { ActivitySchedulingOptions options = new ActivitySchedulingOptions().withTaskList(hostname); <YOUR>activitiesClient.process(<ARGS>, options); // NOTE: options can be added as a last argument to any of the client's methods
keywords:
machine host specific tasklist simple workflow activitytype task list task list routing swf dynamic hostname