Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Values are not getting saved under metaData under var/workflows

Avatar

Avatar
Level 1
prathik-sm
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
prathik-sm
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
View profile
prathik-sm
Level 1

05-01-2021

Hi Team,

 

We have custom dialog which will be used in the dialog participant step.

 

Case 1: Saving under data/metaData (helpful in accessing across different steps under same workflow) The fields in this dialog needs to be saved under metaData as we need them in the further steps. So we are storing the field like ./metaData/watchEmails We see that values are not getting saved under metaData(/var/workflow/instances/server0/2021-01-04/new-model_26/data/metaData)

Case 2: Saving under history metaData (specific to workitem) If we save the field like 'watchEmails' then it is getting saved under (/var/workflow/instances/server0/2021-01-04/new-model_26/history/1609766229181/workItem/metaData)

Case 3: Saving under payload If we save the field like './jcr:content/watchEmails' then it will be saved under payload 

 

Kindly help us in storing the fields as mentioned in Case 1 - It would be helpful in accessing the value across other steps.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct Reply

172 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile

Avatar
Validate 10
MVP
kunal23
MVP

Likes

166 likes

Total Posts

565 posts

Correct Reply

172 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 50
View profile
kunal23
MVP

05-01-2021

You should go with case #2 and access the stored data in subsequent process steps using workflow history API- 

 

Example-

List<HistoryItem> historyItemList = workflowSession.getHistory(workItem.getWorkflow());
HistoryItem currentItem = historyItemList.get(historyItemList.size() - 1);
HistoryItem prevItem = currentItem.getPreviousHistoryItem();

String str = prevItem.getMetadataMap().get("watchEmails ");

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,345 likes

Total Posts

3,220 posts

Correct Reply

914 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,345 likes

Total Posts

3,220 posts

Correct Reply

914 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

07-01-2021

Hi, 

The dialog dialog participant step stores the value in payload node, not in workflow instance node. If you need this property only in the workflow then you can get ti from history or directly from payload.