Skip to content

Commit

Permalink
feat: add task event input (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
thantos authored Sep 12, 2023
1 parent 622be75 commit cf37af3
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 98 deletions.
3 changes: 2 additions & 1 deletion packages/@eventual/cli/src/display/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export function displayEvent(event: WorkflowEvent) {
: []),
...("signalId" in event ? [`Signal Id: ${event.signalId}`] : []),
...((isChildWorkflowScheduled(event.event) ||
isTransactionRequest(event.event)) &&
isTransactionRequest(event.event) ||
isTaskScheduled(event.event)) &&
event.event.input
? [`Payload: ${JSON.stringify(event.event.input)}`]
: []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export class TaskCallEventualFactory implements EventualFactory<TaskCall> {
return {
name: call.name,
seq,
input: call.input,
type: WorkflowCallHistoryType.TaskScheduled,
};
},
Expand Down
3 changes: 2 additions & 1 deletion packages/@eventual/core-runtime/test/call-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ export function workflowFailed(error: any, seq: number): ChildWorkflowFailed {
};
}

export function taskScheduled(name: string, seq: number) {
export function taskScheduled(name: string, seq: number, input?: any) {
return callEvent<TaskScheduled>({
type: WorkflowCallHistoryType.TaskScheduled,
name,
seq,
input,
});
}

Expand Down
Loading

0 comments on commit cf37af3

Please sign in to comment.