Hi, guys! I need to solve problem:
If there are active workflows for an particular resource (payload) new workflow start/creation should be rejected. I use CQ5.5 It provides checking only if workflows started from siteadmin ("Page is already subject to a workflow!"). I need that checking also for others starting types : f.e. from workflow console or by launcher. Any ideas?
Solved! Go to Solution.
Views
Replies
Total Likes
Night Elephant wrote...
Hi Sham,
Thank you for reply!
I need validation for any start workflow possibility. As I can see in my CQ5.5 instance, siteadmin makes GET request with payload as param "isInWorkflow" to /bin/workflow.json which responses with boolean flag "status" (it is just checking lockIsDeep and lockOwner properties on corresponding node and preventing new workflow creation). So it is not client side checking, right? Ideally I need to substitute /bin/workflow.json logic and adding that request for workflow console (as it implemented on siteadmin). But, actually I don't know how to do this.
As possible solution, I can adding MyNewLockingProcess at the beginning of every workflow which will fail duplication workflows and MyNewUnLockingProcess at the end of every workflow
Hi Night elephant,
Overlay [1] and check if payload is part of workflow.
As i informed earlier server side not implemented yet, You might need to include MyNewLockingProcess, MyNewUnLockingProcess on all workflow models.
[1] /libs/cq/workflow/widgets/source/widget/ModelsPanel.js
Thanks,
Sham
Views
Replies
Total Likes
Hi Night Elephant,
Currently validation for duplicate workflow is checked at client side & not at server side. File an official support request asking for server side validation with valid business case.
If your use case is only for workflow console then implement validation logic at client side in starting workflow dialog.
Thanks,
Sham
Twitter: @adobe_sham
Views
Replies
Total Likes
Hello,
Workflow launchers already check for a running workflow which match the payload and worklfow model before launching a new one. You should not need to do anything there.
I don't think there is an easy way to add this functionality to the workflow console without overriding the post servlet that is used to start the workflow. This would be a fairly complicated task. Which users are starting workflows from the workflow console consistently? Perhaps they could use one of the other UIs like siteadmin or dam to start workflows instead?
Will
Views
Replies
Total Likes
Will, thank you a lot!
> Perhaps they could use one of the other UIs like siteadmin or dam to start workflows instead?
Yes, maybe they can.
But actually I also need more restricted checking. For example, if one workflow instance use "/content/category/sport" then others can't be started with payloads "/content/category/sport", "/content/category", "/content", "/content/category/sport/football" and so on but can be started with "/content/category/music", "/content/category/sport/hockey" and so on. Is there any way to change default workflow synchronization behavior?
Views
Replies
Total Likes
Hi Sham,
Thank you for reply!
I need validation for any start workflow possibility. As I can see in my CQ5.5 instance, siteadmin makes GET request with payload as param "isInWorkflow" to /bin/workflow.json which responses with boolean flag "status" (it is just checking lockIsDeep and lockOwner properties on corresponding node and preventing new workflow creation). So it is not client side checking, right? Ideally I need to substitute /bin/workflow.json logic and adding that request for workflow console (as it implemented on siteadmin). But, actually I don't know how to do this.
As possible solution, I can adding MyNewLockingProcess at the beginning of every workflow which will fail duplication workflows and MyNewUnLockingProcess at the end of every workflow
Views
Replies
Total Likes
You will have to override the existing workflow behavior to check the payload. Instead of the actual payload, you might have to take all the payload which contains the string of your payload.
Views
Replies
Total Likes
Night Elephant wrote...
Hi Sham,
Thank you for reply!
I need validation for any start workflow possibility. As I can see in my CQ5.5 instance, siteadmin makes GET request with payload as param "isInWorkflow" to /bin/workflow.json which responses with boolean flag "status" (it is just checking lockIsDeep and lockOwner properties on corresponding node and preventing new workflow creation). So it is not client side checking, right? Ideally I need to substitute /bin/workflow.json logic and adding that request for workflow console (as it implemented on siteadmin). But, actually I don't know how to do this.
As possible solution, I can adding MyNewLockingProcess at the beginning of every workflow which will fail duplication workflows and MyNewUnLockingProcess at the end of every workflow
Hi Night elephant,
Overlay [1] and check if payload is part of workflow.
As i informed earlier server side not implemented yet, You might need to include MyNewLockingProcess, MyNewUnLockingProcess on all workflow models.
[1] /libs/cq/workflow/widgets/source/widget/ModelsPanel.js
Thanks,
Sham
Views
Replies
Total Likes
Thank you Sham. That solved now.
Views
Replies
Total Likes
> You will have to override the existing workflow behavior to check the payload
Ye, the question is how to to do it?
Views
Replies
Total Likes