Expand my Community achievements bar.

SOLVED

Import of partitioned file and external signal: how to trigger the external signal just once?

Avatar

Level 3

Hi there,

I'm trying to import a file that has been partitioned in 10 parts. When the import ends, this wkf must trigger another wkf through an external signal.

The problem is that, since there are 10 parts, the external signal is triggered 10 times, while we need just one trigger to let this wkf starts after the previous one.

This behavior is discouraged by Adobe online documentation (The activity cannot be triggered more often than every 10 minutes.), in fact the second wkf doesn't work correctly.

 

Is there a way to import several file parts but trigger just once another workflow?

How can be done? The main point is that the first wkf reaches "end" activity 10 times instead of just one and I'm unable to find a solution to trigger the second wkf just once.

 

Please note that I need absolutley to trigger the second wkf after the previous because its activities must be executed necessarily when the import is ended. This means for example that I can't start the second wkf with a scheduler, because I can't be sure that the import is ended in time (if there is an error in import, a biggest file, ....)

If you have any different ideas (not using API), let me know!

Thanks,

Livia

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The "once in 10 minutes" applies to External Signal calls via the API only.
From within a workflow, you don't have that limit on the End activity

 

How are you able to determine a certain part?

1 way might be:

  • Use a custom resource
  • When starting a partitioned part, insert into the table
  • When processed, remove it from the table
  • At the end, check if the table contains no more part for the current job, then only trigger the end activity (via a Test activity).

View solution in original post

7 Replies

Avatar

Correct answer by
Employee Advisor

The "once in 10 minutes" applies to External Signal calls via the API only.
From within a workflow, you don't have that limit on the End activity

 

How are you able to determine a certain part?

1 way might be:

  • Use a custom resource
  • When starting a partitioned part, insert into the table
  • When processed, remove it from the table
  • At the end, check if the table contains no more part for the current job, then only trigger the end activity (via a Test activity).

Avatar

Level 3

Hi @ramon_bisswanger, thank you for the answer but I don't understand your solution. Which kind of custom resource would you create? I mean, you'll use it to store file names? And how to delete each part at the end of import data? Please note that I tried to use Test activity many times, without finding a good solution. For example, I tried to use "filename" vars in order to send to my triggering end just 1 flow (1 file) but I don't know how to define "file name" standard variabile, I supposed that it is crearted automatically by a Transfer File activity but it's not so. In the end, just to remember that I'm using ACS that hasn't the same power of custom implementation of ACC.

Avatar

Employee Advisor

Hi,

yes filename variable is declared automatically by the workflow in ACS.

You are able to extract the file name (it contains path + file name + generated timestamp).

You can send that to another workflow using External Signal or you can store it in a custom resource.

 

Main question is: how do you determine that the file is finished.

if e.g. you have files like 01_10, ... 10_10 you could only trigger the follow up for 10_10

if you don't have that, you may have to go via the route described below

Avatar

Level 3

Hi @ramon_bisswanger, I tried to use different expressions in Test activity (such as StartWith and FileName - listed here: https://experienceleague.adobe.com/docs/campaign-standard/using/managing-processes-and-data/calling-...) applying it to "$(vars/@filename)", but it seems not to read correctly the filename. Note that I tried this solution directly in the first wkf. My idea was "if file name is X then end to external signal, otherwise "standard" end. In this way I supposed that the second wkf will be triggered just once. I tried both just after the Transfer File and after a Save Audience, and all transition falled in to the "standard" end instead of the triggering one. Probably there is something that I don't setup correctly in Test Condition. About your question: since I would like to insert a Test activity after Update Data (to be precise after a Save Audience), I'm sure that the import is ended. The wkf executes the Test only if Update (Save Audience) is ended its execution.

Avatar

Level 3
If I use an External Account based on Blob, is the file path complete (including container name) or is just the folder in the container where the files are?

Avatar

Employee Advisor

The variable will contain the full "local file name":

  • This includes the file path /usr/local/...
  • and also the filename contains a timestamp (e.g. _20210117210523a).

So you would have to compare only part of the file name.

You can use function FileName(<String>) to extract the file name and then do a substring to determine the filename without the timestamp.

Then you should be able to compare the values

Avatar

Level 3
Hi @ramon_bisswanger, thank you so much! Now it works! In my tests I used the "original" FileName, while I have to use the ACS "local". In my case, the original FileName is like "part-0" while the local is "part_0".