Newby question: Process skipping objects

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Newby question: Process skipping objects

Post by gijsvb »

I have a simple process, input for this proces is an object 'Week'
The proces consists of two lines:
FIND ActieveAbonnementen
CREATE AboWeek WITH AboWeek.Abonnement=Abonnement,AboWeek.Week=Week

The 'ActieveAbonnementen' is a query returning a set of around 200 'Abonnement' objects. Checked this by directly running the query and viewing the results. The proces however only creates one 'AboWeek' object.

If I change the process to:
FIND ActieveAbonnementen IN BATCHES OF 1
CREATE AboWeek WITH AboWeek.Abonnement=Abonnement,AboWeek.Week=Week

The correct number of 'AboWeek's is created.

In fact I can change the number of items in a batch and consistently only one 'AboWeek' per batch is created.

Can somebody explain why AwareIM is processing one AboWeek per batch? As I read the manuals, the 'IN BATCHES OF' should be only important for performance reasons and have no functional effects.


Regards,

Gijs.

P.S: AwareIM 8.2 build 2563
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Newby question: Process skipping objects

Post by Jaymer »

simple solution, but not much as to why

the FIND will find the 200 objects, great!

instead of doing a CREATE in the next rule,
CALL A 2nd PROCESS -- this will pass the context of the 200 found Objects to that Process, so specify Abonnement as INPUT

This 2nd Process will "CREATE WITH" on each of the passed in Objects -- no IN BATCHES OF will be required.

Code: Select all

TIP: If you turn on Logging (from the control panel window), you will see the Object IDs get passed in, and the loop through those objects.
Logging scrolls very fast sometimes, so if you want to learn and see more in-depth, add "TAKE BEST 3" to the Query and then you should see the entire process easily in the log.
This is much faster than using IN BATCHES OF 1, which will work, and will allow you to only have 1 Process, but its slower.

1st process: Create_Subscriptions
2nd process: Create_Subscriptions_b

this way they stay close together in the Elements tree
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
gijsvb
Posts: 45
Joined: Fri Jan 23, 2015 5:32 pm

Re: Newby question: Process skipping objects

Post by gijsvb »

Thanks Jaymer, this works!

And indeed is much faster.

Must have misread the manuals. As I interpreted the texts, the action following the find action should be executed for all found objects. Will read study the manuals further.
Gijs van Ballegooijen.
the Netherlands.

AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Newby question: Process skipping objects

Post by Jaymer »

np
read this thread about processing and tips
.
Attachments
hup-holland-hup_Jaymer and son Geordie.jpg
hup-holland-hup_Jaymer and son Geordie.jpg (170.48 KiB) Viewed 5352 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply