Hi Peter,
this should be quite an easy task with the time stamp utility service:
Get the current date:
<operation name="Timestamp Utility">
<participant name="TimestampUtilService"/>
<output message="TimestampUtilServiceTypeInputMessage">
<assign to="action">current_time</assign>
<assign to="format">yyyyMMdd</assign>
</output>
<input message="inmsg">
<assign to="current_datetime" from="time/text()" append="true"/>
</input>
</operation>
Then concat with some substring (I didn't check this so if all the xpath are correct, but you get what I want here I guess):
<assign name="Assign" to="/ProcessData/server_path" from="concat('/server/',substring(string(/ProcessData/current_datetime),0,4),'/',substring(string(/ProcessData/current_datetime),4,2),'/',substring(string(/ProcessData/current_datetime),6,2),'/')"/>
Best regards
Manuel
------------------------------
Manuel Frank
Integration Architect
Andreas STIHL AG & Co. KG
Waiblingen
------------------------------
Original Message:
Sent: Tue June 25, 2024 06:38 AM
From: Peter Milakovich
Subject: Using Current Date Values In Business Process
For many clients, we currently use a business process to pull files from their server & directory path using SFTP.
A new client has requested some customization of this process that I'm unsure how to accomplish within a BP. They are wanting us to pull from a new directory path every day, where the structure is "server:/year/month/day" and the day is the current date at the time of the pull.
Has anyone ever grabbed current date and used pieces of it to populate other values? I've been searching through existing/out-of-the-box BPs in process manager looking for anything similar, but no such luck. I'm assume I'll have to string values to create the directory path?
------------------------------
Peter Milakovich
------------------------------