Loop thru BO records for process

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Loop thru BO records for process

Post by PointsWell »

KnightWare wrote: Thu Jan 07, 2021 5:16 pm Whats the best way to supply the example?
Screen shots of the process's?
Ideally build a small BSV with the minimum number of BOs and process to demonstrate the issue and post it here.
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

I've now added to Process 1 -
----------------------------------------------------------------------------------------
ProcessAll

FIND ALL DIRT
DISPLAY MESSAGE ('Search Count ') + AS_STRING(SEARCH_COUNT)
START PROCESS 'UpdateDate'

UpdateDate ( <- DIRT as Input)
DIRT.PROCESS_DATE = CURRENT_TIMESTAMP
------------------------------------------------------------------

Message displays 23 records (SEARCH_COUNT)
Still only updates 1st record.
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Loop thru BO records for process

Post by PointsWell »

KnightWare wrote: Thu Jan 07, 2021 9:11 pm I've now added to Process 1 -
----------------------------------------------------------------------------------------
ProcessAll

FIND ALL DIRT
DISPLAY MESSAGE ('Search Count ') + AS_STRING(SEARCH_COUNT)
START PROCESS 'UpdateDate'

UpdateDate ( <- DIRT as Input)
DIRT.PROCESS_DATE = CURRENT_TIMESTAMP
------------------------------------------------------------------

Message displays 23 records (SEARCH_COUNT)
Still only updates 1st record.
Without a BSV it's kinda like trying to do keyhole surgery but without a camera and with your eyes shut

Create a small BSV that demonstrates your issue and I will have a look. There is something wrong with the way you have set this up as this works
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

This does use an external SQL Table.
Attachments
DIRT1-11.zip
(42.32 KiB) Downloaded 294 times
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Loop thru BO records for process

Post by Jaymer »

have tried to stay out of this as it seemed well in hand

0) prescribed advice should have been sufficient
1) theres always a possibility that the external SQL is the issue
2) I NEVER use "START PROCESS" (ok, well, 99.99% of the time). Not sure why he is using it.

The line in the rule should just be:
UpdateDate

IMHO, the lack of knowledge regarding the Logging tool is a problem.
Under normal circumstances, the Logging tool would have easily shown the Qty being found and verified that all 25 IDs were being processed by the 2nd Process. To save yourself wasting more time in the future, I strongly recommend learning how to use the Production & Testing Log

Jaymer...
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
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

I hear you about logs. We run AwareIM as services on the server. I always had a hard time getting on the server and opening the logs. I can remote to the server, is there a way to open logs without stopping services and invoking the control panel? There used to be a batch file I beleive, but it seemed to disappear in one of the upgrades.
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Loop thru BO records for process

Post by PointsWell »

KnightWare wrote: Thu Jan 07, 2021 9:30 pm This does use an external SQL Table.
This is relevant and significant information that was omitted from the original question. Hence why an example was requested. Also the example you've sent isn't something I can run locally as there is no sample data and I don't know what the shape of the data that you are trying to retrieve is.

As Jaymer said it is highly likely that the External SQL table is the problem.

Build a small BSV that uses internal data then create the two processes and use it against your local data. That will triage the issue down to the external data table. The likelihood is that the issue relates to the way AIM holds external data in context. If you have not created some persistent BOs in AIM to hold the data you are likely to encounter an issue. Bear in mind the FIND IN BATCH will also create problems when you are using external data that you are updating, your FIND would need to use an attribute that you have updated otherwise you risk returning the same instance of the BO repeatedly as AIM won't be holding it in context if you batch by 1.

Like Jaymer said you don't need to use START PROCESS to call another process, but if you do then it obviously makes it clear that you are calling a process when you return to it later.
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

WINNER WINNER CHICKEN DINNER

It was the "Start Process". Changing it to just the Process Name works!
Thank You.

Can't believe I got the Syntax wrong, using the F4 function drop down.
Last edited by KnightWare on Thu Jan 07, 2021 10:17 pm, edited 1 time in total.
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Loop thru BO records for process

Post by PointsWell »

KnightWare wrote: Thu Jan 07, 2021 10:08 pm I hear you about logs. We run AwareIM as services on the server. I always had a hard time getting on the server and opening the logs. I can remote to the server, is there a way to open logs without stopping services and invoking the control panel? There used to be a batch file I beleive, but it seemed to disappear in one of the upgrades.
The logs are just text files. There used to be a LogViewer.jar (I don't know if it is still in the regular build) that you could open the file with without stopping the server. You can run it on any machine.
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

Any more info on this? I'll pursue.
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Loop thru BO records for process

Post by PointsWell »

KnightWare wrote: Thu Jan 07, 2021 10:21 pm Any more info on this? I'll pursue.
I can't remember where the log viewer prog used to be but your logs are switched on automatically if you run as a service (I think - I don't run as a service), if not you need to update the Logger.props file - search the forum there are posts on this.
BobK
Posts: 545
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Loop thru BO records for process

Post by BobK »

KnightWare wrote: Thu Jan 07, 2021 6:24 pm Looking at wrapper.log (AwareIM\Logs\Wrapper.log) i do not see anything entered as you show. I am running in test mode. I do see entries for errors when I accidentally named the process wrong. But nothing after I corrected.
I don't usually run Aware as a service, but I did temporarily to do some testing. Even when run as a service, Aware still writes to the AwareIM\bin\main.log (for production) and AwareIM\bin\test.log (for test mode).
Bob
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

There is a Test.log file, no main.log.
Looking in forum as requested.
KnightWare
Posts: 139
Joined: Sat Feb 10, 2018 12:56 am

Re: Loop thru BO records for process

Post by KnightWare »

I think this (Logging) has changed after 8.2/8.3. I do not see the LogViewer.bat or .Jar files you see in previous posts.
Post Reply