请教一下,我创建了6个钢板用entity表示,钢板的厚度有三种分别用1,2,3表示。在entity的自定义属性里面创建了thickness的属性定义为integer型分别给每个钢板厚度赋值。在分流运输时,创建了一个flow对象,后接三个buffer,编辑了一个method对象添加给flow的exit从而根据厚度对钢板进行分流,我写的method如下:3 H0 A) P$ f1 I6 p; a) R5 O
:integer' V* s* N* f0 W0 s
is2 z$ Y- @8 |0 z C, d4 P
m :integer;Thickness :integer;1 m' Y1 l/ h8 A; N* u
do. e0 s0 L4 b( B0 a& Y
m=@.Thickness;. V h2 i$ R2 J5 x' L
if m=1then( n" t( n" S! H( M. U: X
return 1;
9 g7 `* P5 V( T/ [8 U0 Oelseif m=2then
5 L9 R. [# m* |, Z. K5 Freturn 2;
- X A9 E) R6 h Zelse
" P9 ?: L( Q, B9 T. C5 K% Ereturn 3 ;- P( e" l0 U1 w! L4 V% e$ t0 ?! u
end;
$ z, m$ e, n3 N2 gend;只有读了entity1可以被运输到相应的Buffer上,再读entity2就说不识别Thickness了,我想不明白了,请大家有时间帮忙解惑一下,不甚感激 |