2009-12-27 6 views
1

선언에서 BPEL 변수를 초기화 할 수 있습니까? 그렇다면 어떻게?BPEL 변수 초기화

선언 예 :

<variables> 
    <variable name="offer" type="xsd:float"/> 
    <variable name="response" type="xsd:string"/> 
</variables> 

답변

4

가능합니다. BPEL 2.0은 변수 선언에서 직접 from-spec을 허용합니다. 그러나이 기능은 모든 BPEL 엔진에서 구현되지 않습니다. Apache ODE는 이러한 인라인 초기화를 처리 할 수 ​​없습니다.

다음 코드가 유효 BPEL 2.0 :

<variables> 
    <variable name="response" type="xsd:string"> 
     <from>'TocToc'</from> 
    </variable> 
    <variable name="offer" type="xsd:float"> 
     <from>100</from> 
    </variable> 
</variables> 

예를 들어, [1] 및 섹션 8.1 (45 페이지)의 페이지 121 참조하세요 [1]를 정의.

[1] http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.pdf

0
일부 인터넷 검색 후

, spec 및 예제를 읽고 ... 나는 우리가 우리가 그것을 할 필요가 원하는 경우가 ... 선언에서 BPEL 변수를 초기화 할 수 없습니다 생각 프로세스 순서 :

... 
    <variables> 
     <variable name="response" type="xsd:string"/> 
     <variable name="offer" type="xsd:float"/> 
    </variables> 
... 
    <sequence> 
     <receive createInstance="yes" .../> 
... 
     <assign name="init"> 
      <copy> 
       <from>100</from> 
       <to variable="offer"/> 
      </copy> 
      <copy> 
       <from>'TocToc'</from> 
       <to variable="response"/> 
      </copy> 
     </assign> 
... 
+0

을보십시오 내 대답 위, BPEL 변수 선언에서 스펙에서 인라인로 초기화 할 수있다. – vanto

1

우리는 오라클 BPEL을 사용하고 속성은 같은 bpel.xml 파일에 설정할 수 있습니다 :

<preferences> 
    <property name="output_file" encryption="plaintext">logging.txt</property> 
    <property name="expire_hours" encryption="plaintext">10</property> 
    <property name="retry_count" encryption="plaintext">4</property> 
</preferences> 

ora : getPreference ("varname")를 사용하여 코드에서 액세스 할 수 있습니다.

이들은 BPEL 콘솔에도 표시되며 필요한 경우 관리자가 변경할 수 있습니다.