Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Change directory and run "node" command using Java

arturl43391132
Level 4
Level 4

Hello Adobe Community,

 

We're using the workflow and one of requirments is running "node.js" command which should be run under some directory of project. The problem that we're trying it to run e.g. core/src/.../Workflow.java and the command should be run under e.g. frontend/.../placeWhereItShouldBeRun. The biggest problem is that user.dir of System.getProperties() is "/opt/aem/author". So we can't just make something like "cd ... node ...".

 

Could you please suggest something?

 

Thanks.

1 Accepted Solution
Shashi_Mulugu
Correct answer by
Community Advisor
Community Advisor

@arturl43391132 Thanks for posting in community. To be more clear, what are you trying with node? are you trying to process sometime external to AEM? Why cannot you built node as external/individual application and expose REST API from it, and in AEM workflow process setup, consume it?

 

My suggestion is to keep both application a individual contributor in their own space, let REST do it in peace. 

View solution in original post

2 Replies
Shashi_Mulugu
Correct answer by
Community Advisor
Community Advisor

@arturl43391132 Thanks for posting in community. To be more clear, what are you trying with node? are you trying to process sometime external to AEM? Why cannot you built node as external/individual application and expose REST API from it, and in AEM workflow process setup, consume it?

 

My suggestion is to keep both application a individual contributor in their own space, let REST do it in peace. 

View solution in original post

raghavc
Level 5
Level 5

@arturl43391132 Have you tried configuring the script path as external script in GoTo Step ?

I have not tried it before, worth exploring it .

 

Worth considering @Shashi_Mulugu suggestion which would be much neater form of communication between two systems.