I have a small concern which I’m thinking whether its possible.
I have two solutions developed using ReFramework. One collects data from a website and adds onto a queue. And the other one gets the extracted data from the queue and do some extra processing. It’s more like a dispatcher and performer scenarios that we learn in the academy. These two will be published in orchestrator and will be executed.
My question is, is there a way for me to execute both of these solutions one after the other rather than manually executing both? In other words, I have to run the first solution, once that finishes, I need to start the execution of the second one to complete the entire thing. So rather than triggering these two separately, is there a way to automatically start the execution of the second one right after the first one completes executing?
What I understood is it is good to have both of them as a different workflows as a good practice for a developer as said by other posts😁, however you can have both in a single workflow and that should not make any difference.
If I am wrong please bare with me, even I had this question and tried with r&d and came to this conclusion.
No worries bro!! I was also thinking about a similar solution, but I was not sure whether it is the best approach
So, I already have two solutions as said, one to extract data, and another to process the data. To solve my problem, I was also thinking whether it is okay to have another workflow that can execute the REFramework solution one, and once that finishes, the next.
I was also not sure, how to call a different solution through another. Is it okay to simply call the main.xaml of another solution? Is that the approach?
I have another question regarding this. So I already have two dispatcher and a performer solutions.
If I’m to create another sequence workflow that executes the dispatcher solution first, and then the performer, How would I publish all three solutions at once to the orchestrator so that I can run only the management workflow that execute both solutions sequentially?
Hi @Lahiru.Fernando,
Yes this is what I was thinking of.
Also just food for thought: we can have with out calling other project inside one, like creating workflows for dispatcher and performer in same project and use a condition to check if dispatcher has added all queue items then go for performer. In the same project,
This is just a thought because I haven’t done any scenario as such. Might work is what I feel.
that sounds great too… but I wonder whether the workflow will get complicated in case its a lengthy process… But still its worth trying it out
I will try both approaches and see what suits me better… Thanks guys @pavanh003@Jan_Brian_Despi for your valuable thoughts and time… Great to have you guys out there
In the meantime, if there are other thoughts on this, let me know because I’m still open to suggestions
@Lahiru.Fernando You can use a separate workflow and from there you can invoke ReFramework workflows. All you need to do is to give absolute path of each and every xaml’s which are invoked in ReFramework workflows.
I did some research on this to find the best possible way to handle this type of scenarios. Based on the ideas you guys shared, @Jan_Brian_Despi, @pavanh003 and @Anand007, I came up with a solution to handle this.
So this is basically a combination of all the thoughts you guys have put in
I developed a control workflow which gives a start job command to the two dispatcher and performer solutions which I already have in the orchestrator.
Just to make it more reliable, I have added a bunch of error handling as well as logs. I have also added a small delay time between the command of the two jobs to make sure it runs in the proper order just in case
Sharing the workflow I created for you guys also to see… Hope it helps for you guys also to get an idea when a requirement arise for you…
I should say, Thank you all @pavanh003@Anand007 & @Jan_Brian_Despi for your great thoughts to get this working. All your solutions helped me to come up with this idea. Thanks again!!
I guess the closest answer was from @Jan_Brian_Despi, So I guess I should mark his answer as the solution… But, you all helped me to figure this out… So, Thanks again guys!!
Thanks for your suggestion and it looks interesting. May be i can introduce this in my next version of the solution
I have few questions. As you already know, I have a dispatcher and performer developed using reframework.
So, if I’m to use enhanced REFramework as you suggested, I should invoke the Dispatcher process in the Init. Since it updates the queue, I should Check whether the queue has new records in the Get Transaction Data state. If records are available, I should run the Performer process under the Process state. Am I right with the flow here?
Another question is, When invoking the dispatcher and performer, Should I invoke their main.xaml file? Also note, that in my case, I have one solution folder, and within that I have two folders which contain the source files for these two solutions.
Since you have done a similar thing, would be great if you share your knowledge bro! specially on how you did, what files you invoked to run a framework solution.
This may sound stupid, but I haven’t tried executing a framework solution from another
Actually, the Enhanced ReFremework introduces a concept of Tasks. As such, you could simply put your dispatcher as a Task that will run once on the first run of the entire process. You could set it up to return a simple boolean of the number of uploaded queue items and only proceed further if there are items to be processed.
I suggest you to only get into it when you feel like it The Enhanced ReFremework is a bit more complicated than the standard one, but it’s rewarding to just sit down and understand what it does.
For the actual invokes, you would indeed need to inject your folders in the right places of the enhanced framework.
My old project was a process handler with no Orchestrator. I had the Enhanced ReFramework load up a config with names of my processes as transactions. It would then go over each transaction, go to the ProcessTransaction workflow and in there invoke the correct sub-framework based on its name.
For me, each sub-framework was placed in the Tasks folder.
So just to put it visually, its 1 transaction was split into several tasks (and each of those tasks were actual old ReFrameworks)
For you the setup would be much simpler. But once again, only dive into it if you have time. It might seem a bit difficult (especially the documentation), but really rewarding.
If I remember correctly, there is also an Init Task (which is a framework as well) which can be set-up to run once. It seems perfect for the Dispatcher