How to have different workflow per node (same content type)

Created on 13 February 2023, almost 2 years ago
Updated 5 April 2023, over 1 year ago

Problem/Motivation

Hello,

I added the workflow_state field in the content type but it forced me to select only a single workflow, is it possible programmatically when creating the node of this content type to associate a different workflow?

thanks in advance

💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @seixas
  • 🇳🇱Netherlands johnv

    Hmm, it should be working:
    - create 2 workflows
    - add 2 fields, assigning each field a workflow.

  • Tanks johnv, not sure what you mean by 2 fields, I want to have a single field for workflow in Content type "A" and when creating a node of type "A" be able to associate to this node a different workflow based on some rules.

    Example:

    (Content type A) Node News from EN -> Workflow (a)
    (Content type A) Node News from LIS -> Workflow (b)

  • 🇳🇱Netherlands johnv

    I am not sure what you mean.
    Are you sure you are using the contrib 'Workflow' module, not the core 'Workflows' module?

    A field can only contain 1 Workflow Type; each Workflow Type can have several Workflow States.
    Please check the Transitions tab in Workflow Config. You must enable the 'Create' to 'Other state' transition.

  • Yes i'm using this module and not the content moderation, I have 30 types of workflow(not states) and I need to associate one of this workflow type in the nodes of a content type based on some rules.

    Workflow 1 (15 states)
    Workflow 2 (10 states)
    workflow 3 (25 states)
    .....

    Content type "Request"

    Node 1 -> wokflow 2
    Node 2 -> workflow 3
    Node 4 -> workflow 1

    etc........

    Another thing, I don't see any history being saved when I transict for one state to another, (using user 1) and setup all the permissions, is this a normal behaviour?

    Thanks,

  • 🇳🇱Netherlands johnv

    Wow, sounds complicated.
    You need to assign each workflow to a dedicated field (at least, that is the design).
    Perhaps you can hide all other fields? Or set all fields to a value that hides the field, and set a field to another workflow stat, which makes it un-hidden?

  • Status changed to Closed: works as designed over 1 year ago
  • 🇳🇱Netherlands johnv

    So in short - No, each field has 1 workflow.

Production build 0.71.5 2024