|
Home > Archive > BizTalk Server Orchestration > August 2004 > Orchestration - Business Rules
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 |
Orchestration - Business Rules
|
|
|
| Hi All,
I created Business Rule with the Business Rules Composer
which looks like this
IF
Microsoft.VisualBasic.Strings.Len(SOME XML FIELD) is
equal to 10
THEN
Do Something
I called this rule from Orchestration. The documentation
says that I need to pass an instance of .Net objects while
calling using the "CALLRULES" shape from orchestration. I
created a variable as type Microsoft.VisualBasic.Strings
class and passed it in the "CALLRULES" shape.
But while building the project, I get compliation error
saying "Uninitialzed variable used", I cannot create an
instance of the Microsoft.VisualBasic.Strings class, how
can I pass an instance of Microsoft.VisualBasic.Strings
class? Or am I doing something wrong here. All I want to
do is checking len and some string operations like Mid etc.
Can somebody help me?
Thanks,
Veena
| |
| Neal Walters 2004-08-19, 2:48 am |
| A couple of question to help clarify:
1) Are you passing an XML message to the Business Rule engine?
2) Do you have a full xpath expression (or vocabulary) in
this statement:
Microsoft.VisualBasic.Strings.Len(SOME XML FIELD)
3) Len is a shared (static) function, so it doesn't seem like you would need
an object of that type.
Neal Walters
http://Biztalk-Training.com - Biztalk Training Videos
| |
|
| Neal,
Thanks for your reply.
1. Yes I am passing an XML message to the Business rules
engine.
2. Yes I have a Full vocabulary
I'll recheck again, if you think of somethin else pls let
me know
Thanks,
Veena
>-----Original Message-----
>A couple of question to help clarify:
>1) Are you passing an XML message to the Business Rule
engine?
>2) Do you have a full xpath expression (or vocabulary) in
>this statement:
>Microsoft.VisualBasic.Strings.Len(SOME XML FIELD)
>3) Len is a shared (static) function, so it doesn't seem
like you would need
>an object of that type.
>
>Neal Walters
>http://Biztalk-Training.com - Biztalk Training Videos
>
>
>
>.
>
| |
| Alvaro Miranda [MSFT] 2004-08-19, 5:52 pm |
| I think you can't use Microsoft.VisualBasic.Strings because it doesn't have
a public constructor.
For XML field, you could use the string-length() xpath function.
Select the xml field in the XML fact explorer, change the XPath Field
property from something like:
*[local-name()='Field' and namespace-uri()='']
to:
string-length(*[local-name()='Field' and namespace-uri()=''])
Then change the Type property to System.Double. Now you can drop the field
to the condition.
Note that this works properly only if you have one field for the
corresponding XPath selector.
If you need to use the field's value, remember to restore the XPath Field
and Type properties to their original values before dropping it on the
editor.
--------------------[vbcol=seagreen]
<FD1959B1-8A6B-40F2-A8C5-497E2834E571@microsoft.com>[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
|
|
|
|
|