Answer the question
In order to leave comments, you need to log in
How to make another service start on an event in a method of one service with parameter passing?
Greetings.
I have never had to use the events functionality in SF2 projects before, now I have to do it, but ... I studied the materials on the Internet - it's creepy how this whole topic is described and everyone has it in their own way - it was not possible to collect a single "picture" of the vision of Events in SF2 , therefore, if anyone is able to point out what can be done in the following situation:
1. The service in one of its methods, upon the fact of a specific if condition, must make it so that the method of another service starts with one parameter from the current one. The key word - STARTED - like as if by himself. It is clear that you can just stupidly start the very method of the desired service by calling it from the current method, but then the current method of the current service will finish working only after the completion of the work of that running method of the desired service - and I don’t need this, it is necessary that another one is launched the process went in parallel and "independently" of the current one.
2. In other words, it suggests catching the desired event in the system, taking a parameter and starting a certain process as a service using the passed parameter.
3. While I understand that in the method of the current service, you need to register the creation of an event, and the starting service will be a listener or subscriber - the service must also be turned into a listener. Is it necessary to create a listener class, etc.?
Can anyone explain this whole process.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
I studied the materials on the internet - it's terrible how this whole topic is described and each in its own way - it was not possible to collect a single "picture"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question