I have a requirement where I need to check the mode (author/publisher) in the workflow step.
There is different workflow for both of these wcm modes.
I was trying to write function check() using the api WCMMode.
I know there is a way to do it in the components/jsp however the same seems to be not working in the workflows:
Is there anything like the below in workflows (this is to be inside function check)?
var WCMMode = sling.getService(Packages.com.day.cq.wcm.api.WCMMode);
If you have any other suggestions/solutions, please do advise.
Thanks!!
Solved! Go to Solution.
Views
Replies
Total Likes
Hey Sharad,
If you want to control whole work flow whether it has to run or not you can control it in the launcher configuration in which mode it has to trigger.
If you want to controll only particular step inside the workflow then you can used some code which will tell in which mode that workflow is running. Use run modes concepts for identifying in which mode instance is running,
Search with "how to check run modes in adobe day cq" you will get lot of results for setting run modes or simply accessing and identifying in which mode cq instance is running.
Views
Replies
Total Likes
Hey Sharad,
If you want to control whole work flow whether it has to run or not you can control it in the launcher configuration in which mode it has to trigger.
If you want to controll only particular step inside the workflow then you can used some code which will tell in which mode that workflow is running. Use run modes concepts for identifying in which mode instance is running,
Search with "how to check run modes in adobe day cq" you will get lot of results for setting run modes or simply accessing and identifying in which mode cq instance is running.
Views
Replies
Total Likes
maruthid wrote...
Hey Sharad,
If you want to control whole work flow whether it has to run or not you can control it in the launcher configuration in which mode it has to trigger.
If you want to controll only particular step inside the workflow then you can used some code which will tell in which mode that workflow is running. Use run modes concepts for identifying in which mode instance is running,
Search with "how to check run modes in adobe day cq" you will get lot of results for setting run modes or simply accessing and identifying in which mode cq instance is running.
Hey thanks Maruthi.
I am using the OOTB workflow moderation in which there is a requirement to identify from which environment the workflow has been triggered. It is getting difficult to identify so I was using a OR split inside the OOTB workflow and in that trying to write the logic for function check. This is an ecma script and getting WCMMode (or any thing related to the check on modes) is freaking me out. Is there a way to identify the mode in the function check or any other way?
I cant change the launcher that is the limitation.
Thanks,
Sharad
Views
Replies
Total Likes
I think you are looking for the SlingSettingService. See this thread: http://forums.adobe.com/thread/1020051
Views
Replies
Total Likes