Skip to main content
Level 7
Feb 4, 2025 12:22 PM UTC
Solved

Calling an Adobe I/O Runtime action from other action

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.
sarav_prakash
sarav_prakashAccepted solution
Community Advisor
Feb 6, 2025 4:43 PM UTC

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

 

 

5 replies

Level 7
Feb 4, 2025 1:06 PM UTC
sarav_prakash
Community Advisor
Community Advisor
Feb 4, 2025 11:49 PM UTC

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. 

Translate
Level 7
Feb 5, 2025 3:53 AM UTC

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).

 

 

 

Translate