export function withWorkflow(litElement: LitLikeElement, workflow: Workflow) {
    const decoratedLitElement = decorate(litElement)
    const {index, count, workflows} = decoratedLitElement[reservedField]
    if (index === count && !workflows[index-1]) {
        decoratedLitElement[reservedField].workflows[index-1] = workflow