Difference between revisions of "GVBuffer"
Line 7: | Line 7: | ||
*Properties: contains a collection of <name, value> pairs that represent additional properties of the flow | *Properties: contains a collection of <name, value> pairs that represent additional properties of the flow | ||
*Payload: contains the service current payload, that can be represented in several ways (JMS messages, byte array, String...) | *Payload: contains the service current payload, that can be represented in several ways (JMS messages, byte array, String...) | ||
+ | |||
+ | ==Configuration== | ||
+ | To define a {{GVBUFFER}} simply insert its identifier as input or output node's property (or xml attribute). (Some) Nodes of the flow are responsible for modify the defined {{GVBUFFER}}. | ||
+ | |||
+ | ====Example==== | ||
+ | In the example below is shown a flow composed of Four nodes. The first one presents an incoming {{GVBUFFER}} associated to the identifier 'to_process'; the result of the node will be into another {{GVBUFFER}} associated to the identifier 'data'. Subsequent nodes will work on the same buffer ('data'), which will be the output parameter of the <GVEndNode>: so information in it will be delivered to the client. | ||
+ | |||
+ | <syntaxhighlight lang="XML"> | ||
+ | <Flow first-node="extract_data" point-x="19" point-y="137"> | ||
+ | <GVOperationNode class="it.greenvulcano.gvesb.core.flow.GVOperationNode" | ||
+ | dump-in-out="false" id="extract_data" | ||
+ | id-system="CREDIT" input="to_process" | ||
+ | next-node-id="add_ext" op-type="call" | ||
+ | operation-name="CreditCards" output="data" | ||
+ | point-x="149" point-y="140" type="flow-node"/> | ||
+ | <ChangeGVBufferNode class="it.greenvulcano.gvesb.core.flow.ChangeGVBufferNode" | ||
+ | dump-in-out="false" id="add_ext" input="data" | ||
+ | next-node-id="send_email" | ||
+ | op-type="change GVBuffer" point-x="309" | ||
+ | point-y="137" type="flow-node"> | ||
+ | <ChangeGVBuffer clear-data="false"> | ||
+ | <PropertyDef name="FILE_EXT" | ||
+ | value="decode{{ognl{{property['BIRT_REPORT_TYPE']}}::excel::xls::pdf}}"/> | ||
+ | </ChangeGVBuffer> | ||
+ | </ChangeGVBufferNode> | ||
+ | <GVOperationNode class="it.greenvulcano.gvesb.core.flow.GVOperationNode" | ||
+ | dump-in-out="false" id="send_email" | ||
+ | id-system="CREDIT" input="data" | ||
+ | next-node-id="end" op-type="call" | ||
+ | operation-name="SendEmailSVCResponse" | ||
+ | output="data" point-x="473" point-y="137" | ||
+ | type="flow-node"/> | ||
+ | <GVEndNode class="it.greenvulcano.gvesb.core.flow.GVEndNode" | ||
+ | end-business-process="yes" id="end" op-type="end" | ||
+ | output="data" point-x="671" point-y="137" | ||
+ | type="flow-node"> | ||
+ | <ChangeGVBuffer clear-data="true"/> | ||
+ | </GVEndNode> | ||
+ | </Flow> | ||
+ | </syntaxhighlight> |
Revision as of 18:38, 8 February 2012
Description
A GVBuffer is a complex data structure used to carry information from one node to another along a flow. When a service flow reaches its end node, if there were no exceptions, the output GVBuffer contains information to return to the client.
Structure
GVBuffers have all the same shape, based on three primary components:
- Platform fields: contains identifying information of the flow such as System, Service, ID...
- Properties: contains a collection of <name, value> pairs that represent additional properties of the flow
- Payload: contains the service current payload, that can be represented in several ways (JMS messages, byte array, String...)
Configuration
To define a GVBuffer simply insert its identifier as input or output node's property (or xml attribute). (Some) Nodes of the flow are responsible for modify the defined GVBuffer.
Example
In the example below is shown a flow composed of Four nodes. The first one presents an incoming GVBuffer associated to the identifier 'to_process'; the result of the node will be into another GVBuffer associated to the identifier 'data'. Subsequent nodes will work on the same buffer ('data'), which will be the output parameter of the <GVEndNode>: so information in it will be delivered to the client.
<Flow first-node="extract_data" point-x="19" point-y="137">
<GVOperationNode class="it.greenvulcano.gvesb.core.flow.GVOperationNode"
dump-in-out="false" id="extract_data"
id-system="CREDIT" input="to_process"
next-node-id="add_ext" op-type="call"
operation-name="CreditCards" output="data"
point-x="149" point-y="140" type="flow-node"/>
<ChangeGVBufferNode class="it.greenvulcano.gvesb.core.flow.ChangeGVBufferNode"
dump-in-out="false" id="add_ext" input="data"
next-node-id="send_email"
op-type="change GVBuffer" point-x="309"
point-y="137" type="flow-node">
<ChangeGVBuffer clear-data="false">
<PropertyDef name="FILE_EXT"
value="decode{{ognl{{property['BIRT_REPORT_TYPE']}}::excel::xls::pdf}}"/>
</ChangeGVBuffer>
</ChangeGVBufferNode>
<GVOperationNode class="it.greenvulcano.gvesb.core.flow.GVOperationNode"
dump-in-out="false" id="send_email"
id-system="CREDIT" input="data"
next-node-id="end" op-type="call"
operation-name="SendEmailSVCResponse"
output="data" point-x="473" point-y="137"
type="flow-node"/>
<GVEndNode class="it.greenvulcano.gvesb.core.flow.GVEndNode"
end-business-process="yes" id="end" op-type="end"
output="data" point-x="671" point-y="137"
type="flow-node">
<ChangeGVBuffer clear-data="true"/>
</GVEndNode>
</Flow>