Configure the workflow machine.
(self, line)
| 845 | print(json.dumps(response, indent=None)) |
| 846 | |
| 847 | def do_configure(self, line): |
| 848 | """Configure the workflow machine.""" |
| 849 | parser = argparse.ArgumentParser(exit_on_error=False) |
| 850 | parser.add_argument("--advanced", action="store_true", default=True, help="Enable advanced configuration (default: True)") |
| 851 | parser.add_argument("--incremental", action="store_true", default=None, help="Enable incremental configuration (default: True if provided, False if omitted)") |
| 852 | try: |
| 853 | args = parser.parse_args(line.split()) |
| 854 | if args.incremental is None: |
| 855 | args.incremental = False |
| 856 | status = self.machine.configure(advanced=args.advanced, incremental=args.incremental) |
| 857 | print(json.dumps(status, indent=4)) |
| 858 | except argparse.ArgumentError as e: |
| 859 | print("ArgumentError:", e) |
| 860 | except SystemExit: |
| 861 | pass |
| 862 | |
| 863 | def do_resume(self, line): |
| 864 | """Continue/Resume execution of a workflow.""" |