BizTalk Server Orchestration - using enumerations in an expression shape

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > October 2005 > using enumerations in an expression shape





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 using enumerations in an expression shape
sean rogers

2005-10-12, 6:12 pm

hi

in an expression shape i instanciate a variable (which is type of one of my
own classes)

one of the properties of my class is an enumeration.

In my expression shape i want to populate this property with a valid enum
value.

i created a variable of type (my enum) but i am unable to use the dot
operator to expose the values in that enum.

how do you do this please

thanks
Stephen W. Thomas

2005-10-13, 6:00 pm

Hello.

I do not think that is supported inside an Orchestration. It’s not true C#
code inside an expression shape.

This post might help: http://geekswithblogs.net/cyoung/articles/3820.aspx

Stephen W. Thomas
http://www.biztalkgurus.com
http://geekswithblogs.net/sthomas/


"sean rogers" wrote:

> hi
>
> in an expression shape i instanciate a variable (which is type of one of my
> own classes)
>
> one of the properties of my class is an enumeration.
>
> In my expression shape i want to populate this property with a valid enum
> value.
>
> i created a variable of type (my enum) but i am unable to use the dot
> operator to expose the values in that enum.
>
> how do you do this please
>
> thanks

Tomas Restrepo \(MVP\)

2005-10-13, 6:00 pm

Stephen,

>
> I do not think that is supported inside an Orchestration. It's not true
> C#
> code inside an expression shape.


Humm... I did something like this very recently, initializing an Enum
variable of an orchestration from a value returned from a component, and
then comparing it to a an actual Enum value in a decide shape, and that
worked fine... The only trick was, as usual, remembering that you have to
provide the full enum type name when doing it, and you have to ensure the
enum is serializable to put it outside of an atomic scope.

Then again, this was on BTS06 beta 1, but I was under the impression that
little changed as far as XLANG/s itself is concerned...


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/


Stephen W. Thomas

2005-10-13, 6:00 pm

Hello.

I think it is supported in Biztalk 2006. They made some changes to make
more things available via “.” and support for Arrays and Collections – if I
remember right.

I don’t remember the exact details but I know we had problem with them in
the past. Might have to due with not having the emun values as properties
(i.e. not using Get and Set to access them).

What if you made them static?

Stephen W. Thomas
http://www.biztalkgurus.com
http://geekswithblogs.net/sthomas/


"Tomas Restrepo (MVP)" wrote:

> Stephen,
>
>
> Humm... I did something like this very recently, initializing an Enum
> variable of an orchestration from a value returned from a component, and
> then comparing it to a an actual Enum value in a decide shape, and that
> worked fine... The only trick was, as usual, remembering that you have to
> provide the full enum type name when doing it, and you have to ensure the
> enum is serializable to put it outside of an atomic scope.
>
> Then again, this was on BTS06 beta 1, but I was under the impression that
> little changed as far as XLANG/s itself is concerned...
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com