Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

AEM Forms - Workbench - executeScript Input Filepath

Avatar

Level 1

I am working on a project to move our old workflows out of Central Output Server to AEM Forms. In Central we call several custom agents that we want to plugin to the new workflow in Workbench.

I am trying to use the executeScript process, but having trouble getting the file path of the input file. In Central, we used the @InFile for this (the code below has the exact arguments used by central).

Is there a way to get the path of the input file (or other files) and pass them as arguments to an exe?

import java.lang.ProcessBuilder;

System.out.println("Route Detected: DS_Insert");

String jobName = patExecContext.getProcessDataStringValue("/process_data/@jobName");

System.out.println("Job Name: " + jobName);

var inFile =patExecContext.getProcessDataDocumentValue("/process_data/inDat");

System.out.println("InFile Path: " + inFile);

//System.out.println("Starting SCEChart");

//ProcessBuilder process = new ProcessBuilder("E:\\jfsrvr\\Agents\\SCEChartAgent\\SCEChartAgent.exe","-start -d E:\\jfsrvr\\Chart_Data -i @InFile -j E:\\jfsrvr\\SRCMedicalCenter\\Configs\\jfserver1.jmd -g1 UserLoginName -g2 PID_1_F03_C0_MRN -g3 PID_1_F18_PatAcctNum -g4 PV1_1_F44_AdmitDateTime -g5 EVN_F05_Operator_ID").start();

0 Replies