You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have models that have relationship with each other. Is it workable if I start a workflow in an observer class like in the created method? And then there will be other observer for other model also in the created method, so when a model created event occured, a workflow will start, another workflow for the other model will start when the created event for that also occured.
But right now I can't make it workable, failed in tests, saying unable to resolve dependency for the job class, even with other test for the other workflow, showing the job class that is not for the first workflow.
Any ideas of how to resolve this issue? Should I just make them into one workflow class but how do I know to inject into workflow constructor what model instance, since the model is created in the job. I will only know the first model, but then the rest of the models will be created and saved to database by jobs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So I have models that have relationship with each other. Is it workable if I start a workflow in an observer class like in the created method? And then there will be other observer for other model also in the created method, so when a model created event occured, a workflow will start, another workflow for the other model will start when the created event for that also occured.
But right now I can't make it workable, failed in tests, saying unable to resolve dependency for the job class, even with other test for the other workflow, showing the job class that is not for the first workflow.
Any ideas of how to resolve this issue? Should I just make them into one workflow class but how do I know to inject into workflow constructor what model instance, since the model is created in the job. I will only know the first model, but then the rest of the models will be created and saved to database by jobs.
Beta Was this translation helpful? Give feedback.
All reactions