Process After save NOT working when creating records

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Process After save NOT working when creating records

Post by BLOMASKY »

On the save button on a form, I have a process that should run after the save. I have determined it does NOT run when I am creating new records. Is this a bug or "undocumented" feature?

Bruce
Attachments
Screen Shot 2020-08-03 at 3.24.30 PM.png
Screen Shot 2020-08-03 at 3.24.30 PM.png (83.9 KiB) Viewed 4637 times
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Process After save NOT working when creating records

Post by PointsWell »

After discussion with Vlad it turns out there are very specific uses for process after save, I had issues with doing things like navigating windows. What are you trying to run after save?
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Process After save NOT working when creating records

Post by BLOMASKY »

Silly me. I thought it would always run after a record is created / saved. I have an entry screen, called from a process and after the record is saved, I have some conditional logic that I want to call based on fields in the new record.

Wonder if I could get more info re: when it is (and isn't) called.

Bruce
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Process After save NOT working when creating records

Post by PointsWell »

BLOMASKY wrote:Silly me. I thought it would always run after a record is created / saved. I have an entry screen, called from a process and after the record is saved, I have some conditional logic that I want to call based on fields in the new record.

Wonder if I could get more info re: when it is (and isn't) called.

Bruce
I didn't really understand the logic of it personally.

If there is conditional logic based on the field values would a business rule on the BO not be a better route to follow?

IF BO IS NEW AND BO.Value=1223 THEN call a process

If the randomness of the order of business rule execution is an issue I have worked out a way to control that using other status fields.

for example, I have an ISBN checker that when the user enters an ISBN I want to check that the ISBN is valid, and if it is ISBN10 then create another ISBN13 record and then once that is all complete go collect some data via a REST API.

I control the order of all this by having a validity attribute

so first step checks the ISBN is valid
IF BO IS NEW AND BO.ISBN WAS CHANGED AND BO.ISBN IS DEFINED THEN check isbn (which sets valid flag)
IF BO.hValid WAS CHANGED TO 'Yes' THEN count length of ISBN and set an attribute
IF BO.Length WAS CHANGED TO 10 THEN do the next step.

Obviously you could manage this all via one field.

IF BO IS NEW AND BO.Stage='New' THEN do the first bit of checking and set status to Stage1
IF BO.Stage WAS CHANGED AND BO.Stage='Stage1' THEN do the next bit of processing set to Stage 2
etc etc.

If your processing is complex then call a process to off load the more complex work with the last step being to change the Stage value.
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Process After save NOT working when creating records

Post by BLOMASKY »

Wonder if Vlad can explain to us when the RUN PROCESS AFTER SAVE is (and is not) called.

Bruce
Post Reply