この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
I'm trying to configure a workflow launcher to fire when a content fragment is saved and not before. Currently, my launcher is configured like this:
Event Type: Modified
Nodetype: dam:Asset
Path: /content/dam/mysite/us/en/content-fragments/insights(/.*)
Run Mode: Author
Conditions:
jcr:content/data/master/cq:tags!=
jcr:content/data/master/insight-title!=
jcr:content/data/cq:model==/conf/mysite/settings/dam/cfm/models/insight
Workflow: MyWorkflow
The conditions keep it from firing unless insight-title field is populated, there are cq:tags, and the model is of type "insight", but if those conditions are met, the launcher fires BEFORE the content fragment form is saved if any of the fields on it are touched. I know this because the WorkflowProcess implementation I've written fires the execute method as soon as the cursor leaves a field on the form after changing it and before saving.
I have been looking at the /jcr:content/data/master/fieldname@LastModified fields hoping to see these field changes recorded before save so I could write a condition to account for them, but they appear unchanged until save.
Is there a way to write a launcher which will fire on save of a content fragment instead of when a field is touched in the form but not yet saved?
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
Hi @mpalme1,
I am able to reproduce the scenario in my local with your launcher configuration.
I tried changing the launcher config as below and it was triggering only upon save (and not when we move out of the field)
Event Type : Modified
Path : /content/dam/learnings/content-fragments/events(/.*/)jcr:content/data(/.*)
NodeType : nt:unstructured
Conditions : master/eventTitle!=covid
Please try and let know if it works for you. Screenshot below for reference
You can cross verify in Workflow Instances(Running) / Workflow Archive(completed) console based on the execution status of the workflow.
Hi @mpalme1,
I am able to reproduce the scenario in my local with your launcher configuration.
I tried changing the launcher config as below and it was triggering only upon save (and not when we move out of the field)
Event Type : Modified
Path : /content/dam/learnings/content-fragments/events(/.*/)jcr:content/data(/.*)
NodeType : nt:unstructured
Conditions : master/eventTitle!=covid
Please try and let know if it works for you. Screenshot below for reference
You can cross verify in Workflow Instances(Running) / Workflow Archive(completed) console based on the execution status of the workflow.
表示
返信
いいね!の合計
Hi @mpalme1,
It is the regular regex pattern for paths, no explicit mention of the syntax.
Can you share your existing hierarchy of content fragments (considering all possible paths), we will arrive at generic way of path pattern.
表示
返信
いいね!の合計
Oh, wow, Vijayalakshmi_S, thank you. That is very kind. I would appreciate the help.
Ok, so, if I have content fragments "article-about-weather", "article-about-sports", "article-about-fashion", and "article-about-politics", the paths to those content fragments could look like this:
/content/dam/mysite/us/en/content-fragments/insights/legacy/articles/article-about-weather
/content/dam/mysite/us/en/content-fragments/insights/2020/articles/article-about-sports
/content/dam/mysite/us/en/content-fragments/insights/2019/articles/article-about-fashion
/content/dam/mysite/us/en/content-fragments/insights/articles/article-about-politics
I expect the content authors managing the DAM to add additional folders in the future such as
/content/dam/mysite/us/en/content-fragments/insights/2021/articles
where they will put future content fragments of the same "article" type.
表示
返信
いいね!の合計
Hi @mpalme1,
You can use below as "Path" considering the paths you have shared
This will also work if any variation is created in future for any of these content fragments whose path would something be like -
/content/dam/mysite/us/en/content-fragments/insights/2021/articles/test-article/jcr:content/data/mobile-variation.
Updated launcher config is as follows:
Event Type : Modified
Path : /content/dam/mysite/us/en/content-fragments/insights(/.*)(articles/.*/)jcr:content/data(/.*)
NodeType : nt:unstructured
Conditions : eventTitle!=covid
表示
返信
いいね!の合計
表示
返信
いいね!の合計
@Vijayalakshmi_S, would my conditions
become
?
表示
返信
いいね!の合計
Yes correct @mpalme1
表示
返信
いいね!の合計
Ignore my previous comment
Third condition is not correct. We have given the path one level after /data node. cq:model is not visible on that path. Hence third is not correct.
First two will work. You can either give master/cq:tags!= or simply cq:tags!=
表示
返信
いいね!の合計
@Vijayalakshmi_S Thank you so much for all your help. I got it working now.
表示
返信
いいね!の合計
表示
返信
いいね!の合計