Controlling which action is called | Community
Skip to main content
December 15, 2020
Solved

Controlling which action is called

  • December 15, 2020
  • 2 replies
  • 1318 views

Hi,

 

I'm new to Firefly and I have a question regarding possible action conflicts. I initialized an app based on ACS template and another app using Analytics template in the same workspace. Afterwards, I tried to run the ACS app within its folder, but when I invoked the default action Analytics action was fired instead of the ACS one. Is this the expected behaviour? When I run an app does it always run the last one that was initialized in the given workspace?

 

Cheers,

Rob

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 duynguyen_adobe

Hi @robyea - it is not recommended to create 2 separate apps in the same workspace, or more precisely even in the same project. You should either:

1. init a single app with both ACS and Analytics templates, if your app integrates both services; or

2. create 2 separate projects in Developer Console, and init 2 apps for each project - one ACS and one Analytics.

 

Please check out the blog post and video about Firefly projects and workspaces.

2 replies

duynguyen_adobeAdobe EmployeeAccepted solution
Adobe Employee
December 15, 2020

Hi @robyea - it is not recommended to create 2 separate apps in the same workspace, or more precisely even in the same project. You should either:

1. init a single app with both ACS and Analytics templates, if your app integrates both services; or

2. create 2 separate projects in Developer Console, and init 2 apps for each project - one ACS and one Analytics.

 

Please check out the blog post and video about Firefly projects and workspaces.

Adobe Employee
March 2, 2022

Although it is recomended that you run each project in its own workspace if there is a need to mix them together you will need to sort through each project and make sure the actions have different definitions that do not overlap.  You will also want to review the web code as well looking for overlaps.
If the two projects do overlap you will need to alter the code in one of the two projects to resolve the conflict. 
For example if both projects have an Action named formHandler.js you will need to change the code paths and project definition. 

So formHandlerAcs.js and formHandlerAnalytics.js or something like that then you will need to merge the app configs and have two different action names in there too.