OMS Middleware Connector and stdout


#1

Hello,
i cant figure out, how to properly use the TriggerOrderExportProcessCommand which is part from the OmsMiddlewareConnector.
I followed the spryker tutorial https://documentation.spryker.com/spryker-middleware.htm but for example it’s unclear to me, why the TriggerOrderExportProcessCommand class sets the output path for the process hard coded to stdout?

$processSettingsTransfer->setOutputPath('php://stdout');

With this hard coded stdout, it’s not possible to change the location where the file should go into. Instead it’s always the std stream.

Did i miss something conceptual?

Basically i want to process an order if an event was triggered from the OMS state machine. The first goal is to render a file with all the order information and place it somewhere on the harddisk.

Can somebody give me a clue?

Thanks


#2

On a closer look it seems that the provided TriggerOrderExportProcessCommand is maybe just an example, how to provide such a Command-Plugin. The configured stdout was chosen because it’s always available.
So … i have to write and configure another one by myself? :thinking:


#3

Hi Ingo,

Thank you for the feedback.
You are right, this should be configurable.
I’m creating a ticket and will update when it’s changed and released.

Best regards,
Valerii


#4

Hi @tvalerii
thanks for your fast response. So would you suggest (as a workaround) to extend the corresponding class on the project level (in my custom module) and simply override the getProcessSettingsTransfer() method?

Thanks


#5

Yes, this would be an option.

Best regards,
Valerii