Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Custom plugin MetaData Injection and step-attributes.xml problem

  1. #1

    Default Custom plugin MetaData Injection and step-attributes.xml problem

    I wrote a custom step plugin, and would like to wire it for MetaData injection.
    I read the wiki
    (http://wiki.pentaho.com/display/EAI/...+Injection+API)
    and my understanding is that I just need to implement the
    getStepInjectionMetadataEntries() and injectStepMetadataEntries() methods in my StepMeta?

    Say my new plugin step is called Fred. So I have
    FredStep.java, FredStepMeta.java, FredStepData.java, FredStepDialog.java

    I added StepMetaInjectionInterface to my FredStepMeta declaration:
    FredStepMeta extends BaseStepMeta implements StepMetaInterface, StepMetaInjectionInterface

    BaseStepMeta .getStepInjectionMetadataEntries uses attributes, and should have loaded "step-attributes.xml", but that does not seem to
    work for my custom step plugin.
    I placed the step-attributes.xml file into the plugin directory, and it is getting deployed along with the plugin.xml file, but it is not getting loaded by the
    BaseStepMeta.loadStepAttributes().

    What do I need to do to add "step-attributes.xml" so it will get read?

    thanks
    Last edited by Luke2; 11-13-2013 at 06:31 PM.

  2. #2

    Default

    I found the answer to my question.
    1) MetaData injection requires a "step-attributes.xml" file to be located in the plugin jar file, this is read by
    BaseStepMeta.getClass().getResourceAsStream(STEP_ATTRIBUTES_FILE);
    2) The plugin step that is to be injected must be connected by hops to other steps. My initial test case used a transform that only contained my custom step, and after some searching I found that the getStepMetaInterface() is called only when the step is connected.
    Last edited by Luke2; 11-18-2013 at 10:59 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.