This article is a continuation of the Impossible Solutions Poll Results post.
If you have been following this blog, it probably dosnt need any further introduction.
This solution has been contributed by Michael Feng, a respected colleague, who dosnt know the meaning of impossible and is an all round nice guy.
[ Michael's solution ]
Key Points:
Using XML Gateway Business Service to serve the VBC
Using Business Integration Manager (Server Request) as Transport Protocol
Create your own workflow to deal with the logic
Architecture:
- VBC trigger XML Gateway: Init(), Query(), etc
XML Gateway generates xml files corresponding to the command. Eg. It generates xml file
<siebel-xmlext-fields-req>
<buscomp id="1">Contact</buscomp>
</siebel-xmlext-fields-req> - XML Gateway triggers Business Integration Manager to invoke SendReceive() method
- Business Integration Manager sends the xml files generated by XML Gateway to Workflow
- Workflow gets the xml file and passes it to external application like MQ Series, MSMQ, HTTP Web Application or processes it inside the Siebel
- Workflow gets the result xml file from external application or Siebel Application and passes it back to Business Integration Manager (BIM)
- BIM receives the result xml file and passes back to XML Gateway to populate the VBC
Matching Init() command
Points of configuration:
- Create a BC of Class CSSBCVExtern
- Configure the above BC with following user properties
Service Name: XML Gateway
Service Parameters: Transport=EAI Business Integration Manager (Server
Request);ProcessName=<Name of WF>; - Create a process property as type of binary/string. Set the default to <Value>. It will hold the xml file generated by XML Gateway
- Create a process property as type of binary and named <Value>. It will pass back to BIM and XML Gateway to populate the VBC
- Analyse the xml file generated by XML Gateway to determine what action to be taken. (Query, Insert…)
- Use XSLT to transform the result xml file to the format XML Gateway needs to populate the VBC
Sample Workflow Design
Workflow Process Properties
Step | Type | Method | Business Service |
SaveIncomingXML | Business Service | Send | EAI File Transport |
Input Argument | Type | Value | Property name |
<Value> | Process Property | IncomingXML | |
FileName | Literal | C:\XMLGateway.txt | |
AppendToFile | Literal | True |
Step | Type | Method | Business Service |
Analyse Incoming XML | Business Service | Echo | Workflow Utilities |
Output Argument | Type | Value | Property name |
CheckPoint | Expression | InStr([&IncomingXML],"fields-req") |
Step | Type | Method | Business Service |
Is Init Request? | Decision Point | ||
Branch | Condition | Expression | |
Is Init | Condition | (CheckPoint Greater Than('0')) | |
Not Init | Default |
Step | Type | Method | Business Service |
Get Init XML Response | Business Service | Receive | EAI File Transport |
Input Argument | Type | Value | Property name |
FileName | Literal | C:\TEMP\TestVBCInit.xml | |
Output Argument | Type | Value | Argument name |
<Value> | Output Argument | <Value> |
Step | Type | Method | Business Service |
Analyse Incoming Query XML | Business Service | Echo | Workflow Utilities |
Output Argument | Type | Value | Property name |
CheckPoint | Expression | InStr([&IncomingXML], "query-req") |
Step | Type | Method | Business Service |
Is Query Request? | Decision Point | ||
Branch | Condition | Expression | |
Is Query | Condition | (CheckPoint Greater Than('0')) | |
Not Query | Default |
Step | Type | Method | Business Service |
Get Query XML Response | Business Service | Receive | EAI File Transport |
Input Argument | Type | Value | Property name |
FileName | Literal | C:\TEMP\TestVBCQuery.xml | |
Output Argument | Type | Value | Argument name |
<Value> | Output Argument | <Value> |
TestVBCQuery.xml
<?xml version="1.0" encoding="UTF-8" ?>
<siebel-xmlext-query-ret>
<row>
<value field="Title">Mr.</value>
<value field="First Name">Sara</value>
<value field="Last Name">Chan</value>
</row>
</siebel-xmlext-query-ret>
TestVBCInit.xml
<?xml version="1.0" encoding="UTF-8"?>
<siebel-xmlext-fields-ret>
<support field="Last Name"/>
<support field="First Name"/>
<support field="Title"/>
</siebel-xmlext-fields-ret>
This solution provides a proof of concept for you to build upon, and therefore dosnt include the steps needed to send/recieve or transform your XMLs and there are more elegant ways of querying your XML for a string, but that is left for the reader to play with.
Working with Transports, XML and VBCs are probably one of the most difficult areas of Siebel to work with, but Michael has provided us with a nice foundation for any of us to take this further, and all without writing a line of code.