Hello everyone!
I’m using a DIALOG PARTICIPANT STEP in a workflow I’m implementing in CQ 5.6.1.
The Dialog consists in various checkboxes and the executor of the step will select some or none, depending on the situation.
After the DIALOG STEP, there’s NO OPERATION STEP and then an OR SPLIT. In the script of this OR SPLIT I’d like to retrieve the data from the Dialog and use it for the logic implementation.
I’ve tried the two approaches listed in the Workflow Step Reference (http://dev.day.com/docs/en/cq/current/workflows/wf-ref.html#Dialog Participant Step):
The path I found them was: /etc/workflow/instances/<date>/<model>/<history>/xxx/propertyname
I’ve tried several ways of accessing their values through the OR SPLIT script but I didn’t succeeded.
The path I found them was: /content/<website>/<page>/jcr:content/<nodename>/propertyname
I’ve also tried several ways of accessing their values through the OR SPLIT script but I didn’t succeeded:
function check() {
if (workflowData.getPayloadType() == "JCR_PATH") {
var path = workflowData.getPayload().toString();
var node = workflowSession.getSession().getItem(path);
if (node.getProperty("propertyname").getString().equals("on")) {
return true;
}
}
return false;
}
I’ve also added this code to the .jsp file of the component where the dialog is located.
String criacaook = properties.get("criacaook", String.class);
String seook = properties.get("seook", String.class);
String waok = properties.get("waok", String.class);
String h2wok = properties.get("h2wok", String.class);
String ofertaok = properties.get("ofertaok", String.class);
String midiaok = properties.get("midiaok", String.class);
Does anyone know some documents/tutorials/guidelines that could help me? Or even how to do it?
Thanks in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
Thanks for the answer Scott!
I can't tell you exactly why, but I made it work yesterday!
But it only works (retrieve the data) when I write down the script in the workflow editor, when I try to reference a script in /etc/workflow/scritps it does not work...
Would you know what I'm doing wrong?
Thanks!
Views
Replies
Total Likes
there is an example for an or split script here:
scott
Views
Replies
Total Likes
Thanks for the answer Scott!
I can't tell you exactly why, but I made it work yesterday!
But it only works (retrieve the data) when I write down the script in the workflow editor, when I try to reference a script in /etc/workflow/scritps it does not work...
Would you know what I'm doing wrong?
Thanks!
Views
Replies
Total Likes
Offhand I don't know why it wouldn't work when referencing the script. Perhaps you can post the script?
Edit: make sure your script file name has the .ecma extension
Views
Replies
Total Likes
Hey Scott, thanks for the answer!
The script was the check function I posted...]
But I'm using the component field in the workflow editor...
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies