Questions tagged [automatonymous]
Automatonymous is a free, open-source state machine library for .NET.
67
questions
1
vote
1
answer
63
views
Composite event is not triggered in MassTransit
My problem that Composite Event isn't not triggered when I got all the required events (in my case LinkContract, LinkCustomer). And there is a strange thing - when I send LinkContract event, value of ...
0
votes
1
answer
202
views
MassTransit "The Completed event is not handled during the Final state for the RequestStateMachine state machine" error
I have a system where I try to implement a middleware for our APIs to have idempotency handled. for this all of the APIs send a message to system where another service takes these messages and either ...
0
votes
1
answer
82
views
How can you mock an Automatonymous Activity?
I'm trying to unit test my state machine and that it transitions to the states I expect when certain events are received. To do this I'm using the InMemoryTestHarness which enables me to create my ...
0
votes
1
answer
211
views
MassTransit Automatonymous - State not changing when a message is Sent
I am trying to figure why "Sending" a message does not invoke state machine, but if I "Publish" a message, it works and I can see the state changing.
Following is my code, it is ...
0
votes
1
answer
155
views
Can I use MassTransit/Automatonymous saga without using entire MassTransit framework?
I am looking for best .Net Saga framework. Automatonymous looks promising, but all samples and docs are related to it's parent MassTransit project.
Is it possible to use Automatonymous based saga ...
1
vote
1
answer
358
views
Automatonymous StateMachine how to handle NotAcceptedStateMachineException
Is there any way to handle NotAcceptedStateMachineException in generic way e.g. return to client some user friendly message in request-response approach?
Automatonymous....
1
vote
1
answer
66
views
Registering a MassTransit SagaStateMachine with RedisRepository in SimpleInjector - Multiple Constructors
I am able to register a MassTranst SagaStateMachine in a SimpleInjector container using the InMemoryRepository:
container.AddMassTransit(cfg =>
{
// Unrelated registration code ommitted
// ....
0
votes
1
answer
143
views
Start State Machine in specific state while testing
I am trying to create unit tests for my state machine to check if each state does what it is supposed to do.
I can bring the state machine into any state by publishing the event that starts the state ...
0
votes
2
answers
450
views
Skip a Mass Transit state in an if-else clause
I am trying to make a state machine that should send an email if my action ends with an OK status OR it should repeat the action at least n-times until it ends with an OK status. If the n-times ...
1
vote
1
answer
222
views
Automatonymous - Payload not found when calling RaiseEvent with Send Activity
I've been spinning my wheels trying to get the MassTransitStateMachine working and I seem to not understand exactly how this is supposed to work.
The error I'm receiving (full code below) is ...
1
vote
0
answers
284
views
How to publish an event in Automatonymous state machine after each event gets completed?
I have an Automatonymous state machine with a bunch of events.
I would like to publish each event after the previous one completes. I know I could publish it in the consumer of each event, but some of ...
1
vote
2
answers
676
views
Testing a MassTransit saga with scheduled events
Trying to follow the example on how to test a Saga that uses DI (https://masstransit-project.com/usage/testing.html#testing-using-dependency-injection)
var provider = new ServiceCollection()
....
0
votes
1
answer
92
views
Log handled MassTransit Saga exception
I'm trying to figure out how to log handled exceptions. Currently the exception thrown from an Activity will be swallowed (for example if there are DI errors when trying to create the Acitivity).
What ...
0
votes
1
answer
441
views
Test MassTransit state machine saga activity
I'm trying to do unit tests on a custom Activity that I have for my MassTransit state machine saga.
It looks something like this:
public class UpdateActivity : Activity<UpdateState>
{
...
0
votes
1
answer
88
views
Abort chain of activities for MassTransit Saga
I'm trying to figure out how to abort a chain of activities, if one activity decides that there is something wrong, and the Saga should be Finalized.
For example:
Initially(
When(UpdateRequested)
...
0
votes
1
answer
128
views
Restart a MassTransit Saga
In my application, user can trigger updates for a specific resource. When that happens, an UpdateInitiated event is sent.
A MassTransit Saga is initiated based on that event, and it triggers a series ...
3
votes
1
answer
479
views
How to monitor MassTransit Courier routing slip properly?
I managed to implement MassTransit Courier routing slip with bunch of activities. I decided to add a state machine to monitor it, so I created separate events and states and used EF Core as a storage ...
2
votes
1
answer
538
views
How to configure EF Core persistence in MassTransit and Automatonymous?
I am trying to configure Automatonymous worker implementation with EF Core as persistence. I publish event via api and process it in hosted service using RabbitMq as a transport. Unfortunately ...
1
vote
1
answer
130
views
Need StateMachine's Activity examples
I'm learning MassTransit's StateMachine, it's helpful in my usecase, really like it, now I would like to learn more about how to use Activity properly but it's hard to find document/examples, please ...
3
votes
1
answer
1k
views
Consumer saga vs Automatonymous in MassTransit
What exactly is a consumer saga, and how is it different from Automatonymous? I know that Automatonymous is a separate library that is used by MassTransit.
0
votes
1
answer
378
views
Multiple State machines with automatonymous using EFCore persistence not working
We are using Masstransit with automatonymous and InMemoryRepository for saga persistence. We have around 3 state machines configured and working perfectly. We recently changed from InMemoryRepository ...
0
votes
2
answers
296
views
State machine inconsistency while using Automatonymous
I am new to microservices and using masstransit with automatonymous. Currently my state machine is showing inconsistency while execution. The code inside Initially works as expected but the control ...
0
votes
0
answers
37
views
When/how is a consumer saga completed? [duplicate]
The MassTransit documentation on sagas describes how
By default, instances are not removed from the saga repository.
It goes on to describe how a saga may be marked for removal from the saga ...
0
votes
1
answer
1k
views
Dependency Injection problem with Masstransit Sagas and Custom Activities
I am implementing a Saga for a distributed system. So far I haven't got any problem using Masstransit documentation to implement a Saga without any meaningful behavior (just an orchestrator with a ...
0
votes
0
answers
474
views
Masstransit Automatonymous :Discarding events on missing sagas instances going to error queue
Automatonymous using Redis : Same event is used by multiple state machines Sagas.When the event is published (Fan out), The sagas which are not expecting the event and using x.OnMissingInstance(x=>x....
0
votes
2
answers
2k
views
.Net-Core 2.2 MassTransit.ConfigurationException: The state machine was not properly configured
Newbie question - what am I missing? Are there any dotnetcore 2.2 Saga examples available?
I have a basic end to end system working OK with messages flowing across containers in docker-compose, but ...
2
votes
1
answer
407
views
How to persist Saga instances using storage engines and avoid race condition
I tried persisting Saga Instances using RedisSagaRepository; I wanted to run Saga in load balancing setup, so I cannot use InMemorySagaRepository.
However, after I switched, I noticed that some of the ...
3
votes
0
answers
2k
views
How to get multiple Masstransit state machine instances to process correct message
I am using MassTransitStateMachine example based of from https://github.com/MassTransit/Sample-ShoppingWeb. Everything works fine if I have only one application of state machine running. But when I ...
0
votes
1
answer
197
views
Reprocess specific masstransit message in a new saga and finalize current
I'm using Masstransit 5.1.4 with sagas. I have a saga where I want to implement the following behaviour:
When a StartMsg is received -> transition to Active state
While in Active state, several ...
2
votes
2
answers
2k
views
How to properly setup activities in a Masstransit statemachine saga?
I've been fighting a lot with this problem for a couple of days, but cannot find a way that actually works.
My scenario is that I have a state machine saga where I want to do stuff in the same ...
1
vote
1
answer
2k
views
Azure Container Instance apparently keeps running after Stop or Delete
We have a microservice based app that uses Azure ServiceBus.
We deploy one of the services (a saga manager) as a .Net Core console app in a docker container (Linux). We use docker-compose and a group ...
3
votes
0
answers
925
views
Masstransit saga with exceptions
I want to use masstransit saga in my .net core project but I could not find any documentations or (best practice)examples to handling exception.
If I have an error in my consumer,should I publish ...
1
vote
0
answers
538
views
MassTransit saga azure service bus receive endpoint setup?
I am trying to configure MassTransit to work with Automatonymous State Machine using the Azure Service Bus and i cannot see any working examples on how to do this. We previously was using RabbitMQ ...
1
vote
1
answer
1k
views
Using saga event to react to a a message published in a consumer
I'm putting together a proof of concept using Mass Transit with RabbitMq and Automatonymous in
an asp.net core 2.1 application. I'm using EntityFramework core with Postgres for
persistence.
What I'm ...
2
votes
2
answers
772
views
Azure Service Bus - MessageLockLostException when app is in Docker container, works fine otherwise
We have a .NET Core console app that serves the role of a Saga/Process manager.
This Saga app communicates with other microservices via Azure Service Bus (with the use of MassTransit for messaging ...
0
votes
1
answer
536
views
How to trigger the execution of the compensation flow for the activities used within an Automatonymous state machine?
My activities throw exceptions from time to time during the execution, so I've implemented the Faulted methods of Activity<TInstance> to handle that, discarding the changes made in the Execute ...
0
votes
2
answers
898
views
Getting ConsumeContext not available when using MassTransit and Automatonymous Publish after previously using RaiseEvent
If we set up a Saga and immediately Publish(context => ...) then a message successfully hits the bus.
If however, we have something like
Initially(
When(SomeCommand)
.Then(context => { ...
0
votes
2
answers
573
views
MassTransit saga with Redis persistence gives Method Accpet does not have an implementation exception
I'm trying to add Redis persistence to my saga which is managing calls to a routing slip (as well as additional messages to other consumers depending on the result of the routing slip) in the hopes ...
0
votes
0
answers
192
views
MassTransit Saga, Is there possibility of losing events when using UseInMemoryOutbox?
In a masstransit saga when UseInMemoryOutbox is enabled, Is there possibility of losing events?
As far as I understand UseInMemoryOutbox, It will postpone publishing events after persisting saga, So ...
4
votes
2
answers
2k
views
MassTransit saga/statemachine not returning the request response to the controller
I feel like I'm so close to getting this working but can't seem to get it over the line...
I have a .NET Core ASP application with saga/state machine that seems to work well for the most part. It:
...
1
vote
1
answer
319
views
MassTransit Middleware: OnMissingInstance equivalent for Saga without Automatonymous
I'm attempting to hand crank a Saga without using an Automatonymous State Machine (which I started using but found it difficult to correctly unit test) by following a similar pattern to the way that ...
1
vote
2
answers
1k
views
How to test Automatonymous state machines?
I'm trying to write tests for an Automatonymous state machine, but I'm having a fair bit of trouble getting it right, and I've found very little documentation.
Here's what I have at the moment for ...
5
votes
1
answer
3k
views
How to implement a state machine with Automatonymous in C#
I am trying to implement a simple example/demo for a state machine using Automatonymous with RabbitMQ. Unfortunately I could not find one to rebuild / learn from (I found the ShoppingWeb, but in my ...
2
votes
1
answer
1k
views
How to successfully drive a MassTransitStateMachine via the InMemoryTestHarness?
Following up to: How to write MassTransitStateMachine unit tests?
Here's a simple test class (using MS Test) for a simple state machine called ProcedureStateMachine (note: this is not a real ...
3
votes
1
answer
1k
views
How to write MassTransitStateMachine unit tests?
I'm finally starting to leverage the excellent Automatonymous components within MassTransit, and I'd like to TDD my way through my new state machines.
After reading over the MT docs here (http://...
0
votes
0
answers
1k
views
MassTransit Saga - raise multiple events from a saga
I am a beginner on service bus and trying to understand the concept of Saga and Statemachines using Masstransit and Automatonymous.
The situation I have is, a saga to calculate food consumption in a ...
4
votes
1
answer
3k
views
Messaging Between Services Events vs Commands
I am trying to understand different methods used in messaging between services.
Let us say that I have a scenario where I need first service to notify the other that a user has asked for product ...
4
votes
1
answer
779
views
Finalizing Saga on exception
I've created a saga and was wondering how to handle my exceptions during the execution of activities. Ideally, I would like to kill off that saga instance in some cases, immediately in the .Catch().
...
0
votes
0
answers
85
views
Is there a way to confirm Events with Automatonymous?
I want to know if there is a way to confirm with Automatonymous, I want the following events to be executed if the previous ones have been completed.
0
votes
0
answers
213
views
Not able to update Entity framework Core relationship from Masstransit Saga Event
I am unable to update the entity relationship in my saga instance event.
I am able to create One-to-One row for an entry however while I come back to IssueLocation state again it is not detecting ...