Hi There.

I have started using Drupal 8 two day only.

I was able to create the site and also configure the workflow for the out of content type.

The problem I am facing is, I am not able to Assign the action while transitioning to new state.

As per link below, there has to be Action just above workflow.

https://www.drupal.org/docs/8/modules/workflow/the-workflow-module

Now we could add an action (previously configured using the trigger module). Click on the Actions link above your workflow. Add the action to the transition.

I have failed to understand where can i find the action

I have tried to find Action button in following places.

Admin Portal > Configuration > Workflow Block
and
Admin Portal > Configuration > Workflow > Edit the Workflow > Transition.

Please help me in assigning the Action to the workflow transition and/or Workflow State

Thanks and Regards,
Neeraj

CommentFileSizeAuthor
#17 StateConfigPermissions.PNG10.26 KBNeeraj420
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Neeraj420 created an issue. See original summary.

Neeraj420’s picture

Title: How to create an action on state change » How to create an action on workflow state change
Neeraj420’s picture

Neeraj420’s picture

Please help me to solve this issue.

Thanks in advance.
Neeraj

johnv’s picture

Hi,
See also page https://www.drupal.org/docs/8/modules/workflow/workflow-actions-triggers...

At the moment, there is no good module in D8.
You wish to define an action which is executed at state change?
- The Rules module is still in development for D8
- The Trigger module was D7-core and is now abandoned.
- see file workflow.api.php for own developments. See also https://www.drupal.org/docs/8/modules/workflow/developer-documentation-f...
So the overall state is not very good for site builders.

You wish to execute an action explicitely?
You can create actions here: /admin/config/system/actions
You can creat a view with a Node Bulk Form, that shows the actions.

See also the https://www.drupal.org/project/workflow_notifications,which is in development, for coding examples.

Neeraj420’s picture

Hi John,

Thanks for your valuable time. While exploring drupal.org, I came across one more module called Workbench.

This module does exactly what i want, However my site would have multiple workflow attached to different contents.

I tried deploying it on my site. However I could not get any option to create multiple workflows.
Can you help me confirming whether multiple workflows are possible in workbench. If yes please point me to the right documentation.

I will try rules and workflow notification module and update.

Thanks and Regards,
Neeraj

johnv’s picture

Indeed. Workbench focusses on 1 scenario for 1 node type, whereas Workflow enables multiples Workflows per system and even per entity type, and has no assumptions of the use case.

Neeraj420’s picture

You are correct, I am playing around with one node only as of now.

rules module is still developing, however workbench has stable release and suffices my use case of sending mails without much coding.

Thanks for your help and time.

johnv’s picture

You can also try-out workflow_notifications. An Add on for sending messages.

Neeraj420’s picture

Hi John,

I am trying using workflow and Workflow notification for transition and sending notification.

However I am stuck with How to publish the Content if content transition from one state to another state.

Please help.

Thanks and Regards,
Neeraj

johnv’s picture

You can try https://www.drupal.org/project/workflow_state_config .

Both modules https://www.drupal.org/project/workflow_state_config and https://www.drupal.org/project/workflow_notifications have no 1.0 version and are developed by other developers. But I have tested them and they are OK.

Neeraj420’s picture

Hi,
I have done the following :-
installed following modules

Workflow
Workflow notification
Workflow State Config

Following are the states :
Save Draft
Edit
Review
Custom Publish.

in the state config i have ticked, check boxes for Publish and Default Revision against Custom Publish.

However whenever Content Reaches the Custom publish state, it is still not getting published.

Please help.

Thanks and Regards,
Neeraj.

johnv’s picture

Perhaps you need to run cron.

Look for the Cron module in the 'core' section.
It makes sure a lot of housekeeping is done.

Neeraj420’s picture

No Luck. Even after manually running Cron(it didn't ask any thing). When content reaches that state which is configured to publish, workflow is not changing the state of content to published.

johnv’s picture

hmm, you better open an issue in the COnfig State module's issue queue.
Stupid question: You are sure the content type is initially not published?

Neeraj420’s picture

Yes, I am sure the content is not published and its not published after that reaching or crossing the state.

Neeraj420’s picture

FileSize
10.26 KB

I have attached the screenshot because of which probably i am getting this error.

Please check the image attached.

Neeraj420’s picture

I have moved from Drupal 8 to Drupal 7 version. It is working like a charm.

Rules are so much simpler in Drupal 7.

Anyways thanks for help.

johnv’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.