def process(workflow_instance, **kwargs):
    """Process an instance of a workflow using the runtime parameters
    given by ``kwargs``.
    """

    instance = workflow_instance(**kwargs)
    instance.process()

    out = instance.get_outputs()
    instance.serialize_state()

    return out