Learning the basics of a BPM

A little tip for testing the BPM, I use the "the method is called by " and put my user ID. That way it only affects me. This can be removed when it's working right, if you're testing in a live DB. Also if you are working on a test database and it gets refreshed, any BPM you have will be removed. While they will affect all the databases on the server, they are still tied to the database they were created on. I thought this would be useful information to add to Nigel's warnings.

--- In vantage@yahoogroups.com, "NigelK" <nigel.kerley@...> wrote:
>
> Change your 4GL code to:
>
> find first ttQuoteHed where ttQuoteHed.RowMod = 'A' or ttQuoteHed.RowMod = 'U'.
> if available ttQuoteHed then do:
> if ttquotehed.quotenum = 13000 then do:
> {lib/PublishInfoMsg.i &InfoMsg = "'Message.'"}
> end.
> end.
>
> You should always begin a 4GL action with "find first....."
>
> Also, (and apologies for asking the obvious) but are you actually changing the date before saving the quote?
>
> Nigel.
>
> --- In vantage@yahoogroups.com, "sanfranc415" <sanfranc415@> wrote:
> >
> > Thanks that helps. I'm actually trying something a little more advanced. I'd like to be able to run some 4GL code. This is what I'm created as a condition from the datequoted field to do the following:
> >
> > synchronously execute 4GL
> >
> > if ttquotehed.quotenum = 13000 then do:
> > {lib/PublishInfoMsg.i &InfoMsg = "'Message.'"}
> > end.
> >
> >
> > When I update the datequoted field now, nothing happens?
> >
> > --sf
> > --- In vantage@yahoogroups.com, "NigelK" <nigel.kerley@> wrote:
> > >
> > > I think you might have picked something that has a bit of a bug in it!
> > >
> > > What you would normally do is this:
> > > * Create a Pre-Processing Directive against the Quote.Update BO
> > > * Add a condition: "the ttQuoteHed.EntryDate field has been changed from any to any"
> > > * Add an action: "Show Informational Message". In the body of the message, right-click and select "Field query". Then select the QuoteHed table, tick "Added Records" and "Updated Records" and select the EntryDate field.
> > > * "OK" your way back to the Method Directives window, click Enabled and click Save.
> > >
> > > Important:
> > > 1. You do *not* have to log off/on to Vantage for BPMs to become active - as soon as you click save they become "live".
> > > 2. In v8 *ALL* BPMs, whether created in the Live, Test or Training DBs, actually become active on the Live DB if you're working on the same server!!! There have been posts to the Group recently about fixing this or search the EpicWeb AnswerBooks.
> > > 3. Whenever you make a change to a BPM, remember to click Save. You might think that when you've made a change to a condition or an action and clicked "OK" that the change becomes active, but it doesn't. You must click save on the Method Directives window.
> > >
> > >
> > > Now for the bug bit:
> > > You chose the EntryDate field which is not maintained by the user, Vantage updates this field when a new Quote is first saved. So the field changes from Null to <date>, therefore the BPM should be activated. But it's not! At least not in our v8.03.406a.
> > >
> > > You can't change the EntryDate field manually so change the BPM to look for a change in CustNum, then create/save a new Quote. Again you'd think the BPM should be activated but it's not. However if you then change the Customer on that Quote and click Save, *then* the BPM is activated and the dialog box pops up.
> > >
> > > HTH,
> > >
> > > Nigel.
> > >
> > >
> > > --- In vantage@yahoogroups.com, "sanfranc415" <sanfranc415@> wrote:
> > > >
> > > > Can somebody explain how I would get a specific quote, when the "date entered" field changes to display a message with the quotenum?
> > > >
> > > > Hoping an example will help get me started.
> > > >
> > > > --sf
> > > >
> > >
> >
>
Can somebody explain how I would get a specific quote, when the "date entered" field changes to display a message with the quotenum?

Hoping an example will help get me started.

--sf
I think you might have picked something that has a bit of a bug in it!

What you would normally do is this:
* Create a Pre-Processing Directive against the Quote.Update BO
* Add a condition: "the ttQuoteHed.EntryDate field has been changed from any to any"
* Add an action: "Show Informational Message". In the body of the message, right-click and select "Field query". Then select the QuoteHed table, tick "Added Records" and "Updated Records" and select the EntryDate field.
* "OK" your way back to the Method Directives window, click Enabled and click Save.

Important:
1. You do *not* have to log off/on to Vantage for BPMs to become active - as soon as you click save they become "live".
2. In v8 *ALL* BPMs, whether created in the Live, Test or Training DBs, actually become active on the Live DB if you're working on the same server!!! There have been posts to the Group recently about fixing this or search the EpicWeb AnswerBooks.
3. Whenever you make a change to a BPM, remember to click Save. You might think that when you've made a change to a condition or an action and clicked "OK" that the change becomes active, but it doesn't. You must click save on the Method Directives window.


Now for the bug bit:
You chose the EntryDate field which is not maintained by the user, Vantage updates this field when a new Quote is first saved. So the field changes from Null to <date>, therefore the BPM should be activated. But it's not! At least not in our v8.03.406a.

You can't change the EntryDate field manually so change the BPM to look for a change in CustNum, then create/save a new Quote. Again you'd think the BPM should be activated but it's not. However if you then change the Customer on that Quote and click Save, *then* the BPM is activated and the dialog box pops up.

HTH,

Nigel.


--- In vantage@yahoogroups.com, "sanfranc415" <sanfranc415@...> wrote:
>
> Can somebody explain how I would get a specific quote, when the "date entered" field changes to display a message with the quotenum?
>
> Hoping an example will help get me started.
>
> --sf
>
Thanks that helps. I'm actually trying something a little more advanced. I'd like to be able to run some 4GL code. This is what I'm created as a condition from the datequoted field to do the following:

synchronously execute 4GL

if ttquotehed.quotenum = 13000 then do:
{lib/PublishInfoMsg.i &InfoMsg = "'Message.'"}
end.


When I update the datequoted field now, nothing happens?

--sf
--- In vantage@yahoogroups.com, "NigelK" <nigel.kerley@...> wrote:
>
> I think you might have picked something that has a bit of a bug in it!
>
> What you would normally do is this:
> * Create a Pre-Processing Directive against the Quote.Update BO
> * Add a condition: "the ttQuoteHed.EntryDate field has been changed from any to any"
> * Add an action: "Show Informational Message". In the body of the message, right-click and select "Field query". Then select the QuoteHed table, tick "Added Records" and "Updated Records" and select the EntryDate field.
> * "OK" your way back to the Method Directives window, click Enabled and click Save.
>
> Important:
> 1. You do *not* have to log off/on to Vantage for BPMs to become active - as soon as you click save they become "live".
> 2. In v8 *ALL* BPMs, whether created in the Live, Test or Training DBs, actually become active on the Live DB if you're working on the same server!!! There have been posts to the Group recently about fixing this or search the EpicWeb AnswerBooks.
> 3. Whenever you make a change to a BPM, remember to click Save. You might think that when you've made a change to a condition or an action and clicked "OK" that the change becomes active, but it doesn't. You must click save on the Method Directives window.
>
>
> Now for the bug bit:
> You chose the EntryDate field which is not maintained by the user, Vantage updates this field when a new Quote is first saved. So the field changes from Null to <date>, therefore the BPM should be activated. But it's not! At least not in our v8.03.406a.
>
> You can't change the EntryDate field manually so change the BPM to look for a change in CustNum, then create/save a new Quote. Again you'd think the BPM should be activated but it's not. However if you then change the Customer on that Quote and click Save, *then* the BPM is activated and the dialog box pops up.
>
> HTH,
>
> Nigel.
>
>
> --- In vantage@yahoogroups.com, "sanfranc415" <sanfranc415@> wrote:
> >
> > Can somebody explain how I would get a specific quote, when the "date entered" field changes to display a message with the quotenum?
> >
> > Hoping an example will help get me started.
> >
> > --sf
> >
>
Change your 4GL code to:

find first ttQuoteHed where ttQuoteHed.RowMod = 'A' or ttQuoteHed.RowMod = 'U'.
if available ttQuoteHed then do:
if ttquotehed.quotenum = 13000 then do:
{lib/PublishInfoMsg.i &InfoMsg = "'Message.'"}
end.
end.

You should always begin a 4GL action with "find first....."

Also, (and apologies for asking the obvious) but are you actually changing the date before saving the quote?

Nigel.

--- In vantage@yahoogroups.com, "sanfranc415" <sanfranc415@...> wrote:
>
> Thanks that helps. I'm actually trying something a little more advanced. I'd like to be able to run some 4GL code. This is what I'm created as a condition from the datequoted field to do the following:
>
> synchronously execute 4GL
>
> if ttquotehed.quotenum = 13000 then do:
> {lib/PublishInfoMsg.i &InfoMsg = "'Message.'"}
> end.
>
>
> When I update the datequoted field now, nothing happens?
>
> --sf
> --- In vantage@yahoogroups.com, "NigelK" <nigel.kerley@> wrote:
> >
> > I think you might have picked something that has a bit of a bug in it!
> >
> > What you would normally do is this:
> > * Create a Pre-Processing Directive against the Quote.Update BO
> > * Add a condition: "the ttQuoteHed.EntryDate field has been changed from any to any"
> > * Add an action: "Show Informational Message". In the body of the message, right-click and select "Field query". Then select the QuoteHed table, tick "Added Records" and "Updated Records" and select the EntryDate field.
> > * "OK" your way back to the Method Directives window, click Enabled and click Save.
> >
> > Important:
> > 1. You do *not* have to log off/on to Vantage for BPMs to become active - as soon as you click save they become "live".
> > 2. In v8 *ALL* BPMs, whether created in the Live, Test or Training DBs, actually become active on the Live DB if you're working on the same server!!! There have been posts to the Group recently about fixing this or search the EpicWeb AnswerBooks.
> > 3. Whenever you make a change to a BPM, remember to click Save. You might think that when you've made a change to a condition or an action and clicked "OK" that the change becomes active, but it doesn't. You must click save on the Method Directives window.
> >
> >
> > Now for the bug bit:
> > You chose the EntryDate field which is not maintained by the user, Vantage updates this field when a new Quote is first saved. So the field changes from Null to <date>, therefore the BPM should be activated. But it's not! At least not in our v8.03.406a.
> >
> > You can't change the EntryDate field manually so change the BPM to look for a change in CustNum, then create/save a new Quote. Again you'd think the BPM should be activated but it's not. However if you then change the Customer on that Quote and click Save, *then* the BPM is activated and the dialog box pops up.
> >
> > HTH,
> >
> > Nigel.
> >
> >
> > --- In vantage@yahoogroups.com, "sanfranc415" <sanfranc415@> wrote:
> > >
> > > Can somebody explain how I would get a specific quote, when the "date entered" field changes to display a message with the quotenum?
> > >
> > > Hoping an example will help get me started.
> > >
> > > --sf
> > >
> >
>