|
Home > Archive > BizTalk Server General > August 2005 > Getting database value into a rule policy
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Getting database value into a rule policy
|
|
|
| For the sake of learning Biztalk, I'm running through a number of test
scenarios.
My working orchestration retrieves an infopath form from a sharepoint form
library and changes a value in the form and then puts the form back in the
sharepoint form library. No problems here.
What I would like to get working is for the value that is changed to come
from a database table. In my testing I have a table with a field called
"age" and the value in row 1 is 111. I want to get that value in a rules
policy and set the xml field (also called age) to 111.
Long story short, I added a database fact in the vocabulary to get the value
from the database, but my policy only works in testing. When the
orchestration calls the policy nothing is changed.
One thing I've noticed is that when I test the policy I have to add a
database instance as well as the xml instance. Is there something else I
need to add when calling the policy from the orchestration besides just
sending the message?
solid
| |
| Leo Gan 2005-08-29, 5:56 pm |
| Yes,
You have to set up the Parameters of Rule shape (they are like "instances"
of the fact objects)
--
Leonid Ganeline,
BizTalk Developer
http://public.fotki.com/leogan/
"solid" <solid@discussions.microsoft.com> wrote in message
news:EF566FFC-C0B5-48D8-A911-D8B078EE6C89@microsoft.com...
> For the sake of learning Biztalk, I'm running through a number of test
> scenarios.
>
> My working orchestration retrieves an infopath form from a sharepoint form
> library and changes a value in the form and then puts the form back in the
> sharepoint form library. No problems here.
>
> What I would like to get working is for the value that is changed to come
> from a database table. In my testing I have a table with a field called
> "age" and the value in row 1 is 111. I want to get that value in a rules
> policy and set the xml field (also called age) to 111.
>
> Long story short, I added a database fact in the vocabulary to get the
> value
> from the database, but my policy only works in testing. When the
> orchestration calls the policy nothing is changed.
>
> One thing I've noticed is that when I test the policy I have to add a
> database instance as well as the xml instance. Is there something else I
> need to add when calling the policy from the orchestration besides just
> sending the message?
>
> solid
| |
|
| Ok, that makes sense. The only parameter that I can send to the call rules
is the multi-part message type. I don't see where I can send a database
connection instance (meaning it doesnt appear in the drop down parameter
list).
Thank you for your help.
David
"Leo Gan" wrote:
> Yes,
> You have to set up the Parameters of Rule shape (they are like "instances"
> of the fact objects)
>
> --
> Leonid Ganeline,
> BizTalk Developer
> http://public.fotki.com/leogan/
>
> "solid" <solid@discussions.microsoft.com> wrote in message
> news:EF566FFC-C0B5-48D8-A911-D8B078EE6C89@microsoft.com...
>
>
>
| |
| Matt Milner 2005-08-31, 5:58 pm |
| You need to have a variable of type Dataconnection (from the BRE assembly)
in order to be able to set it as a parameter and you need to initialize it
in your orhcestration with the appropriate sqlconnection. another option is
to create and configure a factretriever for your policy, which is documented
in the help files for BizTalk. This keeps you from having to provide
instances in the composer or orchestration.
Matt
"solid" <solid@discussions.microsoft.com> wrote in message
news:72B5E77B-8E07-4DD9-8A53-359E5EC2BFD1@microsoft.com...[vbcol=seagreen]
> Ok, that makes sense. The only parameter that I can send to the call
> rules
> is the multi-part message type. I don't see where I can send a database
> connection instance (meaning it doesnt appear in the drop down parameter
> list).
>
> Thank you for your help.
>
> David
>
> "Leo Gan" wrote:
>
|
|
|
|
|