Friday, July 24, 2009

How to Pass arguments between Workflow & Customize Business Service?

Generally what happens is whenever we create any Customize Business Service, we rarely create "Methods" for it under "Siebel Tools -> Object Explorer-> Business Service -> Business Service Method". What we do is we directly start coding in "Service_PreInvokeMethod" like :
Today I am going to tell you how we can pass arguments of type "String" and "Hierarchy" in the call to Customized Business Service (which don't have any methods specified in "Business Service Method" also don't have any Input/Output arguments specified). If you have worked on the similar requirement earlier, you might be knowing the trick here but for the new people this might be useful.

Lets take the "String" arguments first :

Assuming a requirement to create a workflow where we need to call a customized business service which contains the complex logic and return back the Service Request's status. Please cosider this a requirement for an example here.

Input to Customized Business Service : Service Request Number
Output from Customized Business Service : Status

Here is the Workflow :

So, this seems very simple, right, whatever the "property name" I am setting in the Business Service, the same name should be used in the "Output Argument" of the step.

Lets see what extra need to do in case you are passing a Hierarchy as Input/Output arguments.

Workflow Requirement :
1. Query via EAI Siebel Adapter to get the SiebelMessage for Service Request Number.
2. Pass the Siebel Message as Input Argument to Customized Business Service to update something in it.
3. Get the updated Siebel Message as Output from Customized Business Service.
4. Update the Service Request via EAI Siebel Adapter.

Here is the workflow :

I think you need to try it out at your end to actually understand the trick here. Check it out !!



  1. good work there.reminds me of my first days of customised business services.

    there are some vanilla business services which accept inputs as < value >. do you know how to implement this in custom scripts ?

  2. Good Question !!
    Yes you can use "< Value >" that you get as an output for huge number of Vanilla Business Services.

    Lets say you are getting the "Out" property set as the output from the business service (for example : EAI XML Converter), then you can get the value like :


    You can also try using "EAI XML Write to File" with method "WritePropSet" to see how value of "< Value >" looks like.

    Check it out !!

  3. Hi Gaurav,

    Is there anything additional I need to do if I need to pass SiebelMessage as respose to my inbound integration. I have used business service for the integration.

  4. @Anomymous

    You just need to set the SiebelMessage (propertyset) as a Child of Output property of the business service. (please note I am assuming that the method your are calling should have an Output argument of name "SiebelMessage").
    So, just set the type of propertyset to "SiebelMessage" and add it as a child of "Outputs" propertyset, which is actually the output of the business service that you are calling during inbound integration.

  5. Hi,
    thank you Gaurav, great post. I am working in siebel 8.0 and I had to copy input property set and then assign it to Outputs PS. Like this:

    sblMsg = Inputs.GetChild(0).Copy();

    Without that "Copy()" call, WF was throwing error like "Argument OutSiebelMessage is not properly inicialized or does not return valid data."
    Maybe this will save someone few hours of work.

  6. Nice Blog, Can you give me the steps to Updating a Field with an Appending Information [ ex.. [Comment] = [Comment] + "Name"]in Child Business Component.[Through Workflow].I tried it. But it doesn't work for Multiple Records..... the second record and the following records fields are updated as First records field value. I am a beginner....

  7. Thanks for your previous post.. explain the Workflow steps in detail for iterating multiple records in a child Business component and update a field with appending data with the Existing Field Value
    Thank you

  8. Hi Gaurav,

    I want to call ISS Authoring Import Export Service from command prompt. I thought I can include this BS in workflow and call that workflow from command line instead. Having tough time creating small workflow to invoke this BS. Any leads are much appreciated.
    BS name : ISS Authoring Import Export service
    method name: Post_EIM_Upgrade
    Property name : ReportOnly
    Property value: False
    workflow would be Start -> BS -> End.
    Using Siebel 8.1. Thanks in advance.