I am new to Liferay and currently working with GA107.
I am building an executer method that is triggered when a file is uploaded. I have already got the link to work via an XML workflow.
What I need help with is the next step: To process the uploaded file it has to be forwarded to a REST service. For this I have to get the file somehow in the code. Unfortunately, I don’t know how to do this.
package filehandler;
import com.liferay.portal.workflow.kaleo.model.KaleoAction;
import com.liferay.portal.workflow.kaleo.runtime.ExecutionContext;
import com.liferay.portal.workflow.kaleo.runtime.action.executor.ActionExecutor;
import com.liferay.portal.workflow.kaleo.runtime.action.executor.ActionExecutorException;
import org.osgi.service.component.annotations.Component;
@Component(
property = {
// TODO enter required service properties
},
service = ActionExecutor.class
)
public class FileHandler implements ActionExecutor {
@Override
public void execute(KaleoAction kaleoAction, ExecutionContext executionContext){
//The file must be called up and forwarded here
}
@Override
public String getActionExecutorKey() {
return "java";
}
}