+ Data Object: {processDataToDisplay.process_data_identifier}
+
+ Value:
+ {JSON.stringify(processDataToDisplay.process_data_value)}
+
+ );
+ }
+ return null;
+ };
+
+ const handleProcessDataShowResponse = (processData: ProcessData) => {
+ setProcessDataToDisplay(processData);
+ };
+
const handleClickedDiagramTask = (
shapeElement: any,
bpmnProcessIdentifiers: any
) => {
- if (tasks) {
- const matchingTask: any = tasks.find(
- (task: any) =>
+ if (shapeElement.type === 'bpmn:DataObjectReference') {
+ const dataObjectIdentifer = shapeElement.businessObject.dataObjectRef.id;
+ HttpService.makeCallToBackend({
+ path: `/process-data/${params.process_model_id}/${params.process_instance_id}/${dataObjectIdentifer}`,
+ httpMethod: 'GET',
+ successCallback: handleProcessDataShowResponse,
+ });
+ } else if (tasks) {
+ const matchingTask: any = tasks.find((task: any) => {
+ return (
task.name === shapeElement.id &&
bpmnProcessIdentifiers.includes(task.process_identifier)
- );
+ );
+ });
if (matchingTask) {
setTaskToDisplay(matchingTask);
initializeTaskDataToDisplay(matchingTask);
@@ -503,7 +540,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
// taskToUse is copy of taskToDisplay, with taskDataToDisplay in data attribute
const taskToUse: any = { ...taskToDisplay, data: taskDataToDisplay };
HttpService.makeCallToBackend({
- path: `/task-data/${modifiedProcessModelId}/${params.process_instance_id}/${taskToUse.id}`,
+ path: `${targetUris.processInstanceTaskListDataPath}/${taskToUse.id}`,
httpMethod: 'PUT',
successCallback: saveTaskDataResult,
failureCallback: saveTaskDataFailure,
@@ -687,6 +724,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
{getInfoTag()}