Skip to content

Commit

Permalink
Switch to newUntypedWorkflowStub (#39)
Browse files Browse the repository at this point in the history
* Switch to newUntypedWorkflowStub

* replace debug msg
  • Loading branch information
ElanHasson authored Apr 23, 2024
1 parent 5b622ee commit 5065a5a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ internal class TemporalEventListenerProvider(workflowClient: WorkflowClient, tas
)

val eventWorkflowStub = _workflowClient
.newWorkflowStub(
KeycloakEventWorkflow::class.java,
.newUntypedWorkflowStub(
"KeycloakEventWorkflow",
WorkflowOptions
.newBuilder()
.setTaskQueue(_taskQueue)
Expand All @@ -64,11 +64,11 @@ internal class TemporalEventListenerProvider(workflowClient: WorkflowClient, tas
_logger.debugf("Starting workflow %s", eventWorkflowStub)
}

val execution = WorkflowClient.start(eventWorkflowStub!!::send, eventParameter)
eventWorkflowStub.start(eventParameter)

if (_logger.isDebugEnabled)
{
_logger.debugf("Started workflow (workflowId=%s, runId=%s)", execution.workflowId, execution.runId)
_logger.debugf("Started workflow (workflowId=%s)", event.id)
}
} catch (e: Exception) {
_logger.errorf(e, "Error while starting workflow %s", eventWorkflowStub)
Expand Down Expand Up @@ -111,8 +111,8 @@ internal class TemporalEventListenerProvider(workflowClient: WorkflowClient, tas
)

val adminEventWorkflowStub = _workflowClient
.newWorkflowStub(
KeycloakAdminEventWorkflow::class.java,
.newUntypedWorkflowStub(
"KeycloakAdminEventWorkflow",
WorkflowOptions
.newBuilder()
.setTaskQueue(_taskQueue)
Expand All @@ -124,11 +124,11 @@ internal class TemporalEventListenerProvider(workflowClient: WorkflowClient, tas
_logger.debugf("Starting workflow %s", adminEventWorkflowStub)
}

val execution = WorkflowClient.start(adminEventWorkflowStub!!::send, eventParameter)
adminEventWorkflowStub.start(eventParameter)

if (_logger.isDebugEnabled)
{
_logger.debugf("Started workflow (workflowId=%s, runId=%s)", execution.workflowId, execution.runId)
_logger.debugf("Started workflow (workflowId=%s)", event.id)
}
} catch (e: Exception) {
_logger.errorf(e, "Error while starting workflow %s", adminEventWorkflowStub)
Expand Down

0 comments on commit 5065a5a

Please sign in to comment.