You must declare your action in your layer.xml file. Like this:
<folder name="Loaders">
<folder name="text">
<folder name="html">
<folder name="Actions">
<file name="org-mymodule-MyAction.instance">
</folder></folder></folder></folder>
Substitute "text/html" by "text/x-java" or "text/x-ant+xml" or "text/x-jsp" or "image/png".
However, this still may not work depending on how the data loader for the type works. The DataLoader implementation has to override actionsContext() and return this path if it wants to load the Action instances from there. If the data loader you are interested in does not yet do this, please first file a bug report to make sure this is fixed in a future release; as an inferior workaround, you can use e.g.
DataLoader loader = DataLoaderPool.getDefault().firstProducerOf(SomeDataObject.class);
if (loader != null) {
SystemAction[] actions = loader.getActions();
SystemAction[] newactions = new SystemAction[actions.length + 2];
System.arraycopy(actions, 0, newactions, 0, actions.length);
// More realistically: take care that it is not a duplicate,
// place into a specific position, etc.:
newactions[actions.length] = null;
newactions[actions.length + 1] = SystemAction.get(SomeAction.class);
loader.setActions(newactions);
}
You need to know the implementation class of the foreign data object to implement this workaround. You should avoid doing this unless it is really critical to usability, and replace it with layer-based declarative actions as soon as that is available (you did file that bug report, right?).