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
Newby question: Process skipping objects
Newby question: Process skipping objects
Gijs van Ballegooijen.
the Netherlands.
AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
the Netherlands.
AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Re: Newby question: Process skipping objects
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.
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
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.
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Newby question: Process skipping objects
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.
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
the Netherlands.
AwareIM 8.4 (build 2708)
Server: Ubuntu Linux 18.04.2
Database: MariaDB
Config: Windows 2012R2
Re: Newby question: Process skipping objects
- Attachments
-
- 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
Jaymer
Aware Programming & Consulting - Tampa FL