- If a workflow process needs to be invoked synchronously like, via button click on the UI or some action done by user, RTE can be used. The best part is if the Workflow is also based on the active business object, system will automatically set the "Object Id" process property with the Row Id of the primary business component on UI. Moreover, the complete context of the UI handed over to the workflow.
Note: RTE will not get invoked if the business object, on which workflow is based on, is different from the UI context BO. - In the scenario where point#1 can't be used due to any reason i.e. workflow is not based on any BO, then the only way to pass the Row Id or any other field values of the current record to the workflow is via setting the profile attributes. In the RTE action set, you can set the profile attibutes as the first step and in the next step call the desired workflow. Then inside the workflow, you can read the profile attribute values.
. - One of the tracking feature that OOB provides is, if you have "Monitoring Level" set to "4 - Debug" for a workflow process, and if that workflow process being called from RTE then system automatically add a new property named "Triggering Event" with the Row_Id of RTE. So it becomes easy to track the triggering event.
Wednesday, July 24, 2013
Siebel Runtime Event and Workflow Process
Monday, July 18, 2011
How to send email containing multiple child records data?
XSLT (XSL Transformation) can do wonders for this kind of requirement where the basic idea is to get data in XML hierarchy from Siebel (which you can easily do via EAI Siebel Adapter and convert it into XML) and apply the XSL transformations to get the HTML output. And as far as you know how to play with HTML and XSL, you can create any kind of email format that you like to see. All you need is to use EAI XSLT Service business service with method Transform.
Below picture might give you some idea of it:

To understand the concept, let suppose:
1. As soon as an Opportunity gets submitted, you are required to send an email to the Sales person to inform him.
2. Email should have the details of child records created under that Opportunity.
3. Email should have some kind of formatting so that it looks good and eye-catching.
You might be thinking what is a big deal in it and why should I even use the XSLT (new term for lot many people) for it? There is a simple reason behind it, there is NO OOB way available in Siebel (as far as I know) by which you can include the data from Child records (multiple) in the email.
Let me first show you the proof-of-concept and later we will discuss about the technical solution.
1. I have below opportunity created with 2 records of Opportunity Products.
2. It has also 3 Quote records created under it.
3. As soon as Opportunity get submitted, system is required to send the email to the sales person.
4. Here below is the email, I would like to receive:
If you find that interesting, keep reading for the technical details of it.
Pre-requisite
Please note that for this demo, I have used a Integration Object (Opportunity) based on Opportunity BO with having only 3 ICs configured: Opportunity, Opportunity Product and Quote. And include only those fields whose values are required in the final email, for eg: Oppty Name, Product Name, Net Price, Quote Name etc. (Please refer the first picture of this post, XML part)
Technical Solution
1. Call a Workflow (based on Opportunity BO) as soon as Opportunity gets submitted.
(Note: System will automatically pass the row_id of Opportunity to "Object Id" process property of the Workflow Process)
Here below is the WF snapshot.

2. Process Properties

3. Step Details:


Code for XSLTBuffer
<?xml version="1.0" encoding="UTF-16"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><h2>You have got an Opportunity to act on:</h2><h4>Opportunity Name : <span style="color:#ff0000"><xsl:value-of select="ListOfOpportunity/Opportunity/Name"/></span></h4><h3>Here below are the Product Details:</h3><table border="1"><tr bgcolor="#9acd32"><th>Product</th><th>Quantity</th><th>Net Price</th><th>Revenue</th></tr><xsl:for-each select="ListOfOpportunity/Opportunity/ListOfOpportunityProduct/OpportunityProduct"><tr><td><xsl:value-of select="Product"/></td><td><xsl:value-of select="ProductQuantity"/></td><td><xsl:value-of select="ProductPrice"/></td><td><xsl:value-of select="Revenue"/></td></tr></xsl:for-each></table><h3>Here below are the Quote Details:</h3><table border="1"><tr bgcolor="#9acd32"><th>Quote Name</th><th>Revision</th><th>Status</th> </tr><xsl:for-each select="ListOfOpportunity/Opportunity/ListOfQuote2/Quote2"><tr><td><xsl:value-of select="Name2"/></td><td><xsl:value-of select="Revision"/></td><td><xsl:value-of select="Status"/></td></tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet>
If you want to learn about XSLT more, then please refer the below link:
http://www.w3schools.com/xsl/
Tuesday, July 20, 2010
Purging Vs Deleting Workflow Process Instances
Whenever you increased the Monitoring Level to "4-Debug", system starts capturing the WF steps details along with the each Process Property at each step, to give a better picture of what has exactly happened at each step and it is very helpful for debug purpose. You can see all Run-time degugging details in "Administration - Business Process -> Workflow Instance Monitor" view.
"Process Instances" gives you all the Workflow Instances run once the Monitoring Level has been increased. It all tells the currently running WF Step.
"Step Instances" captures the details of each step along with its start and end time.
"Process Properties" captures the value of each process property in each WF step.
Though this information is useful but it is a good practice to decreased the log level back to "0-None", once you are done with debugging and also the most important thing you should do is "Purge" all the Workflow Process Instances. Navigate to "Administration Business Process -> Workflow Instance Monitor -> Process Instances", query for the workflow process and click "Purge".
Now, why I am saying this last step of purging these records as "very important"?
Let me tell me what actually happened when I was debugging one of the workflow issue. I increased the monitoring level to 4 for debugging purpose and that workflow was having around 30 workflow steps and around 50 process properties. Additionally, this workflow runs on the child activities (average number around 50) of the Service Request. So you try calculate the number of process property instances record (in S_WFA_STPRP_LOG), system will create in a single workflow run = 30 x 50 x 50 = 75000. Big number isn't it?? So if I debug this workflow few number of times, the number of records will be really huge. But remember, as far as you are purging the records after debugging finishes, then no issues, but if you don't then these records will pile up and some day your database size will run short out of physical space.
So what actually happened was, I made few changes in the workflow and deployed again. Went to "Administration Business Process -> Workflow Deployment" and queried the workflow process and hit "Activate". In the below "child items" applet, system creates a new version of the workflow process with Deployment Status = Active and the older record becomes gets its status = Inactive. So I thought this record is Inactive, let me delete this old instance. I did that few number of times and never realizes that it will just delete this record from "S_WFA_DPLOY_DEF" table and its corresponding child records in "S_WFA_STPRP_LOG" table will keep sitting there. And there is no way you can "Purge" these records from the UI using "Purge" button because the parent record has been deleted earlier.
So it end up having millions of records in this table without parent record and later we realized the database is running short of physical memory and when I checked for the tables in the database which all having huge number of records, we found "S_WFA_STPRP_LOG" table was leading the race. I did the clean-up of the child records via running some SQLs in the database by finding the orphan records in "S_WFA_STPRP_LOG" and learned the lesson using "Purge" button after completing the debugging.
Hope this will also help you in future.
Tuesday, December 1, 2009
Debugging Siebel eMail Response !!
(For people who are new to this subject, to find these workflows you need to query in Siebel tools as "eMail Response*", and if you want to learn configure these, just follow the simple steps given in Communications Server Administration Guide)
I really like this OOB feature of Siebel as it works like a magic: user sends an email to Siebel email box whichever you have configured, Response Group keeps monitoring that and whenever see a new email just picks it up, delete it from the email box and invoke the Siebel Workflow. Now from here you can do anything what any workflow in Siebel is capable of doing, design your workflow as per the requirement and you are done.
Pretty simple isn't it, but sometimes it tough to debug it if you land-up in some issue here. I was working on the similar kind of requirement where everything seems working fine but the only problem was: "Response Group was not able to pick the email from Siebel email box".
Response Group only job is to just pick the email and create a MIME format file in "<_siebsrvr>/bin/incoming" folder and passes it as an input argument to eMail Response workflow, but since Response Group was not able to pick the email, so I thought of confirming whether it is reaching to the Siebel emailbox or not, so I logged into webmail client and found all emails keep lying there only.
Since I was able to see all the emails and I have also verified the username/password being used for the email profile in Siebel was correct, that means there is some problem with the POP3 setting of the emailbox. So to check it what you can do is :
a) Get the POP3 server name / username / password for the emailbox which is being monitored by reponse group. (You can find it in "Administration - Communications -> Communications Drivers and Profiles" view by querying for the communication drivers as "Internet SMTP/POP3 Server" and check the name in "Profile Parameter overrides" applet).But I recieved an error message saying "Unknown username or bad password"
b) Click Start -> Run -> type "telnet <_servername>pop3", hit enter.
c) In Telnet window, type "USER <_username>" (without quotes)
if you see +OK, that means username is correct.
d) Type "PASS <_password>" (without quotes)
if you see +OK, that means password is correct.
So this is something we can't control from Siebel, I checked with the Server administration team who handles all the email servers and they fixed the issue for POP3 settings on the email box and tried the above steps again and this time no error.
[Server admin people really likes to resolve the issue when you go to them with the exact root cause ;) ]
One more reason I can think of for such a behaviour when you have not clicked on "Submit Response Group Changes" for the Response group monitoring the emailbox.
Thursday, July 30, 2009
How to call "Asynchronous Server Requests" business Service?
There are only two ways (that I know my past experience, please add if anyone know more) by which you can call "Asychronous Server Requests" Business Service :
a) Via e-Script : easy way to do that and most people know this.
b) Via Workflow : this is bit tricky
Here is the piece of code that you can to achieve the above requirement :
var svc = TheApplication().GetService("Asynchronous Server Requests")
var input = TheApplication().NewPropertySet();
var child = TheApplication().NewPropertySet();var output = TheApplication().NewPropertySet();
input.SetProperty("Component", "WfProcMgr");child.SetProperty("ProcessName", "Send Email Opportunity Sales Rep");child.SetProperty("OpptyId", "1-XR45");input.AddChild(child);svc.InvokeMethod("SubmitRequest", input, output);
Via Workflow :
Here is the example below in which I have used this and you can accomodate the below two steps in any of the workflow you are using :
Process Properties :Step1: Set Input Arguments
Step2: Call Asynchronous Service
Business Service : Asynchronous Server Requests
Business Service Method : SubmitRequest

Thats it, you are done. Just to add it here, I tried doing the same stuff with the help of runtime events but it is limitation there and we cannot do that.
.
Friday, July 24, 2009
How to Pass arguments between Workflow & Customize Business Service?
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 :
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 !!
.
Wednesday, May 6, 2009
Debugging Siebel Workflow Process at Runtime
Siebel provides a way to debug a already deployed workflow at the runtime and its very easy as you can do it in web client itself. What you need to do is :
1. Navigate to "Administration-Business Process -> Workflow Deployment -> Active Workflow Processes" view.2. Query for the Workflow Process in the bottom applet.3. Change the "Monitoring - Level" for the workflow process to "4 - Debug".4. Now go and perform the same action again which will trigger this workflow.5. If it again errored out or not performed as per the expectation and you want to track it execution step by step, navigate to : "Administration-Business Process -> Workflow Instance Monitor" view.6. Query for the Workflow Process in upper applet. System will show all the instances executed for that workflow in the bottom applet. Sort the instances via "Start Date" descending.7. Navigate to "Step Instances" view.8. Now you can see, what all process properties were in each step of the workflow and make out what went wrong.
Sunday, April 26, 2009
Scheduling Automatic Export in Siebel
Lets see how this is achievable :
On the very high level, the solution is to :
- Create a Workflow which can take the Export and send it in an email to the user.
- Create a RCR (Repeating Component Request) which will get executed on the daily basis and run a workflow.
Workflow Creation:
Here below are major steps that used in Workflow to acheive the solution.
- Query Service Request
Business Service Name = Import/Export
Business Service Method = Export
Input arguments for this step are as follows :
==> FileName : "<_filename.xls>" (for eg: /temp/export.xls). Please make sure you should provide the extension as .xls
==> FileType: XML
==> IntObjectName : Service Request (this is the IO that I have created which has only one Integration Component i.e. Service Request). You can also use the OOB available IO for this purpose, if fits into the requirement. - Send Email
Business Service Name : Outbound Communications Manager
Business Service Method Name : SendMessage
Input arguments for this step are as follows :
==> MsgToList : "<_youremailaddress>"
==> CommProfile : "<_communicationprofilename>". if you want to know, how to setup a Communication Profile, please refer to :
http://siebelmantra.blogspot.com/2009/04/how-to-setup-communication-profile-for.html
==> MsgSubject : Export from Siebel
==> MsgBody : This is the test export from Siebel
==> AttachFileList : <_filename.xls>. (for eg: /temp/export.xls).
Workflow is ready, Publish and Activate it and simulate it on the Server to check if running fine.
RCR (Repeating Component Request) Creation :
Here below are the steps for creating the RCR job and let the Workflow run on the daily basis.
- Navigate to "Administration-Management -> Jobs" view.
- Click on "New" and select "Component/Job" = "Workflow Process Manager".
- Under Repeating Info section, select the following :

- Under Job Parameters applet, create a new select with the following info :
Workflow Process Name : <_name> - Click on "Submit Job"
And you are done with the complete process. Siebel will automatically take the export and send you the file on the daily basis.
Enjoy !!!!