Beispiel #1
0
        /// <inheritdoc/>
        public virtual async Task HandleAsync(V1WorkflowActivityCreatedDomainEvent e, CancellationToken cancellationToken = default)
        {
            var activity = await this.GetOrReconcileProjectionAsync(e.AggregateId, cancellationToken);

            await this.UpdateParentWorkflowInstanceAsync(activity, cancellationToken);

            await this.PublishIntegrationEventAsync(e, cancellationToken);
        }
        /// <inheritdoc/>
        public virtual async Task HandleAsync(V1WorkflowActivityCreatedDomainEvent e, CancellationToken cancellationToken = default)
        {
            var metrics = await this.GetOrCreateV1OperationalReportsForAsync(e.CreatedAt, cancellationToken);

            metrics.TotalActivities++;
            await this.OperationalReports.UpdateAsync(metrics, cancellationToken);

            await this.OperationalReports.SaveChangesAsync(cancellationToken);
        }
 /// <summary>
 /// Handles the specified <see cref="V1WorkflowActivityCreatedDomainEvent"/>
 /// </summary>
 /// <param name="e">The <see cref="V1WorkflowActivityCreatedDomainEvent"/> to handle</param>
 protected virtual void On(V1WorkflowActivityCreatedDomainEvent e)
 {
     this.Id                 = e.AggregateId;
     this.CreatedAt          = e.CreatedAt;
     this.LastModified       = e.CreatedAt;
     this.WorkflowInstanceId = e.WorkflowInstanceId;
     this.Type               = e.Type;
     this.Input              = e.Input;
     this.Metadata           = e.Metadata;
     this.ParentId           = e.ParentId;
 }