Dynamic Activity Name

I have am using temporal-spring-boot-starter to run a workflow where the first Activity retrieves a list of Record objects [service_name, url, email].

For each Record I create and execute a new Activity:


        for (DeactivationRecord record : records) {
            ActivityOptions activityOptions = activityOptionsBuilder
                    .setSummary(format("Calling %s to deactivate %s", record.getUrl(), icn) )
                    .build();

            DynamicDeactivationActivity deactivationActivity =
                    Workflow.newActivityStub(DynamicDeactivationActivity.class, activityOptions);
            deactivationActivity.deactivateEndpoint(record.getUrl(), record.getNotificationEmail());
        }

How can I set the Activity name to include the service_name value from the Record object so that in the UI it appears as “Deactivation Activity for {service_name}”?

Setting summary in activity options is the way to go, I dont think you can change display of the activity type, but ui will display your summary which can include any info you need to set in the summary