This worked very well...well, almost.
I am now able to get ChangePartPlantVendorID to work, the response shows all the new vendor information and there are no errors.
It took me a while, but I realized I had to take the response from ChangePartPlantVendorID and feed it into PartUpdate. All is working now.
Thanks for your help,
Ken
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Brian W. Spolarich
Sent: Monday, October 05, 2009 2:16 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Service Connect - Change Part Plant VendorID
So what you'll want to do is add your input schema as a Message Extension to your sub-processing workflow. This is the schema that represents each row in your CSV file.
ServiceConnect is essentially stateless. So you have to do work if you want to put data in something like a 'global variable'.
Right-click on the design surface and select Process Properties. On the Message Extensions tab right click on the msg:usr node and select Add Container. Give it a name (e.g. "myData") and browse for your sub-process schema. Accept the defaults otherwise.
Now you have a place in your XML schema for this workflow where you can keep state. In this case, you want to map your input data here as part of your first Conversion (the setup for GetByID).
On the left select /msg/req/dta/row. On the right expand to find /msg/wfl/usr/<containername>/row. Connect the row on the left to the row on the right. They have the same sub-schema so the fields are the same.
Now this means that, by default, for every subsequent transformation in your worklow, /msg/wfl/usr/<containername>/row will have the data from your input file. This is true because the default schema for a transformation maps /msg/wfl/usr to /msg/wfl/usr so the data is always copied, unless you break the link.
See the 'message extensions' topic in the SC help, or pp.88-92 in the SC User Guide.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
bspolarich@...<mailto:bspolarich%40advancedphotonix.com> ~ 734-864-5618 ~ www.advancedphotonix.com
-----Original Message-----
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Ken Williams
Sent: Monday, October 05, 2009 4:02 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Service Connect - Change Part Plant VendorID
I tried Part.Update but I couldn't get it to make any change to the VendorID.
I tried setting to "U" without anything else, and this must be what "modified" means as it did get me a step further. My next question is, how do I generate schema that includes my CSV file and Part.GetByID()?
That is, what I think you're telling me...and the messages I'm getting back about null fields...is that I have to have all of the Part Plant data to be able to use the RowMod "U" field. I'm seeing a workflow that looks like:
Start -> Conversion (CSV to XML) -> Part.GetByID() -> Part.ChangePartPlantVendorID()
The Part.ChangePartPlantVendorID needs data from both the conversion (where the new VendorID exists) & the Part.GetByID() (where all the other data exists).
This is probably an elementary question, forgive my questions as this is a new process for me.
Thanks,
Ken
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Brian W. Spolarich
Sent: Monday, October 05, 2009 1:44 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Service Connect - Change Part Plant VendorID
Perhaps someone will have a more complete answer, but I think this is probably what you want to do:
1. Call Part.GetByID() for each Part.
2. Call Part.ChangePartPlantVendorID () for each Part, setting the following:
- Company at the top.
- PartPlant.Company, .Plant, .PartNum, from the results of GetByID.
- PartPlant.VendorNumVendorID as the VendorID.
- PartPlant.RowMod as the literal string "U"
3. Alternatively, just call Part.Update with the same arguments. You may have better luck with Update() since the web wrappers I believe do more helpful things behind the scenes with the generic Update() methods than the other specialized ones.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
bspolarich@...<mailto:bspolarich%40advancedphotonix.com><mailto:bspolarich%40advancedphotonix.com> ~ 734-864-5618 ~ www.advancedphotonix.com
-----Original Message-----
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of Ken Williams
Sent: Monday, October 05, 2009 3:31 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Service Connect - Change Part Plant VendorID
We're trying to do a large update of our part plant records for changes to VendorID's on parts.
I've got a working parts update routine that pulls in data from a CSV, calls a sub workflow and cycles for each part in the list. This works well.
I've tried copying the same setup for ChangePartPlantVendorID and I get the following error: "Cannot find record for this change".
When I look up the web service @ http://svchost/vantageservices/partservice.asmx, I see the following note about ChangePartPlantVendorID:
The ChangePartPlantVendorID Web method accepts the following arguments:
o The new Vendor ID value. (ParameterInfo)
o The PartDataset. IMPORTANT, the PartPlant record must be sent as modified otherwise you will received error that record cannot be found. (ParameterInfo)
What does it mean when it says the PartPlant record must be sent as modified?
Thanks,
Ken
[Non-text portions of this message have been removed]
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/><http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
I am now able to get ChangePartPlantVendorID to work, the response shows all the new vendor information and there are no errors.
It took me a while, but I realized I had to take the response from ChangePartPlantVendorID and feed it into PartUpdate. All is working now.
Thanks for your help,
Ken
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Brian W. Spolarich
Sent: Monday, October 05, 2009 2:16 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Service Connect - Change Part Plant VendorID
So what you'll want to do is add your input schema as a Message Extension to your sub-processing workflow. This is the schema that represents each row in your CSV file.
ServiceConnect is essentially stateless. So you have to do work if you want to put data in something like a 'global variable'.
Right-click on the design surface and select Process Properties. On the Message Extensions tab right click on the msg:usr node and select Add Container. Give it a name (e.g. "myData") and browse for your sub-process schema. Accept the defaults otherwise.
Now you have a place in your XML schema for this workflow where you can keep state. In this case, you want to map your input data here as part of your first Conversion (the setup for GetByID).
On the left select /msg/req/dta/row. On the right expand to find /msg/wfl/usr/<containername>/row. Connect the row on the left to the row on the right. They have the same sub-schema so the fields are the same.
Now this means that, by default, for every subsequent transformation in your worklow, /msg/wfl/usr/<containername>/row will have the data from your input file. This is true because the default schema for a transformation maps /msg/wfl/usr to /msg/wfl/usr so the data is always copied, unless you break the link.
See the 'message extensions' topic in the SC help, or pp.88-92 in the SC User Guide.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
bspolarich@...<mailto:bspolarich%40advancedphotonix.com> ~ 734-864-5618 ~ www.advancedphotonix.com
-----Original Message-----
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Ken Williams
Sent: Monday, October 05, 2009 4:02 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Service Connect - Change Part Plant VendorID
I tried Part.Update but I couldn't get it to make any change to the VendorID.
I tried setting to "U" without anything else, and this must be what "modified" means as it did get me a step further. My next question is, how do I generate schema that includes my CSV file and Part.GetByID()?
That is, what I think you're telling me...and the messages I'm getting back about null fields...is that I have to have all of the Part Plant data to be able to use the RowMod "U" field. I'm seeing a workflow that looks like:
Start -> Conversion (CSV to XML) -> Part.GetByID() -> Part.ChangePartPlantVendorID()
The Part.ChangePartPlantVendorID needs data from both the conversion (where the new VendorID exists) & the Part.GetByID() (where all the other data exists).
This is probably an elementary question, forgive my questions as this is a new process for me.
Thanks,
Ken
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Brian W. Spolarich
Sent: Monday, October 05, 2009 1:44 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Service Connect - Change Part Plant VendorID
Perhaps someone will have a more complete answer, but I think this is probably what you want to do:
1. Call Part.GetByID() for each Part.
2. Call Part.ChangePartPlantVendorID () for each Part, setting the following:
- Company at the top.
- PartPlant.Company, .Plant, .PartNum, from the results of GetByID.
- PartPlant.VendorNumVendorID as the VendorID.
- PartPlant.RowMod as the literal string "U"
3. Alternatively, just call Part.Update with the same arguments. You may have better luck with Update() since the web wrappers I believe do more helpful things behind the scenes with the generic Update() methods than the other specialized ones.
-bws
--
Brian W. Spolarich ~ Manager, Information Services ~ Advanced Photonix / Picometrix
bspolarich@...<mailto:bspolarich%40advancedphotonix.com><mailto:bspolarich%40advancedphotonix.com> ~ 734-864-5618 ~ www.advancedphotonix.com
-----Original Message-----
From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of Ken Williams
Sent: Monday, October 05, 2009 3:31 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Service Connect - Change Part Plant VendorID
We're trying to do a large update of our part plant records for changes to VendorID's on parts.
I've got a working parts update routine that pulls in data from a CSV, calls a sub workflow and cycles for each part in the list. This works well.
I've tried copying the same setup for ChangePartPlantVendorID and I get the following error: "Cannot find record for this change".
When I look up the web service @ http://svchost/vantageservices/partservice.asmx, I see the following note about ChangePartPlantVendorID:
The ChangePartPlantVendorID Web method accepts the following arguments:
o The new Vendor ID value. (ParameterInfo)
o The PartDataset. IMPORTANT, the PartPlant record must be sent as modified otherwise you will received error that record cannot be found. (ParameterInfo)
What does it mean when it says the PartPlant record must be sent as modified?
Thanks,
Ken
[Non-text portions of this message have been removed]
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/><http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.<http://groups.yahoo.com/group/vantage/files/>
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
[Non-text portions of this message have been removed]