Service Connect - Creating New ShipTo

Here's my new BPM that appears to be working as desired for creating a unique ShipToNum each time:


DEFINE VAR i AS INT.
DEFINE VAR complete AS LOGICAL.
i = 100.
complete = FALSE.

for each ttShipTo where ttShipTo.RowMod = "A":
/*CheckBox01 is a flag set to know the ShipTo is being created from Service Connect*/
if ttShipTo.Company = "STI" and ttShipTo.CheckBox01 = true then do:
do while complete <> TRUE:
find first ShipTo where ShipTo.Company = ttShipTo.Company and ShipTo.CustNum = ttShipTo.CustNum and integer(ShipTo.ShipToNum) = i no-lock no-error.
if not avail ShipTo then do:
ttShipTo.ShipToNum = string(i).
complete = TRUE.
end.
i = i + 1.
end.
end.
end.




--- In vantage@yahoogroups.com, "Jeff Rogers" <jeff.rogers@...> wrote:
>
>
>
>
>
> Thanks for the responses guys!
>
> So I think I need a new idea for creating unique shiptonum's through Service Connect. I originally planned on creating the first service connect shiptonum as "100" and then incrementing it from there (finding the last ShipToNum through a BPM and 4GL), but ran into the problem of other people in the company creating additional ShipTos with ShipToNums that are just characters (so I would be unable to conver to integer and increment). Does anyone have an alternate idea of how to create unique ShipToNums when existing ShipToNums may contain characters)?
>
> Here is the BPM for my original idea:
>
> for each ttShipTo where ttShipTo.RowMod = "A":
> /*identify shipto as generated by service connect */
> if ttShipTo.Company = "<insert company name>" and ttShipTo.CheckBox01 = true then do:
> find last ShipTo where ShipTo.Company = ttShipTo.Company and ShipTo.CustNum = ttShipTo.CustNum no-lock no-error.
> if avail ShipTo then do:
> if ShipTo.ShipToNum = "" then do:
> ttShipTo.ShipToNum = "100".
> end.
> else do:
> ttShipTo.ShipToNum = string(integer(ShipTo.ShipToNum) + 1).
> end.
> end.
> end.
> end.
>
>
>
> --- In vantage@yahoogroups.com, "Brian W. Spolarich" <bspolarich@> wrote:
> >
> > See below for the explanation as to why the BPM would fire in multiple
> > companies.
> >
> > -----Original Message-----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> > Of Jeff Rogers
> > Sent: Thursday, April 14, 2011 11:52 AM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Re: Service Connect - Creating New ShipTo
> >
> > Finally figured out what was creating the unique ShipTo's in PILOT...
> > there was a BPM running under another company (not sure how it was able
> > to fire for multiple companies). I guess this is the type of stuff that
> > happens when you pickup the development work halfway through the process
> > with little documentation.
> >
> > -----
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> > Of Steven Gotschall
> > Sent: Tuesday, April 28, 2009 9:54 AM
> > To: vantage@yahoogroups.com
> > Subject: Re: [Vantage] ProPath, Live vs. Test, and BPMs
> >
> > The default Vantage install is such that any BPM method directives apply
> > to ALL Vantage DBs on the server.
> >
> > This means that if you develop a BPM in the TEST database, once enabled
> > it will apply and run in the LIVE and TRAIN databases as well. It will
> > therefore cause problems if you want to test BPMs while developing them,
> > or if you are running several databases, each with different BPM
> > requirements.
> >
> > To enable BPM to apply to one particular DB, you need to set up the
> > Appservers to have unique BPM folders in their PROPATH.
> >
> > The steps below explain how to change the Train DB to use a different
> > BPM folder.
> > 1. In Progress Explorer, right click on the MFGTRAIN803 Appserver.
> > 2. Select Properties
> > 3. Click on Agent ' General
> > 4. The PROPATH should be similar to the following:
> > "E:\epicor\mfgsys803\custom,E:\epicor\mfgsys803\bpm,:\epicor\mfgsys803\S
> > erver\custom,E:\epicor\mfgsys803\Server,E:\epicor\mfgsys803"
> > 5. Change the BPM element of this to a unique path i.e.
> > "E:\epicor\mfgsys803\custom,E:\epicor\mfgsys803\TRAIN\bpm,:\epicor\mfgsy
> > s803\Server\custom,E:\epicor\mfgsys803\Server,E:\epicor\mfgsys803"
> > N.B. It is IMPERATIVE that the path ends in "BPM"
> > 6. Repeat Steps 2 - 5 for the MFGTRAIN803ProcessServer and
> > MFGTRAIN803TaskAgent 7. From Windows Explorer, create the directory
> > specified in this instance "E:\epicor\mfgsys803\TRAIN\bpm"
> > 8. Restart the Appservers. Users will need to be logged off for this.
> > 9. Resave any BPMs created in the Train DB.
> >
> > Background
> > When building a BPM method directive, data is stored in the Vantage DB.
> > When a BPM directive is enabled and saved, the data is processed and a
> > Progress program is generated to disk. The program is generated into the
> > directory specified in the Appserver's PROPATH (folder ending in BPM).
> > When Business Object methods are called via Web Services or a Vantage
> > client, any BPM directives which exist for this method are located first
> > in the propath and are therefore executed prior to base Business Object
> > methods.
> >
>
I have a workflow that current work greats using Pilot service references. Basically what it does is it create new orders (and ShipTo's and Contacts if needed) based on an xml input.

When I change the service references to Live I have issues with creating new ShipTo's; it gives me the error message "Duplicate Ship To ID or invalid characters in Ship To ID. When using the Pilot service references I do not get this error and the new ShipToNum's start at 100 and then increment from there. I'm passing the results from CustomerService.GetNewShipTo to CustomerService.Update.

How can the ShipToNums be incremented? Anyone have any ideas?
Finally figured out what was creating the unique ShipTo's in PILOT... there was a BPM running under another company (not sure how it was able to fire for multiple companies). I guess this is the type of stuff that happens when you pickup the development work halfway through the process with little documentation.

--- In vantage@yahoogroups.com, "Jeff Rogers" <jeff.rogers@...> wrote:
>
> I have a workflow that current work greats using Pilot service references. Basically what it does is it create new orders (and ShipTo's and Contacts if needed) based on an xml input.
>
> When I change the service references to Live I have issues with creating new ShipTo's; it gives me the error message "Duplicate Ship To ID or invalid characters in Ship To ID. When using the Pilot service references I do not get this error and the new ShipToNum's start at 100 and then increment from there. I'm passing the results from CustomerService.GetNewShipTo to CustomerService.Update.
>
> How can the ShipToNums be incremented? Anyone have any ideas?
>
See below for the explanation as to why the BPM would fire in multiple
companies.

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Jeff Rogers
Sent: Thursday, April 14, 2011 11:52 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Service Connect - Creating New ShipTo

Finally figured out what was creating the unique ShipTo's in PILOT...
there was a BPM running under another company (not sure how it was able
to fire for multiple companies). I guess this is the type of stuff that
happens when you pickup the development work halfway through the process
with little documentation.

-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Steven Gotschall
Sent: Tuesday, April 28, 2009 9:54 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] ProPath, Live vs. Test, and BPMs

The default Vantage install is such that any BPM method directives apply
to ALL Vantage DBs on the server.

This means that if you develop a BPM in the TEST database, once enabled
it will apply and run in the LIVE and TRAIN databases as well. It will
therefore cause problems if you want to test BPMs while developing them,
or if you are running several databases, each with different BPM
requirements.

To enable BPM to apply to one particular DB, you need to set up the
Appservers to have unique BPM folders in their PROPATH.

The steps below explain how to change the Train DB to use a different
BPM folder.
1. In Progress Explorer, right click on the MFGTRAIN803 Appserver.
2. Select Properties
3. Click on Agent ' General
4. The PROPATH should be similar to the following:
"E:\epicor\mfgsys803\custom,E:\epicor\mfgsys803\bpm,:\epicor\mfgsys803\S
erver\custom,E:\epicor\mfgsys803\Server,E:\epicor\mfgsys803"
5. Change the BPM element of this to a unique path i.e.
"E:\epicor\mfgsys803\custom,E:\epicor\mfgsys803\TRAIN\bpm,:\epicor\mfgsy
s803\Server\custom,E:\epicor\mfgsys803\Server,E:\epicor\mfgsys803"
N.B. It is IMPERATIVE that the path ends in "BPM"
6. Repeat Steps 2 - 5 for the MFGTRAIN803ProcessServer and
MFGTRAIN803TaskAgent 7. From Windows Explorer, create the directory
specified in this instance "E:\epicor\mfgsys803\TRAIN\bpm"
8. Restart the Appservers. Users will need to be logged off for this.
9. Resave any BPMs created in the Train DB.

Background
When building a BPM method directive, data is stored in the Vantage DB.
When a BPM directive is enabled and saved, the data is processed and a
Progress program is generated to disk. The program is generated into the
directory specified in the Appserver's PROPATH (folder ending in BPM).
When Business Object methods are called via Web Services or a Vantage
client, any BPM directives which exist for this method are located first
in the propath and are therefore executed prior to base Business Object
methods.
Thanks for the responses guys!

So I think I need a new idea for creating unique shiptonum's through Service Connect. I originally planned on creating the first service connect shiptonum as "100" and then incrementing it from there (finding the last ShipToNum through a BPM and 4GL), but ran into the problem of other people in the company creating additional ShipTos with ShipToNums that are just characters (so I would be unable to conver to integer and increment). Does anyone have an alternate idea of how to create unique ShipToNums when existing ShipToNums may contain characters)?

Here is the BPM for my original idea:

for each ttShipTo where ttShipTo.RowMod = "A":
/*identify shipto as generated by service connect */
if ttShipTo.Company = "<insert company name>" and ttShipTo.CheckBox01 = true then do:
find last ShipTo where ShipTo.Company = ttShipTo.Company and ShipTo.CustNum = ttShipTo.CustNum no-lock no-error.
if avail ShipTo then do:
if ShipTo.ShipToNum = "" then do:
ttShipTo.ShipToNum = "100".
end.
else do:
ttShipTo.ShipToNum = string(integer(ShipTo.ShipToNum) + 1).
end.
end.
end.
end.



--- In vantage@yahoogroups.com, "Brian W. Spolarich" <bspolarich@...> wrote:
>
> See below for the explanation as to why the BPM would fire in multiple
> companies.
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Jeff Rogers
> Sent: Thursday, April 14, 2011 11:52 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Service Connect - Creating New ShipTo
>
> Finally figured out what was creating the unique ShipTo's in PILOT...
> there was a BPM running under another company (not sure how it was able
> to fire for multiple companies). I guess this is the type of stuff that
> happens when you pickup the development work halfway through the process
> with little documentation.
>
> -----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Steven Gotschall
> Sent: Tuesday, April 28, 2009 9:54 AM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] ProPath, Live vs. Test, and BPMs
>
> The default Vantage install is such that any BPM method directives apply
> to ALL Vantage DBs on the server.
>
> This means that if you develop a BPM in the TEST database, once enabled
> it will apply and run in the LIVE and TRAIN databases as well. It will
> therefore cause problems if you want to test BPMs while developing them,
> or if you are running several databases, each with different BPM
> requirements.
>
> To enable BPM to apply to one particular DB, you need to set up the
> Appservers to have unique BPM folders in their PROPATH.
>
> The steps below explain how to change the Train DB to use a different
> BPM folder.
> 1. In Progress Explorer, right click on the MFGTRAIN803 Appserver.
> 2. Select Properties
> 3. Click on Agent ' General
> 4. The PROPATH should be similar to the following:
> "E:\epicor\mfgsys803\custom,E:\epicor\mfgsys803\bpm,:\epicor\mfgsys803\S
> erver\custom,E:\epicor\mfgsys803\Server,E:\epicor\mfgsys803"
> 5. Change the BPM element of this to a unique path i.e.
> "E:\epicor\mfgsys803\custom,E:\epicor\mfgsys803\TRAIN\bpm,:\epicor\mfgsy
> s803\Server\custom,E:\epicor\mfgsys803\Server,E:\epicor\mfgsys803"
> N.B. It is IMPERATIVE that the path ends in "BPM"
> 6. Repeat Steps 2 - 5 for the MFGTRAIN803ProcessServer and
> MFGTRAIN803TaskAgent 7. From Windows Explorer, create the directory
> specified in this instance "E:\epicor\mfgsys803\TRAIN\bpm"
> 8. Restart the Appservers. Users will need to be logged off for this.
> 9. Resave any BPMs created in the Train DB.
>
> Background
> When building a BPM method directive, data is stored in the Vantage DB.
> When a BPM directive is enabled and saved, the data is processed and a
> Progress program is generated to disk. The program is generated into the
> directory specified in the Appserver's PROPATH (folder ending in BPM).
> When Business Object methods are called via Web Services or a Vantage
> client, any BPM directives which exist for this method are located first
> in the propath and are therefore executed prior to base Business Object
> methods.
>