Hi there,
What are the available methods for loading a file into the workflow? I'll receive the file from the data team, who don't have access to Adobe Campaign. Therefore, I'll advise them to place the file on the server. Then, my workflow will check if the file's date matches the current date, run once, and pick up the file to load the data.
Can this be achieved using a Signal activity instead of a scheduler? Since we're unsure of when the file will be uploaded, is there a way to configure the workflow to check if the file has been uploaded, and if so, run only once?
What are all the essential activities needed to accomplish this in Campaign Classic?
Thank you in advance
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Heku_
The Web download activity wasn't very helpful, but the File Collector activity proved to be effective. With the File Collector activity, I tested placing files with two different dates. I set the activity to run every 30 minutes and observed that it picked up the file dated 05-01 at 11:30 PM, and then, after 30 minutes, it picked up the file dated 05-02.
Thank you for your assistance. However, could you also advise me on how to configure the signal activity to restart once the delivery has been sent? Currently, the workflow transitions to the finished state, and subsequent postevents do not trigger the signal in the workflow because it's already in the finished state.
Views
Replies
Total Likes
Hello @rvnth , you can use a signal if you can call an event when the file is ready, but you can use an scheduler and after that, with javascript you can check if the file that you are searching is there, take a look at the functions and examples: https://experienceleague.adobe.com/developer/campaign-api/api/c-File.html, https://experienceleague.adobe.com/developer/campaign-api/api/p-File-lastModified.html
With this, you can create a test using event variables, if you want to use the file in the server you can put in vars.filename the full path on the file and the activity "Data Loading" with the option "Specified in the transition" will load it.
Hope this helps!
Hi @Heku_ ,
Thank you for your response. There has been a slight adjustment to my requirements. I now need to verify the existence of a file in a specific location on the server. The file name will include a date that must match the current date. If the file exists, I want to proceed with triggering another workflow.
I'm currently utilizing a file transfer activity with the "Test if file exists" option, but I'm uncertain about how to proceed with configuring it. How can I validate the existence of the file and check if its date matches the current date before triggering the other workflow?
Additionally, can I utilize a signal activity to trigger the other workflow? However, I'm uncertain about how to transmit the workflow ID to the other workflow containing the signal activity, ensuring it runs only once when the file is present on the server.
Thank you in advance
Views
Replies
Total Likes
Hi @Heku_ ,
Please find below the screen shot:
I'm trying to check existence of a file. If the file exists, I'm using the following script in JavaScript to trigger the signal:
xtk.workflow.PostEvent(workflowInternalName, "signal", "");
If the file doesn't exist, It will wait for 30 minutes before checking again.
Could you please advise what should be used in place of the URL at file transfer since the file will be located on the application-hosted server under the directory path export/folder1/?
Thank you in advance.
Hi @Heku_ ,
I tried to provide the following path in the URL location. Could you confirm if this was accurate or not? Upon initiating the workflow, it executes and completes, yet no tasks are visible for the selected activity.
https://xxxx.xxxx.com/var/export/folder1/file_name_<%= formatDate(new Date(), "%4Y-%2M-%2D") %>
Thank you in advance
Views
Replies
Total Likes
I'm not sure if that will work, I've only used file transfer with external accounts... Maybe if the url is available in the web you can use web download, here is the documentation for web download activity : https://experienceleague.adobe.com/en/docs/campaign-classic/using/automating-with-workflows/event-ac...
Hi @Heku_
The Web download activity wasn't very helpful, but the File Collector activity proved to be effective. With the File Collector activity, I tested placing files with two different dates. I set the activity to run every 30 minutes and observed that it picked up the file dated 05-01 at 11:30 PM, and then, after 30 minutes, it picked up the file dated 05-02.
Thank you for your assistance. However, could you also advise me on how to configure the signal activity to restart once the delivery has been sent? Currently, the workflow transitions to the finished state, and subsequent postevents do not trigger the signal in the workflow because it's already in the finished state.
Views
Replies
Total Likes
Hi @Heku_ ,
Thank you for your assistance. After reviewing the below thread link: https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/want-to-create-a-m...
I attempted to implement something similar as follows:
var query = xtk.queryDef.create( <queryDef schema = {vars.targetSchema} operation = "select"> <select> <node expr="@state"/> </select> </queryDef> ); var record = query.ExecuteQuery(); var status = vars.state; if (status='Finished') xtk.workflow.Restart("workflowInternalName")
Please let me know if this is fine.
Views
Replies
Total Likes
Hello @rvnth. It's almost fine, the status is a numeric value, 'Finished' should be replaced for 5, the value of status finished, the operator is "==" instead of "=" and vars.state should be replaced for record[0].@state. Anyway, if your issue was caused because you were doing the PostEvent with the parameter complete=true, the response that @ParthaSarathy gave is correct.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies