New Year Sale ! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Appian Exam ACD101 Topic 3 Question 28 Discussion

Actual exam question for Appian's ACD101 exam
Question #: 28
Topic #: 3
[All ACD101 Questions]

You have two Custom Data Types (CDT): ACME_invoice and ACME_invoiceItem that have a flat relationship.

The invoice item table has a field that is a foreign key to the invoice table. You are leveraging the database to automatically generate their primary keys.

How should you structure the process model to add a new invoice and the new invoice items to the system?

Show Suggested Answer Hide Answer
Suggested Answer: C

When dealing with related data types where one has a foreign key to another, you must first create the record in the primary table (ACME_invoice) and then use the generated primary key to create related records in the secondary table (ACME_invoiceItem). This is why you first write to the ACME_invoice table, then update the foreign keys in a Script Task, and finally write to the ACME_invoiceItem table.


Appian Documentation: Relational Databases

Contribute your Thoughts:

Catarina
5 days ago
I prefer option C because it first writes to the invoice table before the invoice item table.
upvoted 0 times
...
Magnolia
6 days ago
I disagree, I believe option B is better as it ensures the foreign keys are updated correctly.
upvoted 0 times
...
Delmy
17 days ago
Forget the options, I'm just going to write a script that does it all in one line. That's the real solution!
upvoted 0 times
...
Susana
18 days ago
Haha, the question says the database is generating the primary keys. Why are we worrying about that?
upvoted 0 times
Cecil
3 days ago
B) 1. Write to Data Store Entity smart service (Writing to the ACME_invoiceItem table). 2. Script Task to update foreign keys. 3. Write to Data Store Entity smart service (Writing to the ACME_invoice table).
upvoted 0 times
...
Jody
3 days ago
A) 1. Write to Multiple Data Store Entities smart service (Writing to the ACME_invoiceItem table and ACME_invoice table).
upvoted 0 times
...
Susana
5 days ago
A) 1. Write to Multiple Data Store Entities smart service (Writing to the ACME_invoiceItem table and ACME_invoice table).
upvoted 0 times
...
...
Ngoc
20 days ago
I think option A is the best choice because it writes to both tables at once.
upvoted 0 times
...
Ira
26 days ago
Option C makes more sense to me. You want to create the invoice first, then add the items.
upvoted 0 times
...
Samira
29 days ago
I'd go with Option B. Updating the foreign keys in a separate step ensures data integrity.
upvoted 0 times
...
Chaya
1 months ago
Option A seems like the most straightforward approach. Why add unnecessary complexity with extra steps?
upvoted 0 times
Miles
11 days ago
Let's go with Option A for a smooth process model implementation.
upvoted 0 times
...
Eve
18 days ago
Yeah, no need to overcomplicate things when Option A does the job efficiently.
upvoted 0 times
...
Paris
24 days ago
I agree, keeping it simple with Option A is the way to go.
upvoted 0 times
...
Brent
25 days ago
Option A seems like the most straightforward approach. Why add unnecessary complexity with extra steps?
upvoted 0 times
...
...

Save Cancel