Skip to content

Commit e12fa0a

Browse files
committed
library-api: refine checks interface for benefits
- check instance names now have no spaces - simple checks moved to "simpleChecks" namespace in situation input.
1 parent 3a5078c commit e12fa0a

File tree

8 files changed

+40
-39
lines changed

8 files changed

+40
-39
lines changed

library-api/src/main/resources/BDT.dmn

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@
1313
<dmn:itemComponent id="_9330054D-6109-4EF3-B69B-5F73ADBD5657" name="people" isCollection="false">
1414
<dmn:typeRef>tPersonList</dmn:typeRef>
1515
</dmn:itemComponent>
16-
<dmn:itemComponent id="_380BB676-06C1-4C91-AA9F-EE098B4341AC" name="TenYearTaxAbatement" isCollection="false">
17-
<dmn:typeRef>boolean</dmn:typeRef>
18-
</dmn:itemComponent>
19-
<dmn:itemComponent id="_CCDE99DA-A46A-4985-B9AA-3EE29CC55F7F" name="PhillyHomeownerOccupant" isCollection="false">
20-
<dmn:typeRef>boolean</dmn:typeRef>
21-
</dmn:itemComponent>
2216
<dmn:itemComponent id="_2478F0D4-7BAE-4DC0-B767-E4CC4A81727D" name="relationships" isCollection="false">
2317
<dmn:typeRef>tRelationshipList</dmn:typeRef>
2418
</dmn:itemComponent>
19+
<dmn:itemComponent id="_02DAA70A-534A-4529-82DE-DCC9677306C4" name="simpleChecks" isCollection="false">
20+
<dmn:typeRef>tSimpleChecks</dmn:typeRef>
21+
</dmn:itemComponent>
2522
</dmn:itemDefinition>
2623
<dmn:itemDefinition id="_47681CD3-2FA0-4694-B03B-F381DA457BD3" name="tPerson" isCollection="false">
2724
<dmn:itemComponent id="_CAC97D8B-FF24-4C38-8F32-C1507705112D" name="dateOfBirth" isCollection="false">
@@ -85,6 +82,14 @@
8582
<dmn:typeRef>boolean</dmn:typeRef>
8683
</dmn:itemComponent>
8784
</dmn:itemDefinition>
85+
<dmn:itemDefinition id="_1E1DA902-4758-4582-8BD9-483CACB88450" name="tSimpleChecks" isCollection="false">
86+
<dmn:itemComponent id="_5E71CF8D-3431-4376-8247-05D159A12B53" name="tenYearTaxAbatement" isCollection="false">
87+
<dmn:typeRef>boolean</dmn:typeRef>
88+
</dmn:itemComponent>
89+
<dmn:itemComponent id="_7164A435-9E19-49E8-A22F-C31AF3403C78" name="phillyHomeownerOccupant" isCollection="false">
90+
<dmn:typeRef>boolean</dmn:typeRef>
91+
</dmn:itemComponent>
92+
</dmn:itemDefinition>
8893
<dmn:businessKnowledgeModel id="_04036CBE-BE0E-44C8-9A49-01D01F005E6F" name="age as of date">
8994
<dmn:extensionElements/>
9095
<dmn:variable id="_4CD74BE8-605D-4B2D-B7F6-97ADFA2F0776" name="age as of date" typeRef="number"/>

library-api/src/main/resources/benefits/pa/phl/PhlHomesteadExemption.dmn

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
</dmn:knowledgeRequirement>
2323
<dmn:context id="_C480749B-8802-49B1-BD0F-9A7690C75C6A">
2424
<dmn:contextEntry>
25-
<dmn:variable id="_E8B1BB36-7D97-4C96-882A-5BEBE08C8628" name="Not Already On Homestead" typeRef="boolean"/>
25+
<dmn:variable id="_0A838725-9877-4E59-BDA0-EF65A62B1C4C" name="NotAlreadyOnHomestead" typeRef="boolean"/>
2626
<dmn:invocation id="_B005A993-AB91-41AB-8F4E-CCCBB7F85499">
2727
<dmn:literalExpression id="_4932AA87-8913-48E2-A33D-E4C0D5A9EDE3">
2828
<dmn:text>PersonNotEnrolledInBenefit.PersonNotEnrolledInBenefitService</dmn:text>
2929
</dmn:literalExpression>
3030
<dmn:binding>
31-
<dmn:parameter id="_6DA8547D-DC53-42E5-88F2-3A53D6C1ED10" name="situation" typeRef="BDT.tSituation"/>
31+
<dmn:parameter id="_6DA8547D-DC53-42E5-88F2-3A53D6C1ED10" name="situation" typeRef="PersonNotEnrolledInBenefit.tParameters"/>
3232
<dmn:literalExpression id="_1CD23716-2E11-4D25-9025-404AEF095576">
3333
<dmn:text>situation</dmn:text>
3434
</dmn:literalExpression>
@@ -37,13 +37,13 @@
3737
<dmn:parameter id="_3687F80D-9B5B-43AB-B39D-B32BD3210E76" name="parameters" typeRef="PersonNotEnrolledInBenefit.tParameters"/>
3838
<dmn:context id="_63E3027C-A3F8-4E92-BC11-BC749F712B1F">
3939
<dmn:contextEntry>
40-
<dmn:variable id="_A0EBC40B-AF78-4E90-AF29-A79FD6160E57" name="personId" typeRef="string"/>
40+
<dmn:variable id="_0FD716EB-D721-42EB-B1A7-CF57C22F0678" name="personId" typeRef="string"/>
4141
<dmn:literalExpression id="_69711CBE-3EF3-4E55-A76C-98BDBFB0336B">
4242
<dmn:text>situation.primaryPersonId</dmn:text>
4343
</dmn:literalExpression>
4444
</dmn:contextEntry>
4545
<dmn:contextEntry>
46-
<dmn:variable id="_5EF7C986-2FB2-44B9-A654-3B6EB410D241" name="benefit" typeRef="string"/>
46+
<dmn:variable id="_B4E9EE3A-3979-48F0-8F84-3923C3A7FAB9" name="benefit" typeRef="string"/>
4747
<dmn:literalExpression id="_8BFE79E2-52B9-45D0-B328-D6914079DBD5">
4848
<dmn:text>"PhlHomesteadExemption"</dmn:text>
4949
</dmn:literalExpression>
@@ -53,9 +53,9 @@
5353
</dmn:invocation>
5454
</dmn:contextEntry>
5555
<dmn:contextEntry>
56-
<dmn:variable id="_3034FD56-E963-4049-B0F3-E2B264F52E6B" name="No Ten Year Tax Abatement" typeRef="boolean"/>
56+
<dmn:variable id="_18F7AC3A-E74C-4FFB-A5E2-E60BFD6DEC67" name="NoTenYearTaxAbatement" typeRef="boolean"/>
5757
<dmn:literalExpression id="_43FF78A6-4F26-47F2-B9BB-4509F28F0240">
58-
<dmn:text>not(situation.TenYearTaxAbatement)</dmn:text>
58+
<dmn:text>not(situation.simpleChecks.tenYearTaxAbatement)</dmn:text>
5959
</dmn:literalExpression>
6060
</dmn:contextEntry>
6161
</dmn:context>
@@ -163,11 +163,11 @@ all(checksAsList)</dmn:text>
163163
<dmndi:StrokeColor red="0" green="0" blue="0"/>
164164
<dmndi:FontColor red="0" green="0" blue="0"/>
165165
</dmndi:DMNStyle>
166-
<dc:Bounds x="47" y="14" width="447" height="100"/>
166+
<dc:Bounds x="66" y="14" width="447" height="100"/>
167167
<dmndi:DMNLabel/>
168168
<dmndi:DMNDecisionServiceDividerLine>
169-
<di:waypoint x="47" y="64"/>
170-
<di:waypoint x="494" y="64"/>
169+
<di:waypoint x="66" y="64"/>
170+
<di:waypoint x="513" y="64"/>
171171
</dmndi:DMNDecisionServiceDividerLine>
172172
</dmndi:DMNShape>
173173
<dmndi:DMNShape id="dmnshape-drg-_38277B56-7BEA-4297-A8B5-BBF084A043E8" dmnElementRef="_38277B56-7BEA-4297-A8B5-BBF084A043E8" isCollapsed="false">
@@ -202,7 +202,7 @@ all(checksAsList)</dmn:text>
202202
<di:waypoint x="513" y="267.5"/>
203203
</dmndi:DMNEdge>
204204
<dmndi:DMNEdge id="dmnedge-drg-_B1C4EAD9-E6BA-4799-8385-6319E5B1591C" dmnElementRef="_B1C4EAD9-E6BA-4799-8385-6319E5B1591C">
205-
<di:waypoint x="270.5" y="64"/>
205+
<di:waypoint x="289.5" y="64"/>
206206
<di:waypoint x="463" y="242.5"/>
207207
</dmndi:DMNEdge>
208208
<dmndi:DMNEdge id="dmnedge-drg-_65645AE3-6865-486A-9E5C-293862F38B81-AUTO-TARGET" dmnElementRef="_65645AE3-6865-486A-9E5C-293862F38B81">

library-api/src/main/resources/benefits/pa/phl/PhlSeniorCitizenTaxFreeze.dmn

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</dmn:knowledgeRequirement>
3030
<dmn:context id="_2C41DC24-2BC2-4A5A-ACA1-46B5591343A9">
3131
<dmn:contextEntry>
32-
<dmn:variable id="_E84A5600-500F-42AF-A419-12D9400A01F2" name="Not Already On Senior Citizen Tax Freeze" typeRef="boolean"/>
32+
<dmn:variable id="_0022269F-1767-4788-9DA9-AE14DAA0547C" name="NotAlreadyOnSeniorCitizenTaxFreeze" typeRef="boolean"/>
3333
<dmn:invocation id="_E72BFFF9-1F22-48F4-B1A2-5AD2936D8304">
3434
<dmn:literalExpression id="_F2EDC358-2908-4206-864E-1FEB4565450E">
3535
<dmn:text>PersonNotEnrolledInBenefit.PersonNotEnrolledInBenefitService</dmn:text>
@@ -44,13 +44,13 @@
4444
<dmn:parameter id="_8FB1B8E0-8E72-4D65-88AD-D5F28B9611AF" name="parameters" typeRef="PersonNotEnrolledInBenefit.tParameters"/>
4545
<dmn:context id="_7FABC583-BADF-4E7C-B996-AA67FD8AF0E0">
4646
<dmn:contextEntry>
47-
<dmn:variable id="_E3B2F4F5-59F2-4A6B-B353-9150F256710D" name="personId" typeRef="string"/>
47+
<dmn:variable id="_12DC79E4-BB41-4471-B526-9608931FC6D7" name="personId" typeRef="string"/>
4848
<dmn:literalExpression id="_48CCDC10-E351-4232-8CEE-E30C3D4129BF">
4949
<dmn:text>situation.primaryPersonId</dmn:text>
5050
</dmn:literalExpression>
5151
</dmn:contextEntry>
5252
<dmn:contextEntry>
53-
<dmn:variable id="_F4F55FDF-95AD-4E13-B744-3BFBDF6201F5" name="benefit" typeRef="string"/>
53+
<dmn:variable id="_4A0B535A-CBDF-4CC4-88E8-7B0F6E50AE20" name="benefit" typeRef="string"/>
5454
<dmn:literalExpression id="_70A7D709-DE57-47E3-83A3-57F1EAE0BD5F">
5555
<dmn:text>"PhlSeniorCitizenTaxFreeze"</dmn:text>
5656
</dmn:literalExpression>
@@ -60,13 +60,13 @@
6060
</dmn:invocation>
6161
</dmn:contextEntry>
6262
<dmn:contextEntry>
63-
<dmn:variable id="_E4DF3FE4-EA35-4D35-94D8-30D023B57849" name="Philly Homeowner/Occupant" typeRef="boolean"/>
63+
<dmn:variable id="_573A5D16-A29A-41D4-A7C1-11958C96459E" name="PhillyHomeownerOccupant" typeRef="boolean"/>
6464
<dmn:literalExpression id="_77A744E6-FE46-4BC5-87EF-F48E370224FF">
65-
<dmn:text>situation.PhillyHomeownerOccupant</dmn:text>
65+
<dmn:text>situation.simpleChecks.phillyHomeownerOccupant</dmn:text>
6666
</dmn:literalExpression>
6767
</dmn:contextEntry>
6868
<dmn:contextEntry>
69-
<dmn:variable id="_5787A594-D5A2-49D0-A928-5A9235469CD8" name="Spouse will be at least age 65 or older this year" typeRef="boolean"/>
69+
<dmn:variable id="_40A14410-42A2-4698-88BF-1C50D5570450" name="PrimarySpouse65PlusThisYear" typeRef="boolean"/>
7070
<dmn:invocation id="_BCE26E11-D61A-435A-A4DA-85E5B6D89200">
7171
<dmn:literalExpression id="_94E78000-8974-41B6-86D8-ACB0409B4E59">
7272
<dmn:text>PersonMinAge.PersonMinAgeService</dmn:text>
@@ -81,19 +81,19 @@
8181
<dmn:parameter id="_98AC55CA-1E60-46A0-BC0C-ECE633849ECF" name="parameters" typeRef="PersonMinAge.tParameters"/>
8282
<dmn:context id="_FA726D01-C947-4F13-868D-BDEBC9F7BCC2">
8383
<dmn:contextEntry>
84-
<dmn:variable id="_BB6359A1-FFC4-4F5B-8BBD-6D9AF19F6D56" name="personId" typeRef="string"/>
84+
<dmn:variable id="_2BA3408B-4A66-4F0B-87B2-A26EC6271B2D" name="personId" typeRef="string"/>
8585
<dmn:literalExpression id="_ECB52040-3923-491C-8F13-996B6076A02A">
8686
<dmn:text>BDT.spouse id(situation.relationships, situation.primaryPersonId)</dmn:text>
8787
</dmn:literalExpression>
8888
</dmn:contextEntry>
8989
<dmn:contextEntry>
90-
<dmn:variable id="_ECC1BF3E-7183-4CD5-B458-D0AA455DAA10" name="minAge" typeRef="number"/>
90+
<dmn:variable id="_7BB0BD60-DD26-45F3-87E6-0F0C435CD5C5" name="minAge" typeRef="number"/>
9191
<dmn:literalExpression id="_FC227DF3-FC54-48E2-8F29-8CE87AF00FCC">
9292
<dmn:text>65</dmn:text>
9393
</dmn:literalExpression>
9494
</dmn:contextEntry>
9595
<dmn:contextEntry>
96-
<dmn:variable id="_B89A45DE-6F95-461D-BDC9-452E9D981259" name="asOfDate" typeRef="date"/>
96+
<dmn:variable id="_E564E461-5958-4482-B9B3-157DA41B40F9" name="asOfDate" typeRef="date"/>
9797
<dmn:literalExpression id="_BF78DABC-8D58-4955-83B3-128391438990">
9898
<dmn:text>date(today().year, 12, 31)</dmn:text>
9999
</dmn:literalExpression>

library-api/test/bdt/benefits/pa/philadelphia/PhlHomesteadExemption/Smoke Test.bru renamed to library-api/test/bdt/benefits/pa/phl/PhlHomesteadExemption/Smoke Test.bru

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ meta {
55
}
66

77
post {
8-
url: {{host}}/benefits/pa/philadelphia/PhlHomesteadExemption
8+
url: {{host}}/benefits/pa/phl/PhlHomesteadExemption
99
body: json
1010
auth: inherit
1111
}
@@ -14,16 +14,15 @@ body:json {
1414
{
1515
"situation": {
1616
"primaryPersonId": "p1",
17-
"TenYearTaxAbatement": false,
18-
// "TenYearTaxAbatement": true,
19-
// "enrollments": null
2017
"enrollments": [
2118
{
2219
"personId": "p2",
2320
"benefit": "PhlHomesteadExemption"
2421
}
25-
]
26-
// "NotAlreadyOnHomestead": false
22+
],
23+
"simpleChecks": {
24+
"tenYearTaxAbatement": false
25+
}
2726
}
2827
}
2928
}

library-api/test/bdt/benefits/pa/philadelphia/PhlHomesteadExemption/folder.bru renamed to library-api/test/bdt/benefits/pa/phl/PhlHomesteadExemption/folder.bru

File renamed without changes.

library-api/test/bdt/benefits/pa/philadelphia/PhlSeniorCitizenTaxFreeze/Smoke Test.bru renamed to library-api/test/bdt/benefits/pa/phl/PhlSeniorCitizenTaxFreeze/Smoke Test.bru

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ meta {
55
}
66

77
post {
8-
url: {{host}}/benefits/pa/philadelphia/PhlSeniorCitizenTaxFreeze
8+
url: {{host}}/benefits/pa/phl/PhlSeniorCitizenTaxFreeze
99
body: json
1010
auth: inherit
1111
}
1212

1313
body:json {
1414
{
1515
"situation": {
16+
"simpleChecks": {
17+
"phillyHomeownerOccupant": true
18+
},
1619
"primaryPersonId": "p1",
17-
"TenYearTaxAbatement": false,
18-
"PhillyHomeownerOccupant": true,
1920
"people": [
2021
{
2122
"id": "p1",
@@ -27,10 +28,6 @@ body:json {
2728
}
2829
],
2930
"enrollments": [
30-
{
31-
"personId": "p1",
32-
"benefit": "PhlSeniorCitizenTaxFreeze"
33-
},
3431
{
3532
"personId": "p2",
3633
"benefit": "PhlHomesteadExemption"

library-api/test/bdt/benefits/pa/philadelphia/PhlSeniorCitizenTaxFreeze/folder.bru renamed to library-api/test/bdt/benefits/pa/phl/PhlSeniorCitizenTaxFreeze/folder.bru

File renamed without changes.

library-api/test/bdt/benefits/pa/philadelphia/folder.bru renamed to library-api/test/bdt/benefits/pa/phl/folder.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
meta {
2-
name: philadelphia
2+
name: phl
33
seq: 1
44
}
55

0 commit comments

Comments
 (0)