Hi John,

I did some investigation. 
I added logging statement to line 843 of lib/galaxy/workflow/modules.py file:

for step in workflow.steps:
        step_args = param_map.get( step.id, {} )
        log.info('step.id=' + str(step.id) + ', step_args=' + str(step_args))
        step_errors = module_injector.inject( step, step_args=step_args )

It gives:
galaxy.workflow.modules INFO 2014-12-18 13:39:31,464 step.id=21, step_args={'contrast': u'Female-Male'}

See http post below. It looks like somehow runtime parameter appears among steps.

4 * Client out-bound request
4 > POST http://galaxy.thehyve.net/api/workflows?key=5c4f870bc0108a60dc7435a000fb7874
4 > Content-Type: application/json
4 > Accept: application/json
{"parameters":{"21":{"contrast":"Female-Male"}},"workflow_id":"d4bec7f9d7e8cf4d","history":"hist_id=59bd7ef52a8ce0e8","ds_map":{"21":{"id":"fb94345e0a2a5a2c","src":"hda"},"22":{"id":"9384bb69863b3f9e","src":"hda"}},"no_add_to_history":"true"}

Here is link to ga file for completeness: https://github.com/thehyve/trait_workflow_runner/blob/master/src/main/resources/nl/vumc/biomedbridges/galaxy/rna-seq-dge.ga

On Fri, Dec 19, 2014 at 7:47 PM, John Chilton <jmchilton@gmail.com> wrote:
That is odd. Does that workflow run through the UI? It looks like it
was missing a tool during import. Certainly the API should indicate
that overtly instead of failing in this fashion.

If it does run, can you export it to JSON and send it to me?

-John

On Thu, Dec 18, 2014 at 10:55 AM, Ruslan Forostianov <ruslan@thehyve.nl> wrote:
> galaxy.web.framework.decorators ERROR 2014-12-18 12:22:04,760 Uncaught
> exception in exposed API method:
> Traceback (most recent call last):
>   File "/home/galaxy/galaxy-dist/lib/galaxy/web/framework/decorators.py",
> line 244, in decorator
>     rval = func( self, trans, *args, **kwargs)
>   File
> "/home/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/api/workflows.py", line
> 231, in create
>     populate_state=True,
>   File "/home/galaxy/galaxy-dist/lib/galaxy/workflow/run.py", line 18, in
> invoke
>     modules.populate_module_and_state( trans, workflow,
> workflow_run_config.param_map )
>   File "/home/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py", line 843,
> in populate_module_and_state
>     step_errors = module_injector.inject( step, step_args=step_args )
>   File "/home/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py", line 830,
> in inject
>     state, step_errors = module.compute_runtime_state( trans, step_args )
>   File "/home/galaxy/galaxy-dist/lib/galaxy/workflow/modules.py", line 264,
> in compute_runtime_state
>     state = self.decode_runtime_state( trans, step_updates.pop( "tool_state"
> ) )
> KeyError: 'tool_state'
>
> Cheers,
> Ruslan Forostianov
>



--
Ruslan Forostianov,
Software Developer
www.thehyve.nl
E ruslan@thehyve.nl
M +31(0)6 83 51 30 81
Skype foro.ru