Problem creating a main BO and reference BO from a process

Contains tips for configurators working with Aware IM
Post Reply
PEFS
Posts: 207
Joined: Mon Jun 12, 2006 11:25 pm

Problem creating a main BO and reference BO from a process

Post by PEFS »

Hi Forum,

I have the following setup:

Customer (Main BO)
CustomerAlert (Reference to Customer)
AlertList (Reference to CustomerAlert)

What I would like to do is to create an Alert and Alert List items for every customer. What is happening with my process is that it is performing the process perfectly but for only one Customer. The log states that this is not currently possible. Is there another way to configure this process so that each Customer has a Alert Created and the alert have the AlertList item created against it using a single process. Is there a way to "loop" a process?

The process that I am using is listed below:

-FIND ALL Customer
-CREATE CustomerAlert WITH CustomerAlert.Customer=Customer, CustomerAlert.Importance='Normal', CustomerAlert.Subject='Daily Report Approval',CustomerAlert.AlertOn=CURRENT_DATE, CustomerAlert.Description='The Report should be reviewed each morning and approved prior to 9:00 am.'
-FIND AlertList WHERE AlertList IN ThisCustomerAlert.AlertList
-CREATE AlertList WITH AlertList.Alert=ThisCustomerAlert, AlertList.Subject='Report Approved', AlertList.Details='After reviewing the Daily Report, put a check in the completed box to acknowledge that you have reviewed the report. The system will automatically log the time and the user who approved this item', AlertList.Type='Confirmation'

Thanks!!
bartthefish
Posts: 116
Joined: Sat Oct 25, 2008 3:16 pm

Post by bartthefish »

In Order to process the same actions on multiple object found you add the following to the action. IN BATCHES OF 1

Modify your process to something like:

-FIND ALL Customer IN BATCHES OF 1
-CREATE CustomerAlert WITH CustomerAlert.Customer=Customer, CustomerAlert.Importance='Normal', CustomerAlert.Subject='Daily Report Approval',CustomerAlert.AlertOn=CURRENT_DATE, CustomerAlert.Description='The Report should be reviewed each morning and approved prior to 9:00 am.'
-CREATE AlertList WITH AlertList.Alert=CustomerAlert, AlertList.Subject='Report Approved', AlertList.Details='After reviewing the Daily Report, put a check in the completed box to acknowledge that you have reviewed the report. The system will automatically log the time and the user who approved this item', AlertList.Type='Confirmation'

Once executed the process will loop / repeat the actions until all the found objects are done. (For eg. if you have 10 customers) The log will display something along the lines of:

Executing Action FIND ALL Customer IN BATCHES OF 1
-Found 10 records
-Processing 1st Record
-Executing Action CREATE CustomerAlert WITH ....
-Executing Action CREATE AlertList WITH ...
-Processing Next 1 object
-Executing Action CREATE CustomerAlert WITH ...
-Executing Action CREATE AlertList WITH...

Hope that answers your question.
Justin
(v7.0 Build 2144) Windows. MSSQL Server
PEFS
Posts: 207
Joined: Mon Jun 12, 2006 11:25 pm

Post by PEFS »

Bless you!

Yes. That worked perfectly.

I can sleep well tonight :o)
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Very interesting solution, Justin. I did not know it worked this way.

What I have done in the past is create 2 processes:

Process1:
-FIND ALL Customer
-Process2

Process2:
-rules you want to fire for each Customer.
Tom - V8.8 build 3137 - MySql / PostGres
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

See also a forum post by Justin at:

Search using multiple allowed attributes
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply