This can be done by creating a java action with an input parameter of System.FileDocument and optional returns a System.Image