Re: Creating Picklists

[email protected] Tue, 20 Sep 2005 09:00:31 -0400
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <OFC6AFA0B3.6279FA5E-ON85257082.0046BB51-85257082.00477665@intellicare.com>
Sean McDonald <[email protected]> wrote on 09/19/2005 04:19:37 PM:

> Hello all
> 
> I'm fairly new to Shark, and looking to create some picklists tied to my 

> database. Is there a simple way to accomplish this using JAWE, and then 
> presenting them in the Swing Worklist Handler? The process runs over 
> multiple steps, for instance, choose a garment-type, choose a style, 
> then choose a colour, with each subsequent picklist filtered by the 
> choices made before it.
> 

Hi Sean,

Most of my work is with using Shark classes via a web application so i'm 
shooting from the hip here, but I think maybe you could try something like 
this and see how far you get.. 

What you may want to do is something like this. Get an xpdl defined with 
maybe 2 swimlanes, one for a "human" (you) and one for the System (which 
will be responsible for "automatic" things like getting lists based on 
previous choices.) Your activity diagram will be something simple like 
this:

Start -> Get garment type list -> Pick garment -> Get style list (based on 
garment chosen) -> Pick style -> get colour list (based on style) -> pick 
colour -> End.

Activities 1, 3, 5 will be in the System swim lane and activities 2, 4, 6 
will be in the human swim lane (indexing starting at 0..)

You will need to define wf data vars to represent allGarmentTypes, 
allStyles, and allColours (all of type Array - unless you want to get 
fancy and choose some java class of your own design ). Also you will need 
to define wf data vars to represent chosenGarmentType, chosenStyleType and 
 chosenColour - all of type String (or soemthing else..). Also you will 
need to define applications in your xpdl which will represent the 
GarmentTypeGetter, StyleTypeGetter and colourGetter, with appropriate 
formal params. For example, the StyletypeGetter should have an input type 
formal param of type String (representing the "garment type") and an 
output type param of type Array (reprsenting all styles for that garment 
type).

Finally write toolagents, one for each of the Getter applications. In the 
xpdl, map the appropriate getter activity to the getter application and 
the extended attributes ToolAgentClass and AppName to the Java class 
toolagents that you have written (see Shark docs for details on how to do 
this). For example the formal params of the app should be mapped to the 
"real" wf data vars taht you have already defined above. Also, since you 
are going to use the swing admin client, you may want to look into 
extended attributes VariableToProcess_UPDATE.. (google for that - I'm 
pretty sure teh shark docs as well as the mail archives has info on this.)

After you have all this, and you get an xpdl that is valid, you can upload 
the xpdl to shark (make sure the toolagents you have written are 
accessible to Shark - in Shark's classpath) and then try to make it work 
using the admin swing client.  .. btw, for starters you could just make an 
xpdl which represent activities till getting the style list (ie activity 
3).. Once you get that far, the rest will be easy/similar.

> I really would appreciate any and all help with regard to this.
> 
> My thanks
> Sean
> 

Good luck, and hope this helps!
Geeta
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws