Hierarchical List Applets

A customer requirement had me a little stumped recently – to implement an Hierarchical List Applet based on the Action BC.

Looking in Bookshelf, there isn’t a lot said around the configuration of such applets. In fact, the guide basically tells you to look at an existing applet and work it out for yourself!

We at Ollerenshaw IT don’t want you to work it out for yourself, so we’ve worked it out for you. Here’s a guide to creating your own Hierarchical List Applet, based on the Action BC’s relationship with itself via ‘Parent Activity Id’:

  1. Create a new Project and lock
  2. In Tools, create a new List Applet via the wizard:
    • Pick ‘Action’ as the underlying BC
    • Pick ‘Applet List (Base/EditList)’ as the underlying template for Base and Edit List
    • Choose a small number of fields to display
  3. Create Applet Method Menu Items:
    • Indent
    • Outdent
    • MoveUp
    • MoveDown
  4. Add the following User Properties to the Applet:
    • CanInvokeMethod: Outdent = TRUE
    • CanInvokeMethod: Collapse = TRUE
    • CanInvokeMethod: Expand = TRUE
    • CanInvokeMethod: Indent = TRUE
  5. Modify the ‘HTML Hierarchy Bitmap’ property of the Applet ‘List’ control to: ‘HTML Hierarchy Icons’
  6. Check out the ‘Action’ BC
  7. Modify the ‘Hierarchy Parent Field’ property of the BC to: ‘Parent Activity Id’
  8. Locally lock the ‘Activity List View’ for testing
  9. Replace the ‘Activity List Applet with Navigation’ applet with your new Applet
  10. Compile all objects and test

The icons and expand / collapse elements will display themselves on the first list column exposed on the applet. This doesn’t work if said column is a CHECK type, so I’d recommend exposing a unique field such as ‘Id’ and using this as the first column in the applet. Note also that you may want to use the ‘Disable Buscomp Hierarchy’ Applet User Property to disable this functionality where it’s not needed.

Finally, from all of us here Have a Merry Christmas and a Very Happy New Year! :)

VN:F [1.9.13_1145]
Rating: 9.7/10 (3 votes cast)

Hiding Applet Controls

Christmas is fast approaching and it’s all change here at Ollerenshaw IT! ;) Our Siebel upgrade project is on hold and I’m back in the development hotseat, doing what we all secretly love doing best – writing code!

Working in Siebel 8 shows just how things have moved on since the old days of Siebel 99, 6 and Siebel 7. Nowadays, we have loads of User Properties at our disposal and there’s less and less of an excuse to write script. Inevitably, however, Oracle haven’t quite thought things through and we have to resort to good old eScript. It’s just the way of things.

This week I came across an annoying oversight. A simple requirement to hide a button on an applet for all but a select Responsibility. Easy peasy, surely? Not so!

A quick search reveals a number of Blog entries, including one from Alex Hansal’s fantastic site, detailing a ‘Hide Control’ user property. Alas, this property is only available on a very small subset of Applet classes and so cannot be used as a ubiquitous solution.

And so we must turn to code and configuration.

Again, there are a number of Blog posts out there that provide this information, but I just wanted to go a little further and provide a full solution with some little hints and tips. Here’s what I did:

  1. Create a new field in the Personalization Profile BC, to tell us if the user has the appropriate Responsibility
  2. Name: OLI – HasAdminResp
    Calculated: Y
    Calculated Value: IIf(InList(‘Siebel Administrator’,GetProfileAttrAsList(‘User Responsibilities’)), ‘Y’, ‘N’)

  3. Now, add some Browser Script on the Applet_Load event to hide the control, based on the the new Profile Attribute:
function Applet_Load ()
{
/******************************************************************************
* Created By: Iain Ollerenshaw
* Created On: 12th December 2011
* Purpose: Called on Applet Load
*
* Modification History:
*
* Date Who Comment
* 12/12/2011 Iain Ollerenshaw Added code to hide 'Admin' button
******************************************************************************/

// First, determine if user has the 'Siebel Administrator' Responsibility
var isAdmin = TheApplication().GetProfileAttr("Me.OLI - HasAdminResp");

// If not, find and hide the control
if (isAdmin == "N")
{
	var oCtrl = this.FindActiveXControl("Admin");
	if( oCtrl != null )
	{
		// Hide the control
		oCtrl.style.visibility="hidden";
	}
}
}

It’s a shame that so much code is required to do something so simple. Hopefully, ‘Hide Control’ will make it into the base classes sometime in the future.

Happy Holidays! :)

VN:F [1.9.13_1145]
Rating: 9.7/10 (3 votes cast)

Siebel Upgrade and Data Validation

Continuing the theme of the Siebel upgrade (and, unfortunately, of the problems that occur during that process) we found some odd behaviour in our upgraded 8.1.1.5 application today: Data Validation rules were being triggered but a ‘blank’ dialog was being displayed as a result.

Some digging reveals two things:

  1. 8.1.1.5 has moved Data Validation Messages out of the rule (S_VALDN_RULE) and into their own table (S_ISS_VALDN_MSG). This is represented by a new join in the FINS Validation Rule BC
  2. The Siebel 8.1.1.5 upgrade scripts are missing the steps to migrate your messages from the old location to the new

To cut a long story short, the upgrade will break your Data Validation Rules. :(

Now, Oracle have recognised this as a defect in 1077704.1. The propsed workaround is that we, the customers and developers, write our own EIM processes to ‘fully populate the S_ISS_VALDN_MSG’ table and ‘update [the] VALDN_MSG_ID column’.

Three issues do I have with this approach:

  1. We are working to a tight deadline on this project and we cannot afford to dedicate development hours to writing fixes to problems that Oracle themselves have introduced
  2. There is no EIM table to support updating the VALDN_MSG_ID column in S_VALDN_RULE
  3. We have a short window to cutover this upgrade to Production and we cannot afford to fix configuration defects at go live

I’ve asked for a solution from Oracle and will post it if and when it arrives. Otherwise, I’ll post up my own solution if I really do have to spend my days resolving this myself.

I’ll keep you posted, but in the mean time if anyone already has a solution to this I’d love to hear from you!

VN:F [1.9.13_1145]
Rating: 6.0/10 (1 vote cast)

Siebel and WordPress – Workflow and Web Service

Okay, now we’ve got our proxy BS, Integration Objects and Web Service definitions all in Siebel, we can build a Workflow Process to invoke (consume) the Web Service and do something useful with the integration interface.

We’ll start with a pretty simple requirement – let’s look for the first post from the WordPress site and create a Siebel Action (Activity) record with the information.

  1. First up, create a new Data Map (Site Map > Integration – Administration > Data Map Editor)
  2. The Integration Objects that we’re going from and to are ‘Post’ and ‘Action_IO’ respectively
  3. The Integration Components are ‘Post’ and ‘Action’
  4. Map the [title] field from WordPress to the ‘Description’ field in Action and map the [content] field to ‘Comments’
  5. Map the [id] field to ‘Activity UID’ to give us a user key to play with
  6. Validate your new Data Map

Now let’s create a new Workflow Process.

  1. Create a new Workflow Process in the project that we created last time.
  2. You’ll need to define some new process properties:
  3. PropertyTypeDefaultComment
    WP Post IdString1Use this to store a literal for testing purposes
    WP Post MessageHierarchyThe Hierarchy we’ll use to grab data from WordPress
    WP Action MessageHierarchyThe Hierarchy we’ll use to store the new Action definition
  4. Create a new Workflow Process with the following steps:
  5. NameTypeBusiness ServiceMethodComment
    StartStart
    Get WP PostBusiness ServiceWordPressWebServicePortTypegetPostProxy BS that invokes the Web Service
    Purge Data MapBusiness ServiceEAI Data Transformation EnginePurgeRefreshes the Data Map cache for testing
    Data MapBusiness ServiceEAI Data Transformation EngineExecuteMap the WP data to the Action IO
    Insert ActivityBusiness ServiceEAI Siebel AdapterInsertCreates the new Action BC record
    EndEnd
  6. The first business service should be configured to run the proxy business service and the getPost method. Input should be the WP Post Id and the output will be the WP Post Message. Note that the output argument from the proxy BS is ‘getPostResponse:getPostReturn’
  7. Next, invoke the Purge method of the EAI Data Transformation Engine BS. This is good practice for testing but should be removed in a Production environment
  8. Now call the Execute method of the EAI Data Transformation Engine BS. Pass in the WP Post Message hierarchy, the name of the Data Map created earlier and output the WP Action Message property. This will give us our ‘Action’ IC with all the Integration Component Fields in place
  9. Finally, call the ‘Insert’ method of the EAI Siebel Adapter BS. This will take as input the hierarchy created by the mapper and use it to create a new Activity record

That’s it!

Run through the simulator and you’ll see that the process calls the Web Service that you created to grab an XML message from your WordPress site into a hierarchy. The Data Mapper then uses the IO definitions created by the EAI wizard to map the data across to the vanilla Action IO. Finally, the process uses the mapped message to create a new Activity record in Siebel!

Give it a go and post if you have any questions!

 

VN:F [1.9.13_1145]
Rating: 10.0/10 (4 votes cast)

Siebel and WordPress Integration

I read a really interesting requirement posted on the Oracle Siebel Forum the other day:

Any one of you tried to connect WordPress and Siebel via WSDLs – SOAP, API scripts?

It got me thinking – how difficult could this be? Well, let’s find out!

Here’s what I did:

In WordPress:

  1. From your WordPress site, add a new plugin and search for the ‘Wordpress Web Service’ plugin. Install it and activate the plug in
  2. Navigate to the WPWS URL on your blog: http://<Your BLOG URL>/index.php/wpws
  3. Click the WSDL URL and save the WSDL file off on your local hard disk

 

This gives you the Web Service definition (WSDL) file that you can import into Siebel Tools.

In Siebel Tools:

  1. Create a new project and lock it – ‘OLI – WordPress’
  2. Go to File > New > EAI > Web Service
  3. Pick the new Project and open the WSDL file that you saved above, picking all the defaults
  4. Let the Siebel EAI wizard do it’s thing

You’ll end up with a Proxy Business Service, a bunch of Integration Objects / Components and a WSDL definition that you can choose to automatically deploy to your connected database. You can now invoke the Proxy BS in Workflow, using the IO’s that have been created for you, to consume the Web Service exposed by your WordPress site.

You can also import the WSDL into SOAP UI and ping off a test message, just to see what you get back with each of the messages. I’m going to use the ‘getPost’ method in the next steps so give that a try now.

Right, we now have a mechanism to integrate Siebel and WordPress. Always one to keep the tension high, I’m going to leave the details of how to build a Workflow Process to call the new Web Service until the next post!

VN:F [1.9.13_1145]
Rating: 10.0/10 (3 votes cast)