Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

How to do add extra textfield workitemcompletedialog in workflow

Avatar

Level 2

Hi Team,

         Issue: I didn't see property value history metaData node in workflow instance node.

          I am overriding  workitemcompletedialog   /libs to /apps path.

/libs/cq/inbox/content/inbox/dialogs/workitemcompletedialog/items/form/items    to   /apps/cq/inbox/content/inbox/dialogs/workitemcompletedialog/items/form/items

existing.PNG

added extra textfield in  workitemcompletedialog dialog box in /apps path

overlaynode.PNG

Provided title name and comment  in dialog box click Ok button.

completepage.PNG

completed work flow and generated  history nodes metadata, i didn't find textfield value in metaData node. Please find attachment.

workflow1.PNG

Thanks

Kotireddy Naru

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @bala3 
You may need to check the correct js file, the solution which was shared earlier was based on AEM 6.3 or 6.4



Arun Patidar

View solution in original post

5 Replies

Avatar

Community Advisor

Hi,

You need to include your custom field value in post request, so that it can be process and saved in task metadata.

Go to /libs/cq/inbox/gui/components/inbox/clientlibs/commons/js/inbox.commons.workitem.js and add below line at line number 399. so your new data will be look like this. the 3rd line have my custom type stepTitle.

data[("stepTitle-" + taskId)] = $("[name=stepTitle]", "#workitemCompletionDialog").val();

After adding your code it will have all 3 values.

data[(postDataSelector + taskId)]   = coralNextStepSelect.value;

data[("comment-" + taskId)] = $("[name=comment]", "#workitemCompletionDialog").val();

data[("stepTitle-" + taskId)] = $("[name=stepTitle]", "#workitemCompletionDialog").val();

Screen Shot 2018-09-08 at 3.39.16 PM.png

Screen Shot 2018-09-08 at 3.41.00 PM.png

Screen Shot 2018-09-08 at 3.35.45 PM.png



Arun Patidar

Avatar

Level 1

Hi Koti, For you did this work? Did you make any other change additional to what was given above? Please help

 

Thanks

Bala

Avatar

Level 1

Hi Arun, 

 

We had same requirement and I tried above steps. The new field is not getting stored in metadata. Looks like the changes made in "inbox.commons.workitem.js" is not somehow getting reflected.

Even we commented the entire js code/added console logs, still workflow is getting completed, but new dialog data is not getting stored. Not sure what we are missing here. Can you please help?

 

bala3_0-1718872587307.png

bala3_1-1718872691616.png

bala3_2-1718872885865.png

 

Thanks

Bala

Avatar

Correct answer by
Community Advisor

Hi @bala3 
You may need to check the correct js file, the solution which was shared earlier was based on AEM 6.3 or 6.4



Arun Patidar