Skip to content

Commit aa8dacc

Browse files
committed
Update task messages and descriptions
1 parent 7fde3f5 commit aa8dacc

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

src/main/resources/advancedGating/Gate.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,19 @@
1414
else:
1515
gatePassed = any(results)
1616

17+
# Print dedicated success or failure message
18+
if gatePassed:
19+
print("Gate passed successfully!")
20+
else:
21+
failed_count = len([r for r in results if not r])
22+
if failed_count == 1:
23+
print("Gate failed! 1 condition was not satisfied.")
24+
else:
25+
print("Gate failed! {} conditions were not satisfied.".format(failed_count))
26+
1727
table = u"""
1828
|Condition|Result|
19-
|---|---|
29+
|:------|:------:|
2030
"""
2131
for index, condition in enumerate(conditions.keys()):
2232
result = u"\u2714" if results[index] else u"\u2717"
@@ -28,6 +38,7 @@
2838
condition_text = str(condition)
2939
table += u"|{}|{}|\n".format(condition_text + u"     ", result)
3040
print(table)
41+
print(" ")
3142

3243
if not useOutput and not gatePassed:
33-
raise Exception("Gate failed with results list: {}".format(results))
44+
raise Exception("Gate failed")

src/main/resources/synthetic.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
1212
<type type="advancedGating.Gate" extends="xlrelease.PythonScript" label="Advanced Gating: Gate">
1313
<property name="iconLocation" category="input" hidden="true" default="advancedGating/AdvancedGating.png"/>
1414
<property name="taskColor" category="input" hidden="true" default="#CC4A3C"/>
15-
<property name="conditions" category="input" kind="map_string_string" description="Condition names and conditional expressions"/>
16-
<property name="conditionsType" category="input" kind="enum" default="AND" description="Pass this task if all of the criteria pass (AND) or any of the criteria pass (OR)">
15+
<property name="conditions" category="input" kind="map_string_string" description="Map of condition names to their evaluation expressions. Examples: Passed Compliance - ${passedCompliance}, Low Risk Prediction - ${riskPrediction} &lt; 0.1"/>
16+
<property name="conditionsType" category="input" kind="enum" default="AND" description="Determines if all conditions must pass (AND) or any condition can pass (OR)">
1717
<enum-values>
1818
<value>AND</value>
1919
<value>OR</value>
2020
</enum-values>
2121
</property>
22-
<property name="useOutput" category="input" kind="boolean" description="Complete this task, regardless of whether conditions pass/fail (use the task output in later tasks)"/>
23-
<property name="gatePassed" category="output" description="Whether all conditions"/>
22+
<property name="useOutput" category="input" kind="boolean" description="Complete task regardless of condition results (output can be used in subsequent tasks)"/>
23+
<property name="gatePassed" category="output" description="Indicates whether the gate conditions were satisfied"/>
2424
</type>
2525
</synthetic>

0 commit comments

Comments
 (0)