| xworkflows. ÆÄÀ̽ã ÇÁ·ÎÁ§Æ®ÀÇ ¿öÅ© Ç÷Π(¶Ç´Â »óÅ ½Ã½ºÅÛ) ±¸Çö ¶óÀ̺귯¸® |
Áö±Ý ´Ù¿î·Îµå |
xworkflows. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Raphael Barrois
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/rbarrois/
xworkflows. ű×
xworkflows. ¼³¸í
xworkflows´Â Python objects.ExampleIT¿¡ ¿öÅ© ÇÃ·Î¿ì ¶Ç´Â »óÅ ½Ã½ºÅÛÀ» Ãß°¡ÇÏ´Â ÆÄÀ̽㠶óÀ̺귯¸®ÀÔ´Ï´Ù. ½±°Ô ¿öÅ© Ç÷θ¦ Á¤ÀÇÇÏ°í Ŭ·¡½º¿¡ ¿¬°áÇÒ ¼ö ÀÖ½À´Ï´Ù. Ŭ·¡½º MyWorkflow (xworkflows.workflow) : # »óÅ À̸§ ¸ñ·Ï states = (( 'foo', _ (u "foo")), ( 'bar', _ (u "¹Ù")), ( 'baz', _ (u "baz")),) # Àüȯ Á¤ÀÇ; Ç׸ñÀº (À̸§, ¼Ò½º »óÅÂ, ´ë»ó)ÀÔ´Ï´Ù. Àüȯ = (( 'foobar', 'foo', 'foo', 'bar'), ( 'gobaz', ( 'foo', 'bar'), 'baz'), ( 'Bazbar', 'baz', 'bar') ,) initial_state = 'foo'class myObject (xworkflows.workflowEnabled) : state = myworkflow () @Transition () def foobar (self) : ¹Ýȯ 42 # ÁÖ¾îÁø Àüȯ¿¡ ´ëÇØ ´Ù¸¥ ¹æ¹ýÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. @Transition ( 'gobaz') Def Blah (self) : Return 13 >>> o = myObject () >>> o.state ( 'foo') >>> o.state.is_footrue >>> o.foobar () 42 >>> o.statestate ( 'bar') >>> o.blah () 13 >>> o.statestate ( 'baz') Á¦Ç° ȨÆäÀÌÁö
xworkflows. °ü·Ã ¼ÒÇÁÆ®¿þ¾î