diff --git a/SAS/TMSS/src/tmss/workflowapp/flows/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/flows/CMakeLists.txt index 769f922e4781a912f1c0488c3655f6ab61363d3a..ba35dcf6abd1341333f5da54b43b2977805ef628 100644 --- a/SAS/TMSS/src/tmss/workflowapp/flows/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/workflowapp/flows/CMakeLists.txt @@ -4,7 +4,7 @@ include(PythonInstall) set(_py_files __init__.py helloworldflow.py - schedulingunitdemoflow.py + schedulingunitflow.py ) python_install(${_py_files} diff --git a/SAS/TMSS/src/tmss/workflowapp/flows/__init__.py b/SAS/TMSS/src/tmss/workflowapp/flows/__init__.py index 45516795a25730483ebfa40c1fbdb5f533df8ebe..a0ae3713747c0b28c5595736d06f4bcb800da5b5 100644 --- a/SAS/TMSS/src/tmss/workflowapp/flows/__init__.py +++ b/SAS/TMSS/src/tmss/workflowapp/flows/__init__.py @@ -1,2 +1,2 @@ from .helloworldflow import * -from .schedulingunitdemoflow import * \ No newline at end of file +from .schedulingunitflow import * \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/workflowapp/flows/schedulingunitdemoflow.py b/SAS/TMSS/src/tmss/workflowapp/flows/schedulingunitflow.py similarity index 96% rename from SAS/TMSS/src/tmss/workflowapp/flows/schedulingunitdemoflow.py rename to SAS/TMSS/src/tmss/workflowapp/flows/schedulingunitflow.py index 0a2882d7a4550ef3ff8e60b190c4074f60356795..fbbbb27b6075ee0c8f1ddac35b1834b897455580 100644 --- a/SAS/TMSS/src/tmss/workflowapp/flows/schedulingunitdemoflow.py +++ b/SAS/TMSS/src/tmss/workflowapp/flows/schedulingunitflow.py @@ -65,8 +65,8 @@ class Condition(Signal): super(Condition, self).ready() @frontend.register -class SchedulingUnitDemoFlow(Flow): - process_class = models.SchedulingUnitDemoProcess +class SchedulingUnitFlow(Flow): + process_class = models.SchedulingUnitProcess # 0. Start on SU instantiation # 1. To be Manually scheduled? -> Go to 1a @@ -113,7 +113,7 @@ class SchedulingUnitDemoFlow(Flow): flow.StartSignal( post_save, this.on_save_can_start, - sender=models.SchedulingUnitDemo + sender=models.SchedulingUnit ).Next(this.wait_schedulable) ) @@ -121,7 +121,7 @@ class SchedulingUnitDemoFlow(Flow): Condition( this.check_condition, post_save, - sender=models.SchedulingUnitDemo, + sender=models.SchedulingUnit, task_loader=this.get_scheduling_unit_task ) .Next(this.form) @@ -183,5 +183,5 @@ class SchedulingUnitDemoFlow(Flow): def get_scheduling_unit_task(self, flow_task, sender, instance, **kwargs): print(kwargs) - process = models.SchedulingUnitDemoProcess.objects.get(su=instance) + process = models.SchedulingUnitProcess.objects.get(su=instance) return Task.objects.get(process=process,flow_task=flow_task) diff --git a/SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt b/SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt index 1c94f0a15d5ade684111945ce5bb79dfe25f7a91..57e7e39aac465b8acf7b209fa3dc901ae4c2076f 100644 --- a/SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt +++ b/SAS/TMSS/src/tmss/workflowapp/models/CMakeLists.txt @@ -4,7 +4,7 @@ include(PythonInstall) set(_py_files __init__.py helloworldflow.py - schedulingunitdemoflow.py + schedulingunitflow.py ) python_install(${_py_files} diff --git a/SAS/TMSS/src/tmss/workflowapp/models/__init__.py b/SAS/TMSS/src/tmss/workflowapp/models/__init__.py index 45516795a25730483ebfa40c1fbdb5f533df8ebe..a0ae3713747c0b28c5595736d06f4bcb800da5b5 100644 --- a/SAS/TMSS/src/tmss/workflowapp/models/__init__.py +++ b/SAS/TMSS/src/tmss/workflowapp/models/__init__.py @@ -1,2 +1,2 @@ from .helloworldflow import * -from .schedulingunitdemoflow import * \ No newline at end of file +from .schedulingunitflow import * \ No newline at end of file diff --git a/SAS/TMSS/src/tmss/workflowapp/models/schedulingunitdemoflow.py b/SAS/TMSS/src/tmss/workflowapp/models/schedulingunitflow.py similarity index 65% rename from SAS/TMSS/src/tmss/workflowapp/models/schedulingunitdemoflow.py rename to SAS/TMSS/src/tmss/workflowapp/models/schedulingunitflow.py index b9797a0b12e56ffb6f284da503f43263561522c4..db9cb36ee2131193eba30eb7122e0ce1aeef9778 100644 --- a/SAS/TMSS/src/tmss/workflowapp/models/schedulingunitdemoflow.py +++ b/SAS/TMSS/src/tmss/workflowapp/models/schedulingunitflow.py @@ -3,11 +3,11 @@ from django.db.models import CharField, IntegerField,BooleanField, ForeignKey, CASCADE, Model from viewflow.models import Process -class SchedulingUnitDemo(Model): +class SchedulingUnit(Model): name = CharField(max_length=50) state = IntegerField() -class SchedulingUnitDemoProcess(Process): +class SchedulingUnitProcess(Process): text = CharField(max_length=150) approved = BooleanField(default=False) - su = ForeignKey(SchedulingUnitDemo, blank=True, null=True, on_delete=CASCADE) + su = ForeignKey(SchedulingUnit, blank=True, null=True, on_delete=CASCADE)