AEM Forms - Workbench - executeScript Input Filepath

Avatar

Avatar
Level 1
brandons1824587
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
brandons1824587
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
brandons1824587
Level 1

15-06-2016

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();

Accepted Solutions (0)

Answers (0)