django-logic
django-logic copied to clipboard
Draw method enhancements
- [x] support in progress states
- [ ] highlight begin
- [x] fix bug with process name
- [ ] fix bug which duplicated condition on the graph, e.g.
has_no_sales_invoices
duplicated. - [ ] cover by tests
class InvoiceProcess(Process):
transitions = [
Transition(action_name='approve',
sources=[states.draft],
target=states.approved),
Transition(action_name='void',
sources=[states.draft, states.approved],
target=states.void,
conditions=[has_no_sales_invoices],
),
]

@emil-balashov , Would mind sharing the command you used to come up with the graphical presentation above.
Thanks
@huxaiphaer
Sure. That's actually available in the Readme file by this link.
Here is an example for a quick reference
from django_logic.display import *
from demo.process import LockerProcess
display_process(LockerProcess, state='open', skip_main_process=True)
@emil-balashov Well, I thought it could a be command ran in the terminal, does that mean I need to do it myself ? I configure it using that code ?
@huxaiphaer yes, at this moment you need to write a script by yourself if you want to run it in the terminal.