@staticmethod
def _get_artifacts(values):
    """Get artifacts from workflow values."""
    artifacts = []
    templates = values.get('templates')
    flow = values.get('flow')
    for template in templates:
        artifacts.extend(template.artifacts)
    for task in flow.tasks:
        args = task.arguments
        if not args:
            continue
        if not args.artifacts:
            continue
        artifacts.extend(args.artifacts)
    inputs = values.get('inputs')
    if inputs and inputs.artifacts:
        artifacts.extend(inputs.artifacts)
    outputs = values.get('outputs')
    if outputs and outputs.artifacts:
        artifacts.extend(outputs.artifacts)
    return artifacts
