Start a new topic

How to link workflows to the data processed in this workflow?

Hello , 


I am launching a workflow via an API and I need to retrieve the comment from the workflow related to the data that has been validated or rejected at this level.

This workflow consists of a single step.


I am trying to retrieve this comment based on the golden ID, batch ID, or load ID. Is there a way to link the workflows to the golden ID, batch ID, or load ID of the data processed in the workflow?


 I have tried using the columns gd_snapshot_dataset_load_id, prev_dataset_load_id, or curr_dataset_load_id that exist in the wf_workflow_instance table, but I have not been able to find these load IDs in the GD table.


Thank you, 

 


Hello Wijden,


Unfortunately, it's not possible right now to retrieve the comments of the workflow user tasks using the REST API, but we have already an enhancement request for this feature MDM-15491, In the Data-driven workflows, you can access the comments from the tables- wf_step_instance and wf_workflow_instance but not in the REST API response-

image



image

image



Thank you

Hello Subham, 


How can I link the start_comment column to my gd_table, please? 


Thank you, 

Hello Wijden,


It seems to be possible, where you need to create a function/procedure and call it in the stepper, for that you need a specific attribute which will store the value of comment.

Also you need to join couple of tables to to be able to populate the data-

1. DL_BATCH ( To get the B_LOADID and B_BATCHID values)

2. WF_WORKFLOW_INSTANCE ( To be able to retrieve the Start_comment of the workflow with the help of initial_dataset_loadid   )

3. WF_STEP_INSTANCE ( To be able to calculate the value of loadid from curr_dataset_loadid according to your number of workflow steps )

4.SA_table (to be able to insert the value of comments in the related attribute which will be populated to the GD table automatically)



You need to try the above idea, I haven't tried it but seems to be possible, also you need to calculate the number of steps in your workflow in order to get the value of the actual b_loadid column using the table wf_step_instance where you can see the loadid value as per the tasks (strt, user task, router, submit and end) of the workflow, and the value of the last step of the task like 'End' task column 'curr_dataset_loadid' +1 will be the value of b_loadid, so it seems to be complex to implement but possible.


Thanks and have a nice day.



Login to post a comment