Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation documents for rails #421

Open
omarluq opened this issue Feb 1, 2023 · 2 comments
Open

Installation documents for rails #421

omarluq opened this issue Feb 1, 2023 · 2 comments

Comments

@omarluq
Copy link

omarluq commented Feb 1, 2023

Hey all! I was wondering if there are any references for installation and configuring the gem ?

@adamruzicka
Copy link
Contributor

Hi, sadly nothing official really. It really depends in which environment you want to deploy it. You can take a look at how theforeman/foreman uses it for usage with rails and use that as a starting point. I'll be more than glad to answer any questions you might have and maybe we could then distill some proper docs from it.

Nevertheless, if you stick to rails getting started in development should be pretty straightforward, this seemed to work for me just now adamruzicka/df-test@9a25e56 .

Once you do that, you should be able to fire a rails console a do something like this

> ::Rails.application.dynflow.world.trigger(::Actions::HelloWorld, "my friend").finished.wait; nil
ExecutionPlan bd87a6ea-7111-452d-982c-30b457ec04ee      pending >>  planning
         Step bd87a6ea-7111-452d-982c-30b457ec04ee: 1   pending >>   running in phase     Plan Actions::HelloWorld           
         Step bd87a6ea-7111-452d-982c-30b457ec04ee: 1   running >>   success in phase     Plan Actions::HelloWorld           
ExecutionPlan bd87a6ea-7111-452d-982c-30b457ec04ee     planning >>   planned                                                 
ExecutionPlan bd87a6ea-7111-452d-982c-30b457ec04ee      planned >>   running                                                 
         Step bd87a6ea-7111-452d-982c-30b457ec04ee: 2   pending >>   running in phase      Run Actions::HelloWorld           
Hello my friend                                                                                                              
         Step bd87a6ea-7111-452d-982c-30b457ec04ee: 2   running >>   success in phase      Run Actions::HelloWorld           
ExecutionPlan bd87a6ea-7111-452d-982c-30b457ec04ee      running >>   stopped

If you're not planning on using it together with rails, there are ways of embedding it into other ruby projects.

@omarluq
Copy link
Author

omarluq commented Feb 3, 2023

@adamruzicka your application.rb is exactly what im looking for! It's interesting that I have to define a dynflow function in my application module to init dynflow! Would be nice if there was an initializer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants