GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit c5baf727 authored by Olof Svensson's avatar Olof Svensson

BES-315: Test workflow10 modified to use two python actors

parent 9598a929
def run(value=None, **kwargs):
if value is None:
raise RuntimeError("Missing argument 'value'!")
value += 1
return {
"value": value,
}
def run(value=None, limit=10, **kwargs):
if value is None:
raise RuntimeError("Missing argument 'value'!")
if limit is None:
raise RuntimeError("Missing argument 'limit'!")
doContinue = "true"
if value >= limit:
doContinue = "false"
return {"doContinue": doContinue}
......@@ -41,10 +41,15 @@ class Workflow10(Workflow):
def __init__(self, name):
Workflow.__init__(self, name)
self.startActor = StartActor(self)
self.pythonActorAddAndCheck = PythonActor(
self.pythonActorAddWithoutSleep = PythonActor(
parent=self,
script='pypushflow.test.pythonActorAddAndCheck.py',
name='Python add and check',
script='pypushflow.test.pythonActorAddWithoutSleep.py',
name='Add without sleep',
)
self.pythonActorCheck = PythonActor(
parent=self,
script='pypushflow.test.pythonActorCheck.py',
name='Check',
)
self.check = RouterActor(
parent=self,
......@@ -53,9 +58,10 @@ class Workflow10(Workflow):
listPort=["true", "false"]
)
self.stopActor = StopActor(self)
self.startActor.connect(self.pythonActorAddAndCheck)
self.pythonActorAddAndCheck.connect(self.check)
self.check.connect(self.pythonActorAddAndCheck, expectedValue="true")
self.startActor.connect(self.pythonActorAddWithoutSleep)
self.pythonActorAddWithoutSleep.connect(self.pythonActorCheck)
self.pythonActorCheck.connect(self.check)
self.check.connect(self.pythonActorAddWithoutSleep, expectedValue="true")
self.check.connect(self.stopActor, expectedValue="false")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment