How to create a VBC without Script - XML Gateway


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>


  • Matching Init() command
  • 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



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



StepTypeMethodBusiness Service
SaveIncomingXMLBusiness ServiceSendEAI File Transport
Input ArgumentTypeValueProperty name
<Value>Process PropertyIncomingXML
FileNameLiteralC:\XMLGateway.txt
AppendToFileLiteralTrue






StepTypeMethodBusiness Service
Analyse Incoming XMLBusiness ServiceEchoWorkflow Utilities
Output ArgumentTypeValueProperty name
CheckPointExpressionInStr([&IncomingXML],"fields-req")







StepTypeMethodBusiness Service
Is Init Request?Decision Point
BranchConditionExpression
Is InitCondition(CheckPoint Greater Than('0'))
Not InitDefault




StepTypeMethodBusiness Service
Get Init XML ResponseBusiness ServiceReceiveEAI File Transport
Input ArgumentTypeValueProperty name
FileNameLiteralC:\TEMP\TestVBCInit.xml
Output ArgumentTypeValueArgument name
<Value>Output Argument<Value>






StepTypeMethodBusiness Service
Analyse Incoming Query XMLBusiness ServiceEchoWorkflow Utilities
Output ArgumentTypeValueProperty name
CheckPointExpressionInStr([&IncomingXML], "query-req")







StepTypeMethodBusiness Service
Is Query Request?Decision Point
BranchConditionExpression
Is QueryCondition(CheckPoint Greater Than('0'))
Not QueryDefault




StepTypeMethodBusiness Service
Get Query XML ResponseBusiness ServiceReceiveEAI File Transport
Input ArgumentTypeValueProperty name
FileNameLiteralC:\TEMP\TestVBCQuery.xml
Output ArgumentTypeValueArgument 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.

Impossible Solutions Poll Results

At Impossible Siebel, we try to provide creative solutions to seemingly imposible tasks in Siebel.

You wont find instructions on how to build/debug workflows, or how to use try/catch statements or other basic how to's, but you will find obscure and different ways of solving Siebel challenges.

I thought about the 4 most interesting problems with Siebel, and offered readers a chance to give their feedback.

If you need a refresh on the original challenges, you can find them here.

The votes have been counted, and it is a land slide victory for VBC without scripting.

I personally had my bets on enabling/disabling multiple showPopups, but the results were obvious from the beginning, people want to know how to create a VBC without using scripting.

I will write solutions for the 1st and 2nd place winners in the poll, and if there is enough interest from readers on the seeing the other solutions, i will publish those in the future.

As a prelude to the solution on a creating a VBC without scripting. There are actually two completely different solutions for this challenge, each with its own pros and cons.

We'll jump right into this one, just hold your breath for a minute...