Hi All,
I have created one custom workflow dialog by using xtype "multifield", but I have to setup dynamic values to the widget before dialog activate, i am making ajax call through listeners and getting values but, not able to set the values to the field. When i try to add with listeners the field object is coming but the setvalue() and getValue() methods are not working.
And I am not able to getting the dialog path i tried "dialog.responseScope.path" but the value is coming as "undefined".
I tried with the loadcontent and beforeshow listeners but these are not calling only beforerender listener is working.
1. How to set the values to workflow custom dialog field
2. How to get the payload path in the workflow custom dialog
I am using AEM5.6.1
could you please help me, how to proceed.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
A dialog for a workflow step is similiar to a dialog for a component. They both use xtypes that can be used in code. You can set the values during design time and read values that were entered into the dialog fields during run-time.
Consider this dialog:
[img]DialogVals.png[/img]
You can read values using a custom workflow step implemented as Java. For example - to read these fields - you use this code:
public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException {
String singleValue = args.get("argSingle", "not set"); // read text field
String[] multiValue = args.get("argMulti", new String[]{"not set"}); //get multifields values
Read this commuty article - it will walk you through creating a custom dialog for a workflow step and how to get values. It also covers how to setup the dialog using JCR nodes, map it to a custom workflow step and use it in a custom step:
https://helpx.adobe.com/experience-manager/using/custom_step_dialog.html
Also - watch this Workflow webinar that covers Workflow concepts such as how to pass data from 1 step to another, and other workflow concepts:
https://helpx.adobe.com/experience-manager/using/Workflows.html (see the link in the table at the start of the article).
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks smacdonald2008 for your reply.
Actually my requirement is, I have a page, in my page i have one component called "page-authors" and in the component i am adding some authors.These authors list is not same for all pages. In my workflow i have to show " page authors which are stored in page-authors component for particular page" to the workflow owner in the page and he wants the feature like add and remove authors. I am using Initiator Dialog Step for this and giving the custom dialog path to "Dialog path" field. The dialog is displaying but i have to add the authors to this before it render.
And i want to enable or disable the dialog based on some condition, How to add property to the multifield widget, based on the condition.I think the multifield xtype have the property to disable , but how to set the property in the dialog.
One more question, If the workflow dialog and normal dialog works as same , why the listeners like loadcontent and beforeshow not working in the workflow dialog which are working for normal component dialog.
It's urgent, please help me to achieve this.
How to access the Workflow webinar video?
Thanks
Views
Replies
Total Likes
Thanks smacdonald2008 for your reply.
Actually my requirement is, I have a page, in my page i have one component called "page-authors" and in the component i am adding some authors.These authors list is not same for all pages. In my workflow i have to show " page authors which are stored in page-authors component for particular page" to the workflow owner in the page and he wants the feature like add and remove authors. I am using Initiator Dialog Step for this and giving the custom dialog path to "Dialog path" field. The dialog is displaying but i have to add the authors to this before it render.
And i want to enable or disable the dialog based on some condition, How to add property to the multifield widget, based on the condition.I think the multifield xtype have the property to disable , but how to set the property in the dialog.
One more question, If the workflow dialog and normal dialog works as same , why the listeners like loadcontent and beforeshow not working in the workflow dialog which are working for normal component dialog.
It's urgent, please help me to achieve this.
How to access the Workflow webinar video?
Thanks
Views
Replies
Total Likes
No, I haven't tried any custom xtype, am using multifield xtype only.
But if i create a custom xtype how to set the author values at run time, We can't show them as drop down. we have them individually similar to multifield.
Thanks
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies