166 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
10.Modify the *.wsdl file for the depositServerOp business process.
In the same package, open depositServerOpInterface.wsdl with Source
Editor. Add two new lines in the message tag named InputMessage, as in
Example on page 166.
<part name="Amount" type="xsd:string" />
<part name="AccountNumber" type="xsd:string" />
The result should look as follows:
<message name="InputMessage">
<part name="systemData" type="xsd1:BTTSystemData"/>
<part name="Amount" type="xsd:string" />
<part name="AccountNumber" type="xsd:string" />
</message>
Save and close depositServerOpInterface.wsdl..
11.Implement the snippets for the withdrawalServerOp business process.
Expand the BaseSampleProcess project, and find the package named
withdrawalServerOp.snippets. Edit three Java files inside: initial.java,
state2.java, and state3.java.
For withdrawalServerOp.snippets.initial, add the import class code in
Example 6-13 on top.
Example 6-13 Added import code for withdrawalServerOp.snippets.initial.java
import com.ibm.btt.base.Context;
import com.ibm.btt.formatter.client.FormatElement;
import com.ibm.btt.server.flow.al.workarea.BPWorkArea;
import com.ibm.btt.services.jdbcjournalservice.JDBCJournal;
import com.ibm.btt.services.jdbcjournalservice.Journal;
import com.ibm.websphere.workarea.UserWorkArea;
In the execute() method, add the code in Example 6-14.
Example 6-14 Code for execute() method of withdrawalServerOp.snippets.initial.java
try{
if(getContext().getParent()==null)
//getContext().chainTo(Context.getContextNamed("javaSessionCtx"));
getContext().chainTo(Context.getContextByInstanceID(getSystemData().getInst
anceId()));
// JDBCJournal journal;
Journal journal;