Transactions between Objects

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Transactions between Objects

Post by denisv »

I have two business objects, one that represents Cheque Numbers and another that represents and issue where a cheque number would be assigned.

I need to import batches of CQ Nos on an ongoing basis, which is no problem with the importer, and flag as unused.

But then I need to be able to use a process to 'issue' the next available number and at the same time flag that number as not available for the next time someone requests it.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Are there any problems implementing this? Sorry, I am not sure I understand the question. Could you provide some more details please?
Aware IM Support Team
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

From the cheaue issue business object form, I want to execute a process which will go to the CQ no. Bus Object, find the next available Cq No, return that value and mark it in the CQ No Business Object as used so it can't be used again.

I'm unsure how this can be done.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

This could be done by a process with the following rules:

1 - Check number availability:
If NOT(EXISTS ChequeNumber WHERE (ChequeNumber.State='Unused')) Then REPORT ERROR 'There are no more unused cheque numbers available'

2 - Get next cheque number:
FIND ChequeNumber WHERE ChequeNumber.State='Unused' ORDER BY ChequeNumber.Number TAKE BEST 1

3 - Link check number to cheque issue:
ChequeIssue.CqNo = ChequeNumber

4 - Mark check number unavailable:
ChequeNumber.State = 'Issued'


The process should have ChequeIssue object as its input. You can then add the process as an operation on the form for ChequeIssue.

It would also be a good idea to have attribute ChequeNumber.CqIssue as a matching attribute to ChequeIssue.CqNo so the form for ChequeNumber shows the ChequeIssue to which it is issued.
Aware IM Support Team
Post Reply