Difference: DpHipeTools (30 vs. 31)

Revision 312008-12-10 - JavierDiaz

Line: 1 to 1
 
META TOPICPARENT name="DpHipe"

Adding Tools to HIPE

Line: 294 to 294
 

Task compliance

Changed:
<
<
>
>
 
  • write user documentation (jtags)! That will be automatically picked up whenever a user asks the system for help on your task.
  • the name of the task should be a legal variable name in the global name-space. For example your instance of MyTask should report itself as e.g.: "myTask" and not "This is my task".
  • if your prime parameter is not the first parameter in your task, specify the prime parameter using the setPrimeInput method in the signature
  • write a parameter validator for your prime parameter if your task should be listed not only on prime data type but on prime data contents as well.
Changed:
<
<
  • If your task uses file paths as arguments to avoid problems with windows paths you should add a Mapper to your TaskParameter:
parameter.setMapper(new FilenameMapper()); //Java
>
>

Some Recommendations of use of simple tasks and its limitations

  • Use a function that fully initializes TaskParameters: you avoid working with partially initialized data or data with non obvious defaults.
  • Please take care to register your task properly: otherwise it may half-work, which is much worse than not working at all!
  • Capture exceptions and check your params before trying to properly execute if you want to provide better error reporting than the one provided by default
  • You should not do user interaction after you have started execute() (not on EDT).
  • Validators: you cannot compare multiple parameters, order of execution is not specified, will be executed several times. SO if you need to validate dependent parameters it should be done later.
  • Once you are in execute() console has already been updated with the command : Although you can change the value of TaskParameters, this will not be properly reflected on the UI, so don't do it. So once you are on execute() you can check , possibly abort, and properly execute (nothing else).
 

Adding a Tool that is not a Task

 
This site is powered by the TWiki collaboration platform Powered by Perl