/// <summary> /// Initializes a new <see cref="WorkflowRuntime"/> /// </summary> /// <param name="logger">The service used to perform logging</param> /// <param name="hostApplicationLifetime">The service used to handle the lifetime of the <see cref="WorkflowRuntime"/>'s host application</param> /// <param name="integrationEventBus">The service used to publish and subscribe to integration events</param> /// <param name="activityProcessorFactory">The service used to create <see cref="IWorkflowActivityProcessor"/>s</param> /// <param name="synapseRuntimeApi">The service used to interact with the Synapse Runtime API</param> /// <param name="context">The current <see cref="IWorkflowRuntimeContext"/></param> public WorkflowRuntime(ILogger <WorkflowRuntime> logger, IHostApplicationLifetime hostApplicationLifetime, IIntegrationEventBus integrationEventBus, IWorkflowActivityProcessorFactory activityProcessorFactory, ISynapseRuntimeApi synapseRuntimeApi, IWorkflowRuntimeContext context) { this.Logger = logger; this.HostApplicationLifetime = hostApplicationLifetime; this.IntegrationEventBus = integrationEventBus; this.ActivityProcessorFactory = activityProcessorFactory; this.RuntimeApi = synapseRuntimeApi; this.Context = context; this.CancellationTokenSource = null !; }
/// <summary> /// Initializes a new <see cref="WorkflowFacade"/> /// </summary> /// <param name="definition">The current workflow's <see cref="WorkflowDefinition"/></param> /// <param name="instance">The current <see cref="V1WorkflowInstance"/></param> /// <param name="synapseRuntimeApi">The service used to interact with the Synapse Runtime API</param> public WorkflowFacade(WorkflowDefinition definition, V1WorkflowInstance instance, ISynapseRuntimeApi synapseRuntimeApi) { this.Definition = definition; this.Instance = instance; this.SynapseRuntimeApi = synapseRuntimeApi; }
/// <summary> /// Initializes a new <see cref="WorkflowRuntimeContext"/> /// </summary> /// <param name="serviceProvider">The current <see cref="IServiceProvider"/></param> /// <param name="logger">The service used to perform logging</param> /// <param name="expressionEvaluatorProvider">The service used to create provide <see cref="IExpressionEvaluator"/>s</param> /// <param name="secretManager">The service used to manage secrets</param> /// <param name="managementApi">The service used to interact with the Synapse Public API</param> /// <param name="runtimeApi">The service used to interact with the Synapse Runtime API</param> public WorkflowRuntimeContext(IServiceProvider serviceProvider, ILogger <WorkflowRuntimeContext> logger, IExpressionEvaluatorProvider expressionEvaluatorProvider, ISecretManager secretManager, ISynapseManagementApi managementApi, ISynapseRuntimeApi runtimeApi) { this.ServiceProvider = serviceProvider; this.Logger = logger; this.ExpressionEvaluatorProvider = expressionEvaluatorProvider; this.SecretManager = secretManager; this.ManagementApi = managementApi; this.RuntimeApi = runtimeApi; }