Is it possible to initialize BPEL variables at the declaration ? if so how ?
declaration example :
<variables>
<variable name="offer" type="xsd:float"/>
<variable name="response" type="xsd:string"/>
</variables>
Is it possible to initialize BPEL variables at the declaration ? if so how ?
declaration example :
<variables>
<variable name="offer" type="xsd:float"/>
<variable name="response" type="xsd:string"/>
</variables>
After some googling, reading spec and examples ... I think it's not possible to initialize BPEL variables at the declaration ... If we want we need to do it in the process sequence :
...
<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>
...
We use Oracle BPEL and it allows properties to be set in the bpel.xml file like such:
<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>
The can be accessed in the code using ora:getPreference("varname")
These also show up on the BPEL console and can be changed by an admin if necessary.