// Create a copy to global variable.
List<DataPort> outputPorts = endBlockNode.getOutputPorts();
ArrayList<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
for (int i = 0; i < outputPorts.size(); i++) {
DataPort outputPort = outputPorts.get(i);
String variable = outputPort.getID() + OUTPUT_SUFFIX;
int index = blockBlock ? i : i + outputPorts.size();
DataPort inputPort = endBlockNode.getInputPort(index);
Port fromPort = inputPort.getFromPort();
GpelAssignCopyFrom from = createAssignCopyFrom(fromPort);
GpelAssignCopyTo to = new GpelAssignCopyTo(this.bpelNS);
to.setVariable(variable);
GpelAssignCopy copy = new GpelAssignCopy(this.bpelNS, from, to);
copies.add(copy);