Calling an Adobe I/O Runtime action from other action | Community
Skip to main content
Level 7
February 4, 2025
Solved

Calling an Adobe I/O Runtime action from other action

  • February 4, 2025
  • 1 reply
  • 1060 views

Hi All,

 

I have created an Adobe IO runtime project having 3 actions. (action1, action2, action3)

From action1, based on certain condition, I need to call action3. Is ti possible? If possible, how to call the action?

 

cc @arunpatidar @amanath_ullah  @sarav_prakash @mk_aem21  @amitvishwakarma 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by sarav_prakash

Hi @sarav_prakash  Thanks for your help.

 

So, As per your statements, I should not call an action from other action. Instead, In action1 only, based on condition, call the functions(or the utility code).

 

 

 


Correct. Treat actions as microservices. Similar to AWS lambda or Cloudflare worker or Azure functions.

 

You write single action performing a business task. The task can have conditions, business logic, transformations, all goes inside the single action. 

 

Here is my runtime action 

Its single action starting from index.mjs. Conditionally I call contentfragment or folder or asset functions. And token, journals are housekeeping. But overall is a single runtime action, performing different tasks based of conditions in index.mjs

 

 

1 reply

Level 7
February 4, 2025
sarav_prakash
Community Advisor
Community Advisor
February 4, 2025

Dont create 3 actions. Instead create single callable action and write action1 condition and action2,3 executions as functions inside single action. 

 

So your action needs to be either webaction, thats callable from UI like hit of some button. OR can be non-webaction as whisk alarm job, running at cron schedule. 

I understand you want to perform 1 task, conditionally. And so build as single action, and split into functions. 

Level 7
February 5, 2025

Hi @sarav_prakash  Thanks for your help.

 

So, As per your statements, I should not call an action from other action. Instead, In action1 only, based on condition, call the functions(or the utility code).