Month: August 2004

Holiday post

Went to a friends birthday party on 21st in Shrewsbury. Had a nice time there and drank some wicked punch. We sat and heard the fire works from the end of the flower show.

On the Sunday we went up to Lauder (Scotland). We arrived there in the afternoon to a very nice site (Caravan and Camping Club). The site had a little stream running around the back of it and Jon managed to get himself soaking wet inside about five seconds flat.

Floors castle took up most of Monday. Very pretty and we went for a walk down by the side of the river. River running very wide and fast.

Tuesday we went to Glentress Forest Trail to do some mountain biking. Rosie didn’t have a bike that would suit and thought hiring one a waste of money, which annoyed me for some reason. We went for a short ride to the training area where Jon went over some of the raised things etc. but I had a hard time staying on them. We then went down to where there was a reproduction of a stone-age building with some blurb on it. Jon tried to stop on the grassy bit with a flashy skid turn and lost it. He didn’t hurt himself much.

Wednesday we did Edinburgh. Got there in the rain and went round most of the way in a tour bus. We jumped off and had a nice meal in Rock City and then did the rest of the tour from the top of a bus in the dry. We got off at the castle, which was OK, but there was a lot of it. Then we walked the Royal Mile and watched a few street performances.

That evening we went for a pizza near the park and ride and watched the lightning go around the valley. There was no power at the campsite when we got back, there had been a direct strike on the transformer. It was restored at about 2 am, one of our neighbours had TV and everything set up and they all turned on when the power came back.

Thursday we went to North Berwick, which is a beautiful stretch of countryside, and had a look around the sea bird centre there. The weather was glorious and we went for a nice walk along the beach. It was raining everwhere else, but apparently North Berwick is next to one of the sunniest spots in the UK. It was interesting watching the weather move around the place. I suspect the Firth of Forth has its own microclimate.

Friday we went to a place called “Pot a Doodle Do”, the idea being that you get a piece of pottery and then paint it yourself. Jon got stung by a wasp on the neck but they had some magic stuff that sorted him out. To be honest, the place wasn’t worth more than one visit but Cocklawburn Beach nearby absolutely fantastic. We realised we were near my sister Liz so we popped round to see her, she made us very welcome and the kids went mad for her dog, Dougal.

Saturday spent watching some of the kids at our club compete in a Kayak slalom in Fernilee and then going to the barbie in the evening. We were going to stay there and decided not to because of the weather but in fact it was fine, ho hum.

Sunday travelled down the A68 to Teeside White Water centre where I managed to get a quick paddle in before it finished for the day. The Happy Eater ate me a couple of times but my roll was on song, fortunately.

Monday paddled with some of the guys from the club. Hannah discovered why the Riot Air has its name: unfortunately we don’t have a picture of her in mid air. I worked on my fear of the latter third of the course and successfully got down Valentines and the Acid Drop several times (to be fair the tide wasn’t far enough out to make the Acid Drop more than an interestingly big wave for about half an hour).

Had a nice meal in the Talpore – it was Roger’s birthday. The water was running at 2 pm or so in the afternoon on Tuesday so we decided to pack up.

Back at work for three days but paddling in the evenings.

We were due to go to Bala with the Canoe Camping club but the campsite was flooded so we tried a different site in central wales, see http://www.gwynant.com/.

The only real problem I’ve had recently is that my feet start to hurt after about 20 minutes of walking (and I mean hurt). Possibly something to do with the circulation? Need to see the doctor.

Will post photo album here when I can find the time.

Calling Oracle Workflow functions from Notifications

This is a bit annoying (but see breaking news at the end):

You can create a function that will be called when you leave a notification, it says quite specifically in the manual that if you do this it will be called twice; once in RESPONSE mode and once in RUN mode. This is for collating votes and all that kind of interesting stuff.

To make it go you return the variable resultout with a string of the form ‘CONTINUE:YES’, where YES is the response the user made to the notification. Now, if you know your notification ID (NID) you can get the user’s response by doing something like:

Select text_value
Into response
From wf_notification_attributes na
Where na.notification_id = wf_engine.context_nid
And na.Name = ‘RESULT’;

When called in respond mode the context_nid variable is populated; when in run mode it isn’t. If you don’t return something that looks right from run mode the notification just hangs there. If you were to return a different response to what the user actually did then it would follow that path instead – good eh?

In my case I was trying to get values that were set in the notification (respond parameters in the parlance of the tool). How do you get these values if you don’t know the NID? It won’t push out of the notification and into global parameters in the workflow so you have to write a function. No use there, then. Instead I did this with a global variable. This works as long as you realise the whole thing is one Oracle transaction and the function doing your calculations is called in the order RESPONSE and RUN.

g_response wf_notification_attributes.text_value%Type := ‘’;
Function getresponse
Return Varchar2
Is
Begin
   if wf_engine.context_nid is null then
     return g_response ;
   end if ;
   Select text_value
   Into g_response
   From wf_notification_attributes na
   Where na.notification_id = wf_engine.context_nid
   And na.Name = ’RESULT’;
   Return g_response;
   Exception
    When Others Then
       Return Null;
End getresponse;

And there’s another thing: Why do I have to look in the wf_notification_attributes for a value of an attribute? Why isn’t there an API? I think there may be a Java one but honestly, everything else is in an API for the best of reasons (encapsulation and preventing a mess when you upgrade etc.). Witless.

Another way round this may be call a function after your notification; but then you’d have to get the highest-numbered NID for the notification of interest and make sure it wasn’t cancelled. Far better to be called in Respond mode. Another example of half an implementation. If they’d had respond and run mode functions definable then no issue.

Breaking news:

It just occurred to me, why not set the resultout to null when called in the mode I don’t care about?  It works! Muppets all round, I think, and I’m buying!

Cops arrest you for farting too loudly?

Quoting from this site:

Acpo vice president Chief Constable Denis O’Connor welcomed the consultation on the power to take fingerprints by the roadside and take footwear impressions without consent.

But he sounded a “note of cautio” on plans to extend the powers of community safety officers.

Although crime was down, the public felt increasingly unsafe, he said.

Yes, because tossers like him are spreading fear and distress. Crime is actually down, when I was a youngster being boisterous was annoying but OK, now it’s a crime. Most kids would have quietened down if you asked them. It’s managing rather than leading, all the vision of a blind walrus.

Why not stop toileting the resources and use them to give kids something to do?

Also, according to a friend of mine who is in the Police, the community safely officers cost as much to train as a junior PC and don’t have any powers to speak of. Why not just have more trained PC’s and stop screwing around?

Sometimes I could just slap these idiots.

What distance?

Imagine a world where everyone is the victim of an illusion. Where the apparent separation of subject and object, of self and other, is simply not real.

Instead, everyone clings to the illusion because of fear and ignorance, which is in turn masked by hatred.

Imagine that you can see through to the underlying, empty unity of it all.

There is no distance then.

There is no other to hate or be hated by.

Neither is there an other to love. Just the vast beauty of the present moment. Even when you pick your nose and are so bored you could scream.

If only you could see it all properly.

It also occurred to me recently (or resurfaced more likely) that if you are the product of your actions (which is what Karma means, it’s nothing to do with punishment) then the other person that injures you is simply your actions from some time ago ripening into something from a seed you planted. How can you hate them? What’s the point? This doesn’t mean that bad people shouldn’t be punished: it’s still their karma after all.

Actually “deserve” is an interesting word: it comes from Latin and means “from service”. So perhaps it is more like Karma than you’d think.

To date I have had my nose broken twice and been hit over the head by a baseball bat. I’ve also had long periods of black depression. I hope I haven’t planted too many more bad seeds.

I am hurrying to plant a lot of good ones as fast as possible.

Back to the techie crap now.

Diary entry

It’s nearly midnight and I’m a little wired, to be honest. Just discovered that one of Rosie’s friends has cancer. I didn’t know what to say but did my best to show some loving kindness. Ultimately that’s all you can do.

Struggling with motivation at work, but doing a lot of paddling when I’m not working on my business. Langollen paddling good, the recent rain is probably annoying a lot of people but it suits me; warm rivers with water in them. Lots of fun without the unpleasant trauma of winter freezing your parts off.

I’ve been working on spinning anti-clockwise in the wave at the bottom, not something I’ve ever been able to do easily. Discovered that I need some speed and to turn my head to make it go. I can now hold my position in the wave and go back and forth along it. One of the tricks is to keep your weight forward all the time and use paddle strokes in front of you to turn.

I’ve been working on clockwise spins not using the paddle, except to start them off, just moving my weight around and switching edges, throwing the kayak across at the front by using my legs. This is coming on too; I’m also beginning to lose my fear of double pumping the boat on its edge which means that cartwheeling shouldn’t be too far away. Lots of objectives achieved with a little help from Matt Cooke the other week. Remember the mantra: turn your head and the kayak follows. Sometimes I need to follow my own advice.

My laptop stopped working (not the work one, my personal one). I sent it back under warranty to find out something rather weird: it had two 512MB chips fitted but one wasn’t working. It had only ever reported 512MB anyway, which is what I ordered in the first place. I paid for another 512MB to replace the chip that was now stopping it working and hopefully they will send it back after fitting it. The original chip must never have worked but only stopped the laptop going a couple of days ago. I don’t get it but I’ll at least have a 1GB machine.

Kind of winding down for my holidays even though I have a week left before they start.

Rosie and the kids have been away on guide camp all week. The house has been a bit weird. I’ve been living off ready meals and fruit as agreed with Rosie because I knew I couldn’t be arsed cooking. Still having a problem with chocolate, particularly in the afternoons when the boredom really starts to kick in. I’m a professional, it doesn’t stop me getting the job done but it’s been hard going without the family to get back to.

I got a call from Oracle asking me why I had downloaded their new 10g database. I was unintentionally rude to the lady calling – I just said straight off the cuff so I can evaluate it, why d’you think? I am a little embarassed by being so blunt but the sheer oddness of the question caught me off guard. I’m downloading it so I can make a big database to help Santa and the pixies build a high-availability RAC system to monitor the bad kids 24/7/365; I’m downloading it because I like watching IE download 300MB files and give up just before the end; I’m downloading it because I love you. In fact, I’m going to set up a server at home with 10g and the application server so I can look at doing some work with Workflow and the new Application Faces stuff they were trumpeting in the last edition of the Oracle magazine. To be honest the database is almost irrelevant but I think it best to use the latest version so support can’t come out with the usual BS about upgrading if you have a problem.

On the big download thing; one of the guys recommended some download manager software GetRight. Have a look on download.com. Seems quite good but they won’t pay for it so I will have to be mildly dishonest about shareware again. I don’t like doing that and will pay for my home machines but work can pay for their own. This software inserts itself seamlessly in between IE and the download site and then allows the whole pause/resume/etc. thing to happen. A must with these big files from Oracle.

Oracle workflow (continuing on from an earlier blog) still won’t install: it started whining about the absence of an 8i DLL, which is weird because I was attempting to install into a 9i database. I think it’s probably because I told it to install locally so it’s trying to use the bequeath (sic?) interface instead of SQL*Net and has maybe picked up an 8i version of SQL*Plus from the path. I’ll use this as a treat to help me with my boredom tomorrow (today now, it’s 12:02). Yes, installing workflow is a treat; it’s hard not to cry, isn’t it?

Went to a business meeting on Wednesday. A breath of fresh air. Stuart told me to keep the dream alive and I am.

Still waiting for the guy from Oracle to reply to my calls about the consulting option to sort out the version numbers in Oracle Repository. Will probably have a go myself if he doesn’t get his finger out.

It’s now over a year since I was made redundant: rejoice! I would never have started my business or on the road to financial freedom if it hadn’t happened. One of the people at Adis left for a better job recently and I wanted to give them a bell to say good luck but they won’t return my calls because they are afraid of me talking them into something. This makes me sad. They obviously don’t know me at all.

Bless

Oracle workflow 2.6 installation hassle

Joy!

When you invoke the workflow configuration assistant as supplied with 2.6 you get:

Exception in thread “mai” java.lang.NoClassDefFoundError: WfFrame
        at WorkflowCA.main(Compiled Code)

Good, innit? You can also run the assistant by going to <oracle_home>wfinstall and running wfinstall.bat (unix peeps change as necessary).

I went to the top workflow directory looked for .jar files. Found them in javaoracleappsfndwfjar. Aha, says I, let’s put these in the class path. I took a copy of wfinstall, renamed it to mywf.bat and changed it thusly:

rem Oracle Workflow install script
rem Make sure all arguments are assigned or java will hang
setlocal
set classpath=;D:Program FilesOraclejre1.1.7librt.jar;D:Program FilesOraclejre1.1.7libi18n.jar;d:ora9iwfinstallWorkflowCA.jar;d:ora9ijlibewt-3_3_6.jar;d:ora9ijlibshare-1_0_8.jar;d:ora9ijlibswingall-1_1_1.jar;
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarfndbalishare.jar
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarfndewt.jar
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarfndswing.jar
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarwfapi.jar
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarwffrm.jar
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarwfjava.jar
set classpath=%classpath%;D:ora9iwfjavaoracleappsfndwfjarwfmon.jar
“D:Program FilesOraclejre1.1.7binjre” -classpath  “%classpath%” WorkflowCA /wfdir D:ora9iwf /orahome d:ora9i  /wintz “GMT Standard Time” /systemroot “C:WINDOWS

(you’ll have to join some of the lines and change directories as needed yourself).

This appears to work but I haven’t yet had time to run it to the end.

Why doesn’t the Oracle Installer create this batch file properly? It can’t have been tested, or worked!

New info 06-AUG:

Workflow 2.6 needs to be installed into an 8i home. It seems to install OK into a 9i database from an 8i home. Once you have installed the 8i client and then installed WF into there it works first time without having to mess with the wfinst.bat file.

Activity Diagrams in JDeveloper

I suppose beggars can’t be choosers but in Rational Rose and all of the books the swim lanes go down the page, not across, which means that you can get a lot more on a page. Makes me think that they cribbed the tool from Designer, which did swim lanes across as well. I know it sounds pedantic but it’s non-standard, and that irritates me. An option to switch orientation would be nice.

It doesn’t like duplicated names across diagrams and expects you to reuse objects. This is good, excellent in fact, but dragging and dropping doesn’t seem to work in the case of object flows. The only way I’ve found to include them is to right click and select add to diagram, which is not the most intuative thing I’ve ever come across.

You can’t rename diagrams, you can rename anything else. This means that calling your diagram, say, create asset, means that you can’t have a process called create asset. The only way round this is to shut JDeveloper down and rename or delete the diagram file. Irritating and unnecessary.

Before I realised that I could drag and drop swim lanes onto diagrams I tried to create swim lanes with the same name and it didn’t like this either. Why does it matter if you have a duplicated swim lane name? That said, maybe the non-informative message could just suggest you drag the one you’ve already defined.

I think the duplication check could do with some common-sense rules applying and more helpful error messages.

I have raised this in a Metalink enhancement request but am not holding my breath.

Back in harness with Oracle Workflow

We used workflow to manage creating documents and wanted to be able to create management reports on top of it. I remember having to create some horrible views to allow you to work out where you were in the workflow and what step was next so you could report on it.

It’s just occurred to me that you could have had a parameter on the notifications called something like LAST_NOTIFICATION, which we set to a constant value with the notification name as it passes through. Could also have one with something that does the integration with the stages in the reports we spent all of that time over etc.

I will try it on the prototype I’m building. Should make integration much simpler.

We’ll see …