I just noticed that the REST API lets you create a performance in an invalid state. For example, the REST API deems this to be a valid performance:
<Performance> <BestSeatMap /> <Code /> <Date>2014-12-06T19:00:00</Date> <Description /> <Facility /> <FulltextRequestDateTime>2013-12-27T13:24:14</FulltextRequestDateTime> <InventoryType /> <ProductionSeason /> <Season> <Id>58</Id> </Season> <Status /> <Type /> <ZoneMap /> </Performance>
Here's the response to a POST call to /Txn/Performances with the above content:
<Performance> <AvailReturnIndicator i:nil="true" /> <AvailSaleIndicator i:nil="true" /> <BestSeatMap> <Description i:nil="true" /> <Id>-999</Id> </BestSeatMap> <BudgetAmount i:nil="true" /> <Code /> <CreateLocation>bar</CreateLocation> <CreatedBy>foo</CreatedBy> <CreatedDateTime>2014-04-01T10:59:22.703</CreatedDateTime> <Date>2014-12-06T19:00:00</Date> <DefaultEndSaleDateTime i:nil="true" /> <DefaultStartSaleDateTime i:nil="true" /> <Description /> <DoorsClose i:nil="true" /> <DoorsOpen i:nil="true" /> <EditIndicator>true</EditIndicator> <Facility> <Description i:nil="true" /> <Id>-999</Id> <Inactive>false</Inactive> <SeatMap i:nil="true" /> </Facility> <Fulltext i:nil="true" /> <FulltextCompleteDateTime i:nil="true" /> <FulltextRequestDateTime>2013-12-27T13:24:14</FulltextRequestDateTime> <Id>5751</Id> <InventoryType /> <ProductionSeason> <Id>-999</Id> <Production i:nil="true" /> <Season i:nil="true" /> </ProductionSeason> <PublishClientEndDate i:nil="true" /> <PublishClientStartDate i:nil="true" /> <PublishWebApiEndDate i:nil="true" /> <PublishWebApiStartDate i:nil="true" /> <RankType i:nil="true" /> <SalesNotes i:nil="true" /> <SalesNotesRequired>false</SalesNotesRequired> <Season> <Description>13-14 New Victory</Description> <Id>58</Id> </Season> <ShortName i:nil="true" /> <Status> <Description i:nil="true" /> <Id>-999</Id> </Status> <Text1 i:nil="true" /> <Text2 i:nil="true" /> <Text3 i:nil="true" /> <Text4 i:nil="true" /> <TimeSlot i:nil="true" /> <TvIndicator i:nil="true" /> <Type> <Description i:nil="true" /> <Id>-999</Id> </Type> <UpdatedBy>foo</UpdatedBy> <UpdatedDateTime>2014-04-01T10:59:22.703</UpdatedDateTime> <ZoneMap> <Description i:nil="true" /> <Id>-999</Id> <Inactive>false</Inactive> <SeatMap i:nil="true" /> </ZoneMap> </Performance>
Would it ever make sense to have a performance of production-season -999, type -999, status -999, etc., which are not valid as foreign keys? This seems to put the onus on the API consumer to memorize and enforce the business rules and invariants of Tessitura. But perhaps I'm wrong about what's going on here.
Discuss?