- Timestamp:
- 20 Jun 2011, 16:04:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/workflow.py
r6421 r6425 39 39 if batch is None: 40 40 return 41 pin = context.representation 42 batch.invalidate(pin) 41 batch.used_num += 1 43 42 return 44 43 45 def disable_action(wf, context): 46 #batch = getattr(context, '__parent__', None) 47 #if batch is None: 48 # return 49 #pin = context.representation 50 #batch.disable(pin) 44 def disable_used_action(wf, context): 45 batch = getattr(context, '__parent__', None) 46 if batch is None: 47 return 48 batch.used_num -= 1 49 batch.disabled_num += 1 50 51 def disable_unused_action(wf, context): 52 batch = getattr(context, '__parent__', None) 53 if batch is None: 54 return 55 batch.disabled_num += 1 51 56 return 52 57 … … 55 60 if batch is None: 56 61 return 57 pin = context.representation 58 batch.enable(pin) 62 batch.disabled_num -= 1 59 63 return 60 64 … … 79 83 source = INITIALIZED, 80 84 destination = DISABLED, 81 action = disable_ action),85 action = disable_unused_action), 82 86 83 87 Transition( … … 86 90 source = USED, 87 91 destination = DISABLED, 88 action = disable_ action),92 action = disable_used_action), 89 93 90 94 Transition(
Note: See TracChangeset for help on using the changeset viewer.