Comparing properties in Siebel Workflow

I came across this in a live Workflow the other day:

What’s happening here is that the comparison of two Workflow Process properties is being done in a custom, eScript Business Service. Further digging revealed that the ‘Is Num >= Max?’ step invoked the following eScript:

function GreaterThanOrEqual(Inputs, Outputs)
{
  var res = "Y";
  var val1 = new Number(Inputs.GetProperty("Value1"));
  var val2 = new Number(Inputs.GetProperty("Value2"));

  if (val1 >= val2)
  {
    res = "Y";
  }
  else
  {
    res = "N";
  }

  Outputs = res;
  return (Outputs);
}

Apart from the obvious problems with this code, it struck me as a very round about way to compare two properties within a Workflow.

So I replaced it all with a single, expression based decision step:

Does anyone have any examples of their own of ‘over engineered’ solutions to simple problems?

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)

Repository Analyser – Source Code

My Repository Analyser tool uses some cool code to connect directly to the Siebel Server object manager instance, via C#. It also does some neat things using the Repository BC’s which underly Siebel Tools.

In the spirit of sharing, I want to make the source code available to you all under the GPL – you can download the source code here,

As with all the source that I’ve released, I’d really love to hear from anyone who has made some awesome app or solved some crazy problem  with the code – it’s there for you to use but I’d really appreciate hearing where it’s being applied.

I’ve been doing some really interesting things with this idea, building a set of useful tools and functions – I’ll keep you posted as and when I develop and release new functionality.

VN:F [1.9.17_1161]
Rating: 10.0/10 (1 vote cast)

Siebel Code Challenge – #9

UPDATED: Thanks to Rick for spotting this one! The Today() function returns today’s date without a time component. As there is specialised class validation functionality all over the Action BC, the Workflow will fail if the planned start date is any time today – regardless if it’s before the current time or not. Using the Timestamp() function, within the operation step, will achieve the result expected by the developer.

By special request from Rahul, I give you Siebel Code Challenge #9 – Return of the Code Challenge!

This is something I came across recently – you need to think about the context of vanilla validation in the Action BC to realise why this Workflow isn’t quite right.

This is such a simple mistake but one that can really affect the logic that the developer has in mind. Comments and answers below, please!

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)

Siebel Repository Analyser

I’m still enjoying messing around with C# and Siebel at the moment. Today, I created a tool to analyse the quantity of Browser and Server Script across objects in the Siebel Repository. The tool uses the Siebel COM Data Control to connect directly to a Siebel Server Object Manager – much better than messing around with Dedicated Web Clients! The tool uses the Repository Business Components themselves to analyse the Repository content – there is no direct SQL involved here at all. The idea will be to build this in to a multi purpose analysis tool, that will do more than just count lines of code. Functionality such as performance analysis, memory leak monitoring and exception checking are all in the pipeline.

Anyway, for now I’ve made the tool available for download here. I’m in the process of cleaning up the source code and, as soon as I’m done, I’ll make this available too.

I’d be very interested to hear from readers as to the volumes of script in their implementation. A prize is up for grabs for the first to post evidence of a ‘zero script’ implementation – I’m that confident that no such thing exists! :)

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)

Siebel Code Challenge – #8

UPDATED: Once again, Rahul has spotted the issue. In this case, the developer has used an exception connector to connect the exception handling Business Service to the End step. This should be a default (black) connector, not the exception (red) connector.

Interestingly, the workflow will still run through but the exception handling step itself will raise an exception that will be thrown out of the workflow!

A REALLY easy one today! When maintaining or reviewing code and configuration, do not underestimate the stressed and hurried developer. This is something I came across a lot in a previous engagement and it’s something that one developer had got wrong in their head and propagated around the system. A real pain to tidy up!

Answers in the comments box below please!

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)